@aztec/world-state 0.0.1-commit.0dc957cde → 0.0.1-commit.0ec55a70b
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.
|
@@ -28,4 +28,4 @@ export declare const worldStateConfigMappings: ConfigMappingsType<WorldStateConf
|
|
|
28
28
|
* @returns The configuration values for the world state synchronizer.
|
|
29
29
|
*/
|
|
30
30
|
export declare function getWorldStateConfigFromEnv(): WorldStateConfig;
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3luY2hyb25pemVyL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsS0FBSyxrQkFBa0IsRUFJeEIsTUFBTSwwQkFBMEIsQ0FBQztBQUVsQyxxREFBcUQ7QUFDckQsTUFBTSxXQUFXLGdCQUFnQjtJQUMvQix1Q0FBdUM7SUFDdkMsOEJBQThCLEVBQUUsTUFBTSxDQUFDO0lBRXZDLDJGQUEyRjtJQUMzRiwrQkFBK0IsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUV6QyxtSkFBbUo7SUFDbkoscUJBQXFCLENBQUMsRUFBRSxNQUFNLENBQUM7SUFFL0IsMkpBQTJKO0lBQzNKLG9CQUFvQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBRTlCLDZKQUE2SjtJQUM3SixzQkFBc0IsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUVoQyw2SkFBNko7SUFDN0oscUJBQXFCLENBQUMsRUFBRSxNQUFNLENBQUM7SUFFL0IsMkpBQTJKO0lBQzNKLG9CQUFvQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBRTlCLCtKQUErSjtJQUMvSix1QkFBdUIsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUVqQywyR0FBMkc7SUFDM0csdUJBQXVCLENBQUMsRUFBRSxNQUFNLENBQUM7SUFFakMscUVBQXFFO0lBQ3JFLDJCQUEyQixFQUFFLE1BQU0sQ0FBQztDQUNyQztBQUVELGVBQU8sTUFBTSx3QkFBd0IsRUFBRSxrQkFBa0IsQ0FBQyxnQkFBZ0IsQ0F5RHpFLENBQUM7QUFFRjs7O0dBR0c7QUFDSCx3QkFBZ0IsMEJBQTBCLElBQUksZ0JBQWdCLENBRTdEIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/synchronizer/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/synchronizer/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,0BAA0B,CAAC;AAElC,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IAEvC,2FAA2F;IAC3F,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC,mJAAmJ;IACnJ,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,2JAA2J;IAC3J,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,6JAA6J;IAC7J,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,6JAA6J;IAC7J,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,2JAA2J;IAC3J,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,+JAA+J;IAC/J,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC,2GAA2G;IAC3G,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC,qEAAqE;IACrE,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,wBAAwB,EAAE,kBAAkB,CAAC,gBAAgB,CAyDzE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,gBAAgB,CAE7D"}
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import { getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config';
|
|
1
|
+
import { getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper } from '@aztec/foundation/config';
|
|
2
2
|
export const worldStateConfigMappings = {
|
|
3
3
|
worldStateBlockCheckIntervalMS: {
|
|
4
4
|
env: 'WS_BLOCK_CHECK_INTERVAL_MS',
|
|
5
|
-
|
|
6
|
-
defaultValue: 100,
|
|
5
|
+
...numberConfigHelper(100),
|
|
7
6
|
description: 'The frequency in which to check.'
|
|
8
7
|
},
|
|
9
8
|
worldStateBlockRequestBatchSize: {
|
|
10
9
|
env: 'WS_BLOCK_REQUEST_BATCH_SIZE',
|
|
11
|
-
|
|
10
|
+
...optionalNumberConfigHelper(),
|
|
12
11
|
description: 'Size of the batch for each get-blocks request from the synchronizer to the archiver.'
|
|
13
12
|
},
|
|
14
13
|
worldStateDbMapSizeKb: {
|
|
15
14
|
env: 'WS_DB_MAP_SIZE_KB',
|
|
16
|
-
|
|
15
|
+
...optionalNumberConfigHelper(),
|
|
17
16
|
description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKb.'
|
|
18
17
|
},
|
|
19
18
|
archiveTreeMapSizeKb: {
|
|
20
19
|
env: 'ARCHIVE_TREE_MAP_SIZE_KB',
|
|
21
|
-
|
|
20
|
+
...optionalNumberConfigHelper(),
|
|
22
21
|
description: 'The maximum possible size of the world state archive tree in KB. Overwrites the general worldStateDbMapSizeKb.'
|
|
23
22
|
},
|
|
24
23
|
nullifierTreeMapSizeKb: {
|
|
25
24
|
env: 'NULLIFIER_TREE_MAP_SIZE_KB',
|
|
26
|
-
|
|
25
|
+
...optionalNumberConfigHelper(),
|
|
27
26
|
description: 'The maximum possible size of the world state nullifier tree in KB. Overwrites the general worldStateDbMapSizeKb.'
|
|
28
27
|
},
|
|
29
28
|
noteHashTreeMapSizeKb: {
|
|
30
29
|
env: 'NOTE_HASH_TREE_MAP_SIZE_KB',
|
|
31
|
-
|
|
30
|
+
...optionalNumberConfigHelper(),
|
|
32
31
|
description: 'The maximum possible size of the world state note hash tree in KB. Overwrites the general worldStateDbMapSizeKb.'
|
|
33
32
|
},
|
|
34
33
|
messageTreeMapSizeKb: {
|
|
35
34
|
env: 'MESSAGE_TREE_MAP_SIZE_KB',
|
|
36
|
-
|
|
35
|
+
...optionalNumberConfigHelper(),
|
|
37
36
|
description: 'The maximum possible size of the world state message tree in KB. Overwrites the general worldStateDbMapSizeKb.'
|
|
38
37
|
},
|
|
39
38
|
publicDataTreeMapSizeKb: {
|
|
40
39
|
env: 'PUBLIC_DATA_TREE_MAP_SIZE_KB',
|
|
41
|
-
|
|
40
|
+
...optionalNumberConfigHelper(),
|
|
42
41
|
description: 'The maximum possible size of the world state public data tree in KB. Overwrites the general worldStateDbMapSizeKb.'
|
|
43
42
|
},
|
|
44
43
|
worldStateDataDirectory: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/world-state",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.0ec55a70b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -64,18 +64,18 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/constants": "0.0.1-commit.
|
|
68
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
69
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
70
|
-
"@aztec/native": "0.0.1-commit.
|
|
71
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
72
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
73
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
67
|
+
"@aztec/constants": "0.0.1-commit.0ec55a70b",
|
|
68
|
+
"@aztec/foundation": "0.0.1-commit.0ec55a70b",
|
|
69
|
+
"@aztec/kv-store": "0.0.1-commit.0ec55a70b",
|
|
70
|
+
"@aztec/native": "0.0.1-commit.0ec55a70b",
|
|
71
|
+
"@aztec/protocol-contracts": "0.0.1-commit.0ec55a70b",
|
|
72
|
+
"@aztec/stdlib": "0.0.1-commit.0ec55a70b",
|
|
73
|
+
"@aztec/telemetry-client": "0.0.1-commit.0ec55a70b",
|
|
74
74
|
"tslib": "^2.4.0",
|
|
75
75
|
"zod": "^3.23.8"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
78
|
+
"@aztec/archiver": "0.0.1-commit.0ec55a70b",
|
|
79
79
|
"@jest/globals": "^30.0.0",
|
|
80
80
|
"@types/jest": "^30.0.0",
|
|
81
81
|
"@types/node": "^22.15.17",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type ConfigMappingsType,
|
|
3
|
+
getConfigFromMappings,
|
|
4
|
+
numberConfigHelper,
|
|
5
|
+
optionalNumberConfigHelper,
|
|
6
|
+
} from '@aztec/foundation/config';
|
|
2
7
|
|
|
3
8
|
/** World State synchronizer configuration values. */
|
|
4
9
|
export interface WorldStateConfig {
|
|
@@ -36,47 +41,46 @@ export interface WorldStateConfig {
|
|
|
36
41
|
export const worldStateConfigMappings: ConfigMappingsType<WorldStateConfig> = {
|
|
37
42
|
worldStateBlockCheckIntervalMS: {
|
|
38
43
|
env: 'WS_BLOCK_CHECK_INTERVAL_MS',
|
|
39
|
-
|
|
40
|
-
defaultValue: 100,
|
|
44
|
+
...numberConfigHelper(100),
|
|
41
45
|
description: 'The frequency in which to check.',
|
|
42
46
|
},
|
|
43
47
|
worldStateBlockRequestBatchSize: {
|
|
44
48
|
env: 'WS_BLOCK_REQUEST_BATCH_SIZE',
|
|
45
|
-
|
|
49
|
+
...optionalNumberConfigHelper(),
|
|
46
50
|
description: 'Size of the batch for each get-blocks request from the synchronizer to the archiver.',
|
|
47
51
|
},
|
|
48
52
|
worldStateDbMapSizeKb: {
|
|
49
53
|
env: 'WS_DB_MAP_SIZE_KB',
|
|
50
|
-
|
|
54
|
+
...optionalNumberConfigHelper(),
|
|
51
55
|
description: 'The maximum possible size of the world state DB in KB. Overwrites the general dataStoreMapSizeKb.',
|
|
52
56
|
},
|
|
53
57
|
archiveTreeMapSizeKb: {
|
|
54
58
|
env: 'ARCHIVE_TREE_MAP_SIZE_KB',
|
|
55
|
-
|
|
59
|
+
...optionalNumberConfigHelper(),
|
|
56
60
|
description:
|
|
57
61
|
'The maximum possible size of the world state archive tree in KB. Overwrites the general worldStateDbMapSizeKb.',
|
|
58
62
|
},
|
|
59
63
|
nullifierTreeMapSizeKb: {
|
|
60
64
|
env: 'NULLIFIER_TREE_MAP_SIZE_KB',
|
|
61
|
-
|
|
65
|
+
...optionalNumberConfigHelper(),
|
|
62
66
|
description:
|
|
63
67
|
'The maximum possible size of the world state nullifier tree in KB. Overwrites the general worldStateDbMapSizeKb.',
|
|
64
68
|
},
|
|
65
69
|
noteHashTreeMapSizeKb: {
|
|
66
70
|
env: 'NOTE_HASH_TREE_MAP_SIZE_KB',
|
|
67
|
-
|
|
71
|
+
...optionalNumberConfigHelper(),
|
|
68
72
|
description:
|
|
69
73
|
'The maximum possible size of the world state note hash tree in KB. Overwrites the general worldStateDbMapSizeKb.',
|
|
70
74
|
},
|
|
71
75
|
messageTreeMapSizeKb: {
|
|
72
76
|
env: 'MESSAGE_TREE_MAP_SIZE_KB',
|
|
73
|
-
|
|
77
|
+
...optionalNumberConfigHelper(),
|
|
74
78
|
description:
|
|
75
79
|
'The maximum possible size of the world state message tree in KB. Overwrites the general worldStateDbMapSizeKb.',
|
|
76
80
|
},
|
|
77
81
|
publicDataTreeMapSizeKb: {
|
|
78
82
|
env: 'PUBLIC_DATA_TREE_MAP_SIZE_KB',
|
|
79
|
-
|
|
83
|
+
...optionalNumberConfigHelper(),
|
|
80
84
|
description:
|
|
81
85
|
'The maximum possible size of the world state public data tree in KB. Overwrites the general worldStateDbMapSizeKb.',
|
|
82
86
|
},
|