@aztec/world-state 0.84.0-nightly.20250409 → 0.84.0-nightly.20250412

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.
@@ -36,8 +36,13 @@ export class NativeWorldStateService {
36
36
  static async new(rollupAddress, dataDir, dbMapSizeKb, prefilledPublicData = [], instrumentation = new WorldStateInstrumentation(getTelemetryClient()), log = createLogger('world-state:database'), cleanup = ()=>Promise.resolve()) {
37
37
  const worldStateDirectory = join(dataDir, WORLD_STATE_DIR);
38
38
  // Create a version manager to handle versioning
39
- const versionManager = new DatabaseVersionManager(WORLD_STATE_DB_VERSION, rollupAddress, worldStateDirectory, (dir)=>{
40
- return Promise.resolve(new NativeWorldState(dir, dbMapSizeKb, prefilledPublicData, instrumentation));
39
+ const versionManager = new DatabaseVersionManager({
40
+ schemaVersion: WORLD_STATE_DB_VERSION,
41
+ rollupAddress,
42
+ dataDirectory: worldStateDirectory,
43
+ onOpen: (dir)=>{
44
+ return Promise.resolve(new NativeWorldState(dir, dbMapSizeKb, prefilledPublicData, instrumentation));
45
+ }
41
46
  });
42
47
  const [instance] = await versionManager.open();
43
48
  const worldState = new this(instance, instrumentation, log, cleanup);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/world-state",
3
- "version": "0.84.0-nightly.20250409",
3
+ "version": "0.84.0-nightly.20250412",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -62,27 +62,24 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@aztec/constants": "0.84.0-nightly.20250409",
66
- "@aztec/foundation": "0.84.0-nightly.20250409",
67
- "@aztec/kv-store": "0.84.0-nightly.20250409",
68
- "@aztec/merkle-tree": "0.84.0-nightly.20250409",
69
- "@aztec/native": "0.84.0-nightly.20250409",
70
- "@aztec/protocol-contracts": "0.84.0-nightly.20250409",
71
- "@aztec/stdlib": "0.84.0-nightly.20250409",
72
- "@aztec/telemetry-client": "0.84.0-nightly.20250409",
65
+ "@aztec/constants": "0.84.0-nightly.20250412",
66
+ "@aztec/foundation": "0.84.0-nightly.20250412",
67
+ "@aztec/kv-store": "0.84.0-nightly.20250412",
68
+ "@aztec/merkle-tree": "0.84.0-nightly.20250412",
69
+ "@aztec/native": "0.84.0-nightly.20250412",
70
+ "@aztec/protocol-contracts": "0.84.0-nightly.20250412",
71
+ "@aztec/stdlib": "0.84.0-nightly.20250412",
72
+ "@aztec/telemetry-client": "0.84.0-nightly.20250412",
73
73
  "tslib": "^2.4.0",
74
74
  "zod": "^3.23.8"
75
75
  },
76
76
  "devDependencies": {
77
- "@aztec/archiver": "0.84.0-nightly.20250409",
77
+ "@aztec/archiver": "0.84.0-nightly.20250412",
78
78
  "@jest/globals": "^29.5.0",
79
79
  "@types/jest": "^29.5.0",
80
- "@types/levelup": "^5.1.2",
81
- "@types/memdown": "^3.0.0",
82
80
  "@types/node": "^18.7.23",
83
81
  "jest": "^29.5.0",
84
82
  "jest-mock-extended": "^3.0.5",
85
- "memdown": "^6.1.1",
86
83
  "ts-node": "^10.9.1",
87
84
  "typescript": "^5.0.4"
88
85
  },
@@ -64,14 +64,14 @@ export class NativeWorldStateService implements MerkleTreeDatabase {
64
64
  ): Promise<NativeWorldStateService> {
65
65
  const worldStateDirectory = join(dataDir, WORLD_STATE_DIR);
66
66
  // Create a version manager to handle versioning
67
- const versionManager = new DatabaseVersionManager(
68
- WORLD_STATE_DB_VERSION,
67
+ const versionManager = new DatabaseVersionManager({
68
+ schemaVersion: WORLD_STATE_DB_VERSION,
69
69
  rollupAddress,
70
- worldStateDirectory,
71
- (dir: string) => {
70
+ dataDirectory: worldStateDirectory,
71
+ onOpen: (dir: string) => {
72
72
  return Promise.resolve(new NativeWorldState(dir, dbMapSizeKb, prefilledPublicData, instrumentation));
73
73
  },
74
- );
74
+ });
75
75
 
76
76
  const [instance] = await versionManager.open();
77
77
  const worldState = new this(instance, instrumentation, log, cleanup);