@aztec/world-state 2.1.0-rc.21 → 2.1.0-rc.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ export interface WorldStateConfig {
7
7
  worldStateProvenBlocksOnly: boolean;
8
8
  /** Size of the batch for each get-blocks request from the synchronizer to the archiver. */
9
9
  worldStateBlockRequestBatchSize?: number;
10
- /** The map size to be provided to LMDB for each world state tree DB, optional, will inherit from the general dataStoreMapSizeKB if not specified*/
10
+ /** The map size to be provided to LMDB for each world state tree DB, optional, will inherit from the general dataStoreMapSizeKb if not specified*/
11
11
  worldStateDbMapSizeKb?: number;
12
12
  /** The map size to be provided to LMDB for each world state archive tree, optional, will inherit from the general worldStateDbMapSizeKb if not specified*/
13
13
  archiveTreeMapSizeKb?: number;
@@ -19,7 +19,7 @@ export const worldStateConfigMappings = {
19
19
  worldStateDbMapSizeKb: {
20
20
  env: 'WS_DB_MAP_SIZE_KB',
21
21
  parseEnv: (val)=>val ? +val : undefined,
22
- description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKB.'
22
+ description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKb.'
23
23
  },
24
24
  archiveTreeMapSizeKb: {
25
25
  env: 'ARCHIVE_TREE_MAP_SIZE_KB',
@@ -15,5 +15,5 @@ export interface WorldStateTreeMapSizes {
15
15
  publicDataTreeMapSizeKb: number;
16
16
  }
17
17
  export declare function createWorldStateSynchronizer(config: WorldStateConfig & DataStoreConfig, l2BlockSource: L2BlockSource & L1ToL2MessageSource, prefilledPublicData?: PublicDataTreeLeaf[], client?: TelemetryClient): Promise<ServerWorldStateSynchronizer>;
18
- export declare function createWorldState(config: Pick<WorldStateConfig, 'worldStateDataDirectory' | 'worldStateDbMapSizeKb' | 'archiveTreeMapSizeKb' | 'nullifierTreeMapSizeKb' | 'noteHashTreeMapSizeKb' | 'messageTreeMapSizeKb' | 'publicDataTreeMapSizeKb'> & Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKB' | 'l1Contracts'>, prefilledPublicData?: PublicDataTreeLeaf[], instrumentation?: WorldStateInstrumentation): Promise<NativeWorldStateService>;
18
+ export declare function createWorldState(config: Pick<WorldStateConfig, 'worldStateDataDirectory' | 'worldStateDbMapSizeKb' | 'archiveTreeMapSizeKb' | 'nullifierTreeMapSizeKb' | 'noteHashTreeMapSizeKb' | 'messageTreeMapSizeKb' | 'publicDataTreeMapSizeKb'> & Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKb' | 'l1Contracts'>, prefilledPublicData?: PublicDataTreeLeaf[], instrumentation?: WorldStateInstrumentation): Promise<NativeWorldStateService>;
19
19
  //# sourceMappingURL=factory.d.ts.map
@@ -9,13 +9,13 @@ export async function createWorldStateSynchronizer(config, l2BlockSource, prefil
9
9
  }
10
10
  export async function createWorldState(config, prefilledPublicData = [], instrumentation = new WorldStateInstrumentation(getTelemetryClient())) {
11
11
  const dataDirectory = config.worldStateDataDirectory ?? config.dataDirectory;
12
- const dataStoreMapSizeKB = config.worldStateDbMapSizeKb ?? config.dataStoreMapSizeKB;
12
+ const dataStoreMapSizeKb = config.worldStateDbMapSizeKb ?? config.dataStoreMapSizeKb;
13
13
  const wsTreeMapSizes = {
14
- archiveTreeMapSizeKb: config.archiveTreeMapSizeKb ?? dataStoreMapSizeKB,
15
- nullifierTreeMapSizeKb: config.nullifierTreeMapSizeKb ?? dataStoreMapSizeKB,
16
- noteHashTreeMapSizeKb: config.noteHashTreeMapSizeKb ?? dataStoreMapSizeKB,
17
- messageTreeMapSizeKb: config.messageTreeMapSizeKb ?? dataStoreMapSizeKB,
18
- publicDataTreeMapSizeKb: config.publicDataTreeMapSizeKb ?? dataStoreMapSizeKB
14
+ archiveTreeMapSizeKb: config.archiveTreeMapSizeKb ?? dataStoreMapSizeKb,
15
+ nullifierTreeMapSizeKb: config.nullifierTreeMapSizeKb ?? dataStoreMapSizeKb,
16
+ noteHashTreeMapSizeKb: config.noteHashTreeMapSizeKb ?? dataStoreMapSizeKb,
17
+ messageTreeMapSizeKb: config.messageTreeMapSizeKb ?? dataStoreMapSizeKb,
18
+ publicDataTreeMapSizeKb: config.publicDataTreeMapSizeKb ?? dataStoreMapSizeKb
19
19
  };
20
20
  if (!config.l1Contracts?.rollupAddress) {
21
21
  throw new Error('Rollup address is required to create a world state synchronizer.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/world-state",
3
- "version": "2.1.0-rc.21",
3
+ "version": "2.1.0-rc.22",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -64,19 +64,19 @@
64
64
  ]
65
65
  },
66
66
  "dependencies": {
67
- "@aztec/constants": "2.1.0-rc.21",
68
- "@aztec/foundation": "2.1.0-rc.21",
69
- "@aztec/kv-store": "2.1.0-rc.21",
70
- "@aztec/merkle-tree": "2.1.0-rc.21",
71
- "@aztec/native": "2.1.0-rc.21",
72
- "@aztec/protocol-contracts": "2.1.0-rc.21",
73
- "@aztec/stdlib": "2.1.0-rc.21",
74
- "@aztec/telemetry-client": "2.1.0-rc.21",
67
+ "@aztec/constants": "2.1.0-rc.22",
68
+ "@aztec/foundation": "2.1.0-rc.22",
69
+ "@aztec/kv-store": "2.1.0-rc.22",
70
+ "@aztec/merkle-tree": "2.1.0-rc.22",
71
+ "@aztec/native": "2.1.0-rc.22",
72
+ "@aztec/protocol-contracts": "2.1.0-rc.22",
73
+ "@aztec/stdlib": "2.1.0-rc.22",
74
+ "@aztec/telemetry-client": "2.1.0-rc.22",
75
75
  "tslib": "^2.4.0",
76
76
  "zod": "^3.23.8"
77
77
  },
78
78
  "devDependencies": {
79
- "@aztec/archiver": "2.1.0-rc.21",
79
+ "@aztec/archiver": "2.1.0-rc.22",
80
80
  "@jest/globals": "^30.0.0",
81
81
  "@types/jest": "^30.0.0",
82
82
  "@types/node": "^22.15.17",
@@ -16,7 +16,7 @@ export interface WorldStateConfig {
16
16
  /** Size of the batch for each get-blocks request from the synchronizer to the archiver. */
17
17
  worldStateBlockRequestBatchSize?: number;
18
18
 
19
- /** The map size to be provided to LMDB for each world state tree DB, optional, will inherit from the general dataStoreMapSizeKB if not specified*/
19
+ /** The map size to be provided to LMDB for each world state tree DB, optional, will inherit from the general dataStoreMapSizeKb if not specified*/
20
20
  worldStateDbMapSizeKb?: number;
21
21
 
22
22
  /** The map size to be provided to LMDB for each world state archive tree, optional, will inherit from the general worldStateDbMapSizeKb if not specified*/
@@ -61,7 +61,7 @@ export const worldStateConfigMappings: ConfigMappingsType<WorldStateConfig> = {
61
61
  worldStateDbMapSizeKb: {
62
62
  env: 'WS_DB_MAP_SIZE_KB',
63
63
  parseEnv: (val: string | undefined) => (val ? +val : undefined),
64
- description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKB.',
64
+ description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKb.',
65
65
  },
66
66
  archiveTreeMapSizeKb: {
67
67
  env: 'ARCHIVE_TREE_MAP_SIZE_KB',
@@ -39,18 +39,18 @@ export async function createWorldState(
39
39
  | 'messageTreeMapSizeKb'
40
40
  | 'publicDataTreeMapSizeKb'
41
41
  > &
42
- Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKB' | 'l1Contracts'>,
42
+ Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKb' | 'l1Contracts'>,
43
43
  prefilledPublicData: PublicDataTreeLeaf[] = [],
44
44
  instrumentation: WorldStateInstrumentation = new WorldStateInstrumentation(getTelemetryClient()),
45
45
  ) {
46
46
  const dataDirectory = config.worldStateDataDirectory ?? config.dataDirectory;
47
- const dataStoreMapSizeKB = config.worldStateDbMapSizeKb ?? config.dataStoreMapSizeKB;
47
+ const dataStoreMapSizeKb = config.worldStateDbMapSizeKb ?? config.dataStoreMapSizeKb;
48
48
  const wsTreeMapSizes: WorldStateTreeMapSizes = {
49
- archiveTreeMapSizeKb: config.archiveTreeMapSizeKb ?? dataStoreMapSizeKB,
50
- nullifierTreeMapSizeKb: config.nullifierTreeMapSizeKb ?? dataStoreMapSizeKB,
51
- noteHashTreeMapSizeKb: config.noteHashTreeMapSizeKb ?? dataStoreMapSizeKB,
52
- messageTreeMapSizeKb: config.messageTreeMapSizeKb ?? dataStoreMapSizeKB,
53
- publicDataTreeMapSizeKb: config.publicDataTreeMapSizeKb ?? dataStoreMapSizeKB,
49
+ archiveTreeMapSizeKb: config.archiveTreeMapSizeKb ?? dataStoreMapSizeKb,
50
+ nullifierTreeMapSizeKb: config.nullifierTreeMapSizeKb ?? dataStoreMapSizeKb,
51
+ noteHashTreeMapSizeKb: config.noteHashTreeMapSizeKb ?? dataStoreMapSizeKb,
52
+ messageTreeMapSizeKb: config.messageTreeMapSizeKb ?? dataStoreMapSizeKb,
53
+ publicDataTreeMapSizeKb: config.publicDataTreeMapSizeKb ?? dataStoreMapSizeKb,
54
54
  };
55
55
 
56
56
  if (!config.l1Contracts?.rollupAddress) {