@aztec/world-state 0.0.1-commit.343b43af6 → 0.0.1-commit.350e0a4d
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.
- package/dest/instrumentation/instrumentation.d.ts +4 -3
- package/dest/instrumentation/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation/instrumentation.js +4 -9
- package/dest/native/fork_checkpoint.d.ts +7 -1
- package/dest/native/fork_checkpoint.d.ts.map +1 -1
- package/dest/native/fork_checkpoint.js +15 -3
- package/dest/native/ipc_world_state_instance.d.ts +89 -0
- package/dest/native/ipc_world_state_instance.d.ts.map +1 -0
- package/dest/native/ipc_world_state_instance.js +662 -0
- package/dest/native/merkle_trees_facade.d.ts +11 -7
- package/dest/native/merkle_trees_facade.d.ts.map +1 -1
- package/dest/native/merkle_trees_facade.js +62 -114
- package/dest/native/message.d.ts +14 -222
- package/dest/native/message.d.ts.map +1 -1
- package/dest/native/message.js +0 -42
- package/dest/native/native_world_state.d.ts +19 -7
- package/dest/native/native_world_state.d.ts.map +1 -1
- package/dest/native/native_world_state.js +116 -58
- package/dest/native/native_world_state_instance.d.ts +60 -41
- package/dest/native/native_world_state_instance.d.ts.map +1 -1
- package/dest/native/native_world_state_instance.js +5 -202
- package/dest/native/world_state_operation.d.ts +7 -0
- package/dest/native/world_state_operation.d.ts.map +1 -0
- package/dest/native/world_state_operation.js +5 -0
- package/dest/synchronizer/config.d.ts +1 -1
- package/dest/synchronizer/config.d.ts.map +1 -1
- package/dest/synchronizer/config.js +9 -10
- package/dest/synchronizer/errors.d.ts +8 -1
- package/dest/synchronizer/errors.d.ts.map +1 -1
- package/dest/synchronizer/errors.js +8 -1
- package/dest/synchronizer/factory.d.ts +4 -4
- package/dest/synchronizer/factory.d.ts.map +1 -1
- package/dest/synchronizer/factory.js +7 -6
- package/dest/synchronizer/index.d.ts +2 -1
- package/dest/synchronizer/index.d.ts.map +1 -1
- package/dest/synchronizer/index.js +1 -0
- package/dest/synchronizer/server_world_state_synchronizer.d.ts +13 -8
- package/dest/synchronizer/server_world_state_synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/server_world_state_synchronizer.js +108 -44
- package/dest/test/utils.d.ts +1 -1
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +6 -1
- package/dest/testing.d.ts +4 -3
- package/dest/testing.d.ts.map +1 -1
- package/dest/testing.js +14 -7
- package/dest/world-state-db/merkle_tree_db.d.ts +1 -10
- package/dest/world-state-db/merkle_tree_db.d.ts.map +1 -1
- package/package.json +14 -11
- package/src/instrumentation/instrumentation.ts +6 -18
- package/src/native/fork_checkpoint.ts +19 -3
- package/src/native/ipc_world_state_instance.ts +834 -0
- package/src/native/merkle_trees_facade.ts +88 -108
- package/src/native/message.ts +13 -287
- package/src/native/native_world_state.ts +132 -97
- package/src/native/native_world_state_instance.ts +98 -280
- package/src/native/world_state_operation.ts +33 -0
- package/src/synchronizer/config.ts +14 -10
- package/src/synchronizer/errors.ts +8 -0
- package/src/synchronizer/factory.ts +11 -10
- package/src/synchronizer/index.ts +1 -0
- package/src/synchronizer/server_world_state_synchronizer.ts +126 -43
- package/src/test/utils.ts +10 -1
- package/src/testing.ts +12 -10
- package/src/world-state-db/merkle_tree_db.ts +0 -10
- package/dest/native/world_state_ops_queue.d.ts +0 -19
- package/dest/native/world_state_ops_queue.d.ts.map +0 -1
- package/dest/native/world_state_ops_queue.js +0 -146
- package/src/native/world_state_ops_queue.ts +0 -190
|
@@ -1,55 +1,72 @@
|
|
|
1
|
+
var _computedKey;
|
|
1
2
|
import { MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
|
|
2
3
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
4
|
import { fromEntries, padArrayEnd } from '@aztec/foundation/collection';
|
|
4
5
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
|
-
import { tryRmDir } from '@aztec/foundation/fs';
|
|
7
6
|
import { createLogger } from '@aztec/foundation/log';
|
|
8
7
|
import { DatabaseVersionManager } from '@aztec/stdlib/database-version/manager';
|
|
9
8
|
import { MerkleTreeId, NullifierLeaf, PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
10
|
-
import { BlockHeader, PartialStateReference, StateReference } from '@aztec/stdlib/tx';
|
|
11
|
-
import { WorldStateRevision } from '@aztec/stdlib/world-state';
|
|
9
|
+
import { BlockHeader, GlobalVariables, PartialStateReference, StateReference } from '@aztec/stdlib/tx';
|
|
10
|
+
import { EMPTY_GENESIS_DATA, WorldStateRevision } from '@aztec/stdlib/world-state';
|
|
12
11
|
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
13
12
|
import assert from 'assert/strict';
|
|
14
|
-
import { mkdtemp, rm } from 'fs/promises';
|
|
13
|
+
import { mkdir, mkdtemp, rm } from 'fs/promises';
|
|
15
14
|
import { tmpdir } from 'os';
|
|
16
15
|
import { join } from 'path';
|
|
17
16
|
import { WorldStateInstrumentation } from '../instrumentation/instrumentation.js';
|
|
17
|
+
import { IpcWorldState } from './ipc_world_state_instance.js';
|
|
18
18
|
import { MerkleTreesFacade, MerkleTreesForkFacade, serializeLeaf } from './merkle_trees_facade.js';
|
|
19
|
-
import {
|
|
20
|
-
import { NativeWorldState } from './native_world_state_instance.js';
|
|
19
|
+
import { blockStateReference, sanitizeFullStatus, sanitizeSummary, treeStateReferenceToSnapshot } from './message.js';
|
|
21
20
|
// The current version of the world state database schema
|
|
22
21
|
// Increment this when making incompatible changes to the database schema
|
|
23
22
|
export const WORLD_STATE_DB_VERSION = 2; // The initial version
|
|
24
23
|
export const WORLD_STATE_DIR = 'world_state';
|
|
24
|
+
_computedKey = Symbol.asyncDispose;
|
|
25
25
|
export class NativeWorldStateService {
|
|
26
26
|
instance;
|
|
27
27
|
worldStateInstrumentation;
|
|
28
28
|
log;
|
|
29
|
+
genesis;
|
|
29
30
|
cleanup;
|
|
31
|
+
recreateInstance;
|
|
30
32
|
initialHeader;
|
|
31
33
|
// This is read heavily and only changes when data is persisted, so we cache it
|
|
32
34
|
cachedStatusSummary;
|
|
33
|
-
constructor(instance, worldStateInstrumentation, log, cleanup = ()=>Promise.resolve()){
|
|
35
|
+
constructor(instance, worldStateInstrumentation, log, genesis = EMPTY_GENESIS_DATA, cleanup = ()=>Promise.resolve(), /** Factory to recreate a fresh IpcWorldState after clear(). */ recreateInstance){
|
|
34
36
|
this.instance = instance;
|
|
35
37
|
this.worldStateInstrumentation = worldStateInstrumentation;
|
|
36
38
|
this.log = log;
|
|
39
|
+
this.genesis = genesis;
|
|
37
40
|
this.cleanup = cleanup;
|
|
41
|
+
this.recreateInstance = recreateInstance;
|
|
38
42
|
}
|
|
39
|
-
static async new(rollupAddress, dataDir, wsTreeMapSizes,
|
|
43
|
+
static async new(rollupAddress, dataDir, wsTreeMapSizes, genesis = EMPTY_GENESIS_DATA, instrumentation = new WorldStateInstrumentation(getTelemetryClient()), bindings, cleanup = ()=>Promise.resolve()) {
|
|
44
|
+
for (const [key, value] of Object.entries(wsTreeMapSizes)){
|
|
45
|
+
if (value <= 0) {
|
|
46
|
+
throw new Error(`Map size must be a positive number, got ${value} for ${key}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
40
49
|
const log = createLogger('world-state:database', bindings);
|
|
41
50
|
const worldStateDirectory = join(dataDir, WORLD_STATE_DIR);
|
|
42
|
-
// Create a version manager to handle versioning
|
|
43
51
|
const versionManager = new DatabaseVersionManager({
|
|
44
52
|
schemaVersion: WORLD_STATE_DB_VERSION,
|
|
45
53
|
rollupAddress,
|
|
46
54
|
dataDirectory: worldStateDirectory,
|
|
47
|
-
onOpen: (dir)=>
|
|
48
|
-
return Promise.resolve(new NativeWorldState(dir, wsTreeMapSizes, prefilledPublicData, instrumentation, bindings));
|
|
49
|
-
}
|
|
55
|
+
onOpen: (dir)=>IpcWorldState.spawn(dir, wsTreeMapSizes, genesis, instrumentation, bindings)
|
|
50
56
|
});
|
|
51
57
|
const [instance] = await versionManager.open();
|
|
52
|
-
const
|
|
58
|
+
const recreateInstance = async ()=>{
|
|
59
|
+
await rm(worldStateDirectory, {
|
|
60
|
+
recursive: true,
|
|
61
|
+
force: true,
|
|
62
|
+
maxRetries: 3
|
|
63
|
+
});
|
|
64
|
+
await mkdir(worldStateDirectory, {
|
|
65
|
+
recursive: true
|
|
66
|
+
});
|
|
67
|
+
return IpcWorldState.spawn(worldStateDirectory, wsTreeMapSizes, genesis, instrumentation, bindings);
|
|
68
|
+
};
|
|
69
|
+
const worldState = new this(instance, instrumentation, log, genesis, cleanup, recreateInstance);
|
|
53
70
|
try {
|
|
54
71
|
await worldState.init();
|
|
55
72
|
} catch (e) {
|
|
@@ -58,10 +75,14 @@ export class NativeWorldStateService {
|
|
|
58
75
|
}
|
|
59
76
|
return worldState;
|
|
60
77
|
}
|
|
61
|
-
static async tmp(
|
|
78
|
+
static async tmp(cleanupTmpDir = true, genesis = EMPTY_GENESIS_DATA, instrumentation = new WorldStateInstrumentation(getTelemetryClient()), bindings) {
|
|
62
79
|
const log = createLogger('world-state:database', bindings);
|
|
63
80
|
const dataDir = await mkdtemp(join(tmpdir(), 'aztec-world-state-'));
|
|
64
|
-
|
|
81
|
+
// Temporary (test/dev) world states are small and short-lived. Keep the LMDB
|
|
82
|
+
// map sizes in the MB range: with the IPC backend each tmp() spawns a separate
|
|
83
|
+
// aztec-wsdb that maps these per tree, and oversized maps add real cold-start
|
|
84
|
+
// I/O under parallel CI load. 256 MB/tree is ample for tests.
|
|
85
|
+
const dbMapSizeKb = 256 * 1024;
|
|
65
86
|
const worldStateTreeMapSizes = {
|
|
66
87
|
archiveTreeMapSizeKb: dbMapSizeKb,
|
|
67
88
|
nullifierTreeMapSizeKb: dbMapSizeKb,
|
|
@@ -70,7 +91,7 @@ export class NativeWorldStateService {
|
|
|
70
91
|
publicDataTreeMapSizeKb: dbMapSizeKb
|
|
71
92
|
};
|
|
72
93
|
log.debug(`Created temporary world state database at: ${dataDir} with tree map size: ${dbMapSizeKb}`);
|
|
73
|
-
|
|
94
|
+
const instance = await IpcWorldState.spawn(dataDir, worldStateTreeMapSizes, genesis, instrumentation, bindings);
|
|
74
95
|
const cleanup = async ()=>{
|
|
75
96
|
if (cleanupTmpDir) {
|
|
76
97
|
await rm(dataDir, {
|
|
@@ -83,7 +104,35 @@ export class NativeWorldStateService {
|
|
|
83
104
|
log.debug(`Leaving temporary world state database: ${dataDir}`);
|
|
84
105
|
}
|
|
85
106
|
};
|
|
86
|
-
|
|
107
|
+
const recreateInstance = async ()=>{
|
|
108
|
+
await rm(dataDir, {
|
|
109
|
+
recursive: true,
|
|
110
|
+
force: true,
|
|
111
|
+
maxRetries: 3
|
|
112
|
+
});
|
|
113
|
+
await mkdir(dataDir, {
|
|
114
|
+
recursive: true
|
|
115
|
+
});
|
|
116
|
+
return IpcWorldState.spawn(dataDir, worldStateTreeMapSizes, genesis, instrumentation, bindings);
|
|
117
|
+
};
|
|
118
|
+
const worldState = new this(instance, instrumentation, log, genesis, cleanup, recreateInstance);
|
|
119
|
+
try {
|
|
120
|
+
await worldState.init();
|
|
121
|
+
} catch (e) {
|
|
122
|
+
log.error(`Error initializing tmp world state: ${e}`);
|
|
123
|
+
throw e;
|
|
124
|
+
}
|
|
125
|
+
return worldState;
|
|
126
|
+
}
|
|
127
|
+
static ephemeral(genesis = EMPTY_GENESIS_DATA, instrumentation = new WorldStateInstrumentation(getTelemetryClient()), bindings) {
|
|
128
|
+
return this.tmp(/*cleanupTmpDir=*/ true, genesis, instrumentation, bindings);
|
|
129
|
+
}
|
|
130
|
+
static async fromIpc(wsdbBackend, instrumentation = new WorldStateInstrumentation(getTelemetryClient()), bindings, genesis = EMPTY_GENESIS_DATA, cleanup = ()=>Promise.resolve(), recreateInstance) {
|
|
131
|
+
const log = createLogger('world-state:database', bindings);
|
|
132
|
+
const instance = new IpcWorldState(wsdbBackend, instrumentation, bindings);
|
|
133
|
+
const worldState = new this(instance, instrumentation, log, genesis, cleanup, recreateInstance);
|
|
134
|
+
await worldState.init();
|
|
135
|
+
return worldState;
|
|
87
136
|
}
|
|
88
137
|
async init() {
|
|
89
138
|
const status = await this.getStatusSummary();
|
|
@@ -100,16 +149,27 @@ export class NativeWorldStateService {
|
|
|
100
149
|
// the initial header _must_ be the first element in the archive tree
|
|
101
150
|
// if this assertion fails, check that the hashing done in Header in yarn-project matches the initial header hash done in world_state.cpp
|
|
102
151
|
const indices = await committed.findLeafIndices(MerkleTreeId.ARCHIVE, [
|
|
103
|
-
|
|
152
|
+
await this.initialHeader.hash()
|
|
104
153
|
]);
|
|
105
154
|
const initialHeaderIndex = indices[0];
|
|
106
155
|
assert.strictEqual(initialHeaderIndex, 0n, 'Invalid initial archive state');
|
|
107
156
|
}
|
|
108
157
|
async clear() {
|
|
158
|
+
if (!this.recreateInstance) {
|
|
159
|
+
throw new Error('clear() is not available for externally-managed IPC backends');
|
|
160
|
+
}
|
|
161
|
+
this.log.warn('Clearing world state: shutting down WSDB, deleting data, and recreating');
|
|
109
162
|
await this.instance.close();
|
|
110
163
|
this.cachedStatusSummary = undefined;
|
|
111
|
-
|
|
112
|
-
|
|
164
|
+
this.instance = await this.recreateInstance();
|
|
165
|
+
await this.init();
|
|
166
|
+
this.log.info('World state cleared and reinitialized from genesis');
|
|
167
|
+
}
|
|
168
|
+
/** Returns the IPC path of the underlying IPC backend, if available. */ getIpcPath() {
|
|
169
|
+
if (this.instance instanceof IpcWorldState) {
|
|
170
|
+
return this.instance.getIpcPath();
|
|
171
|
+
}
|
|
172
|
+
throw new Error('getIpcPath() is only available with IPC world state');
|
|
113
173
|
}
|
|
114
174
|
getCommitted() {
|
|
115
175
|
return new MerkleTreesFacade(this.instance, this.initialHeader, WorldStateRevision.empty());
|
|
@@ -118,12 +178,11 @@ export class NativeWorldStateService {
|
|
|
118
178
|
return new MerkleTreesFacade(this.instance, this.initialHeader, new WorldStateRevision(/*forkId=*/ 0, /* blockNumber=*/ blockNumber, /* includeUncommitted=*/ false));
|
|
119
179
|
}
|
|
120
180
|
async fork(blockNumber, opts = {}) {
|
|
121
|
-
const
|
|
181
|
+
const forkId = await this.instance.createFork({
|
|
122
182
|
latest: blockNumber === undefined,
|
|
123
|
-
blockNumber: blockNumber ?? BlockNumber.ZERO
|
|
124
|
-
canonical: true
|
|
183
|
+
blockNumber: blockNumber ?? BlockNumber.ZERO
|
|
125
184
|
});
|
|
126
|
-
return new MerkleTreesForkFacade(this.instance, this.initialHeader, new WorldStateRevision(/*forkId=*/
|
|
185
|
+
return new MerkleTreesForkFacade(this.instance, this.initialHeader, new WorldStateRevision(/*forkId=*/ forkId, /* blockNumber=*/ WorldStateRevision.LATEST, /* includeUncommitted=*/ true), opts);
|
|
127
186
|
}
|
|
128
187
|
getInitialHeader() {
|
|
129
188
|
return this.initialHeader;
|
|
@@ -147,29 +206,42 @@ export class NativeWorldStateService {
|
|
|
147
206
|
});
|
|
148
207
|
});
|
|
149
208
|
try {
|
|
150
|
-
|
|
209
|
+
const status = await this.instance.syncBlock({
|
|
151
210
|
blockNumber: l2Block.number,
|
|
152
|
-
blockHeaderHash: await l2Block.hash(),
|
|
211
|
+
blockHeaderHash: (await l2Block.hash()).toBuffer(),
|
|
212
|
+
// Forwarded so the native sync verifies the archive root against canonical and rejects a divergent tree.
|
|
213
|
+
expectedArchiveRoot: l2Block.archive.root.toBuffer(),
|
|
214
|
+
expectedPreviousArchiveRoot: l2Block.header.lastArchive.root.toBuffer(),
|
|
153
215
|
paddedL1ToL2Messages: paddedL1ToL2Messages.map(serializeLeaf),
|
|
154
216
|
paddedNoteHashes: paddedNoteHashes.map(serializeLeaf),
|
|
155
217
|
paddedNullifiers: paddedNullifiers.map(serializeLeaf),
|
|
156
218
|
publicDataWrites: publicDataWrites.map(serializeLeaf),
|
|
157
|
-
blockStateRef: blockStateReference(l2Block.header.state)
|
|
158
|
-
|
|
159
|
-
|
|
219
|
+
blockStateRef: blockStateReference(l2Block.header.state)
|
|
220
|
+
});
|
|
221
|
+
return this.sanitizeAndCacheSummaryFromFull(status);
|
|
160
222
|
} catch (err) {
|
|
223
|
+
this.deleteCachedSummary();
|
|
161
224
|
this.worldStateInstrumentation.incCriticalErrors('synch_pending_block');
|
|
162
225
|
throw err;
|
|
163
226
|
}
|
|
164
227
|
}
|
|
165
228
|
async close() {
|
|
166
|
-
|
|
167
|
-
|
|
229
|
+
try {
|
|
230
|
+
await this.instance.close();
|
|
231
|
+
} finally{
|
|
232
|
+
await this.cleanup();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
async [_computedKey]() {
|
|
236
|
+
await this.close();
|
|
168
237
|
}
|
|
169
238
|
async buildInitialHeader() {
|
|
170
239
|
const state = await this.getInitialStateReference();
|
|
171
240
|
return BlockHeader.empty({
|
|
172
|
-
state
|
|
241
|
+
state,
|
|
242
|
+
globalVariables: GlobalVariables.empty({
|
|
243
|
+
timestamp: this.genesis.genesisTimestamp
|
|
244
|
+
})
|
|
173
245
|
});
|
|
174
246
|
}
|
|
175
247
|
sanitizeAndCacheSummaryFromFull(response) {
|
|
@@ -186,7 +258,7 @@ export class NativeWorldStateService {
|
|
|
186
258
|
};
|
|
187
259
|
return sanitized;
|
|
188
260
|
}
|
|
189
|
-
deleteCachedSummary(
|
|
261
|
+
deleteCachedSummary() {
|
|
190
262
|
this.cachedStatusSummary = undefined;
|
|
191
263
|
}
|
|
192
264
|
/**
|
|
@@ -195,11 +267,9 @@ export class NativeWorldStateService {
|
|
|
195
267
|
* @returns The new WorldStateStatus
|
|
196
268
|
*/ async setFinalized(toBlockNumber) {
|
|
197
269
|
try {
|
|
198
|
-
await this.instance.
|
|
199
|
-
toBlockNumber,
|
|
200
|
-
canonical: true
|
|
201
|
-
}, this.sanitizeAndCacheSummary.bind(this), this.deleteCachedSummary.bind(this));
|
|
270
|
+
this.sanitizeAndCacheSummary(await this.instance.finalizeBlocks(toBlockNumber));
|
|
202
271
|
} catch (err) {
|
|
272
|
+
this.deleteCachedSummary();
|
|
203
273
|
this.worldStateInstrumentation.incCriticalErrors('finalize_block');
|
|
204
274
|
throw err;
|
|
205
275
|
}
|
|
@@ -211,11 +281,9 @@ export class NativeWorldStateService {
|
|
|
211
281
|
* @returns The new WorldStateStatus
|
|
212
282
|
*/ async removeHistoricalBlocks(toBlockNumber) {
|
|
213
283
|
try {
|
|
214
|
-
return await this.instance.
|
|
215
|
-
toBlockNumber,
|
|
216
|
-
canonical: true
|
|
217
|
-
}, this.sanitizeAndCacheSummaryFromFull.bind(this), this.deleteCachedSummary.bind(this));
|
|
284
|
+
return this.sanitizeAndCacheSummaryFromFull(await this.instance.removeHistoricalBlocks(toBlockNumber));
|
|
218
285
|
} catch (err) {
|
|
286
|
+
this.deleteCachedSummary();
|
|
219
287
|
this.worldStateInstrumentation.incCriticalErrors('prune_historical_block');
|
|
220
288
|
throw err;
|
|
221
289
|
}
|
|
@@ -226,11 +294,9 @@ export class NativeWorldStateService {
|
|
|
226
294
|
* @returns The new WorldStateStatus
|
|
227
295
|
*/ async unwindBlocks(toBlockNumber) {
|
|
228
296
|
try {
|
|
229
|
-
return await this.instance.
|
|
230
|
-
toBlockNumber,
|
|
231
|
-
canonical: true
|
|
232
|
-
}, this.sanitizeAndCacheSummaryFromFull.bind(this), this.deleteCachedSummary.bind(this));
|
|
297
|
+
return this.sanitizeAndCacheSummaryFromFull(await this.instance.unwindBlocks(toBlockNumber));
|
|
233
298
|
} catch (err) {
|
|
299
|
+
this.deleteCachedSummary();
|
|
234
300
|
this.worldStateInstrumentation.incCriticalErrors('prune_pending_block');
|
|
235
301
|
throw err;
|
|
236
302
|
}
|
|
@@ -241,25 +307,17 @@ export class NativeWorldStateService {
|
|
|
241
307
|
...this.cachedStatusSummary
|
|
242
308
|
};
|
|
243
309
|
}
|
|
244
|
-
return await this.instance.
|
|
245
|
-
canonical: true
|
|
246
|
-
}, this.sanitizeAndCacheSummary.bind(this));
|
|
310
|
+
return this.sanitizeAndCacheSummary(await this.instance.getStatus());
|
|
247
311
|
}
|
|
248
312
|
updateLeaf(_treeId, _leaf, _index) {
|
|
249
313
|
return Promise.reject(new Error('Method not implemented'));
|
|
250
314
|
}
|
|
251
315
|
async getInitialStateReference() {
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
});
|
|
255
|
-
return new StateReference(treeStateReferenceToSnapshot(resp.state[MerkleTreeId.L1_TO_L2_MESSAGE_TREE]), new PartialStateReference(treeStateReferenceToSnapshot(resp.state[MerkleTreeId.NOTE_HASH_TREE]), treeStateReferenceToSnapshot(resp.state[MerkleTreeId.NULLIFIER_TREE]), treeStateReferenceToSnapshot(resp.state[MerkleTreeId.PUBLIC_DATA_TREE])));
|
|
316
|
+
const state = await this.instance.getInitialStateReference();
|
|
317
|
+
return new StateReference(treeStateReferenceToSnapshot(state[MerkleTreeId.L1_TO_L2_MESSAGE_TREE]), new PartialStateReference(treeStateReferenceToSnapshot(state[MerkleTreeId.NOTE_HASH_TREE]), treeStateReferenceToSnapshot(state[MerkleTreeId.NULLIFIER_TREE]), treeStateReferenceToSnapshot(state[MerkleTreeId.PUBLIC_DATA_TREE])));
|
|
256
318
|
}
|
|
257
319
|
async backupTo(dstPath, compact = true) {
|
|
258
|
-
await this.instance.
|
|
259
|
-
dstPath,
|
|
260
|
-
compact,
|
|
261
|
-
canonical: true
|
|
262
|
-
});
|
|
320
|
+
await this.instance.copyStores(dstPath, compact);
|
|
263
321
|
return fromEntries(NATIVE_WORLD_STATE_DBS.map(([name, dir])=>[
|
|
264
322
|
name,
|
|
265
323
|
join(dstPath, dir, 'data.mdb')
|
|
@@ -1,49 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
call<T extends WorldStateMessageType>(messageType: T, body: WorldStateRequest[T] & WorldStateRequestCategories): Promise<WorldStateResponse[T]>;
|
|
8
|
-
getHandle(): any;
|
|
9
|
-
}
|
|
1
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import type { IndexedTreeId, TreeInfo } from '@aztec/stdlib/interfaces/server';
|
|
4
|
+
import type { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
5
|
+
import type { WorldStateRevision } from '@aztec/stdlib/world-state';
|
|
6
|
+
import type { BlockStateReference, SerializedBatchInsertionResult, SerializedIndexedLeaf, SerializedLeafValue, SerializedSequentialInsertionResult, SerializedSiblingPathAndIndex, TreeStateReference, WorldStateStatusFull, WorldStateStatusSummary } from './message.js';
|
|
10
7
|
/**
|
|
11
|
-
*
|
|
8
|
+
* Backend-agnostic handle to a running aztec-wsdb world state, accessed by the TS layer.
|
|
9
|
+
*
|
|
10
|
+
* The legacy in-process NAPI implementation has been removed; the C++ AVM (NAPI) now connects to
|
|
11
|
+
* the same aztec-wsdb process using the IPC path returned by {@link getIpcPath}.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
export interface NativeWorldStateInstance {
|
|
14
|
+
getTreeInfo(treeId: MerkleTreeId, revision: WorldStateRevision): Promise<TreeInfo>;
|
|
15
|
+
getStateReference(revision: WorldStateRevision): Promise<Record<number, TreeStateReference>>;
|
|
16
|
+
getInitialStateReference(): Promise<Record<number, TreeStateReference>>;
|
|
17
|
+
getLeafValue(treeId: MerkleTreeId, revision: WorldStateRevision, leafIndex: bigint): Promise<SerializedLeafValue | undefined>;
|
|
18
|
+
getLeafPreimage(treeId: IndexedTreeId, revision: WorldStateRevision, leafIndex: bigint): Promise<SerializedIndexedLeaf | undefined>;
|
|
19
|
+
getSiblingPath(treeId: MerkleTreeId, revision: WorldStateRevision, leafIndex: bigint): Promise<Buffer[]>;
|
|
20
|
+
getBlockNumbersForLeafIndices(treeId: MerkleTreeId, revision: WorldStateRevision, leafIndices: bigint[]): Promise<(bigint | undefined)[]>;
|
|
21
|
+
findLeafIndices(treeId: MerkleTreeId, revision: WorldStateRevision, leaves: SerializedLeafValue[], startIndex: bigint): Promise<(bigint | undefined)[]>;
|
|
22
|
+
findLowLeaf(treeId: IndexedTreeId, revision: WorldStateRevision, key: Fr): Promise<{
|
|
23
|
+
index: bigint;
|
|
24
|
+
alreadyPresent: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
findSiblingPaths(treeId: MerkleTreeId, revision: WorldStateRevision, leaves: SerializedLeafValue[]): Promise<(SerializedSiblingPathAndIndex | undefined)[]>;
|
|
27
|
+
updateArchive(forkId: number, blockStateRef: BlockStateReference, blockHeaderHash: Buffer): Promise<void>;
|
|
28
|
+
appendLeaves(treeId: MerkleTreeId, forkId: number, leaves: SerializedLeafValue[]): Promise<void>;
|
|
29
|
+
batchInsert(treeId: IndexedTreeId, forkId: number, leaves: SerializedLeafValue[], subtreeDepth: number): Promise<SerializedBatchInsertionResult>;
|
|
30
|
+
sequentialInsert(treeId: IndexedTreeId, forkId: number, leaves: SerializedLeafValue[]): Promise<SerializedSequentialInsertionResult>;
|
|
31
|
+
syncBlock(input: {
|
|
32
|
+
blockNumber: BlockNumber;
|
|
33
|
+
blockStateRef: BlockStateReference;
|
|
34
|
+
blockHeaderHash: Buffer;
|
|
35
|
+
expectedArchiveRoot: Buffer;
|
|
36
|
+
expectedPreviousArchiveRoot: Buffer;
|
|
37
|
+
paddedNoteHashes: readonly SerializedLeafValue[];
|
|
38
|
+
paddedL1ToL2Messages: readonly SerializedLeafValue[];
|
|
39
|
+
paddedNullifiers: readonly SerializedLeafValue[];
|
|
40
|
+
publicDataWrites: readonly SerializedLeafValue[];
|
|
41
|
+
}): Promise<WorldStateStatusFull>;
|
|
42
|
+
createFork(input: {
|
|
43
|
+
latest: boolean;
|
|
44
|
+
blockNumber: BlockNumber;
|
|
45
|
+
}): Promise<number>;
|
|
46
|
+
deleteFork(forkId: number): Promise<void>;
|
|
47
|
+
finalizeBlocks(toBlockNumber: BlockNumber): Promise<WorldStateStatusSummary>;
|
|
48
|
+
unwindBlocks(toBlockNumber: BlockNumber): Promise<WorldStateStatusFull>;
|
|
49
|
+
removeHistoricalBlocks(toBlockNumber: BlockNumber): Promise<WorldStateStatusFull>;
|
|
50
|
+
getStatus(): Promise<WorldStateStatusSummary>;
|
|
51
|
+
createCheckpoint(forkId: number): Promise<number>;
|
|
52
|
+
commitCheckpoint(forkId: number): Promise<void>;
|
|
53
|
+
revertCheckpoint(forkId: number): Promise<void>;
|
|
54
|
+
commitAllCheckpoints(forkId: number, depth: number): Promise<void>;
|
|
55
|
+
revertAllCheckpoints(forkId: number, depth: number): Promise<void>;
|
|
56
|
+
copyStores(dstPath: string, compact: boolean): Promise<void>;
|
|
34
57
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @param body - The message body
|
|
38
|
-
* @param responseHandler - A callback accepting the response, executed on the job queue
|
|
39
|
-
* @param errorHandler - A callback called on request error, executed on the job queue
|
|
40
|
-
* @returns The response to the message
|
|
58
|
+
* IPC path the underlying aztec-wsdb process listens on. The C++ AVM uses this to attach to the
|
|
59
|
+
* same world state instance the TS layer is using.
|
|
41
60
|
*/
|
|
42
|
-
|
|
61
|
+
getIpcPath(): string;
|
|
43
62
|
/**
|
|
44
|
-
*
|
|
63
|
+
* Shut down the world state instance. Cancels any in-flight queues, closes the IPC channel, and
|
|
64
|
+
* terminates the underlying aztec-wsdb process. Idempotent.
|
|
45
65
|
*/
|
|
46
66
|
close(): Promise<void>;
|
|
47
|
-
private _sendMessage;
|
|
48
67
|
}
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# s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BRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2hELGdCQUFnQixDQUFDLE1BQU0sRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2hELG9CQUFvQixDQUFDLE1BQU0sRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDbkUsb0JBQW9CLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuRSxVQUFVLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsT0FBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUU3RDs7O09BR0c7SUFDSCxVQUFVLElBQUksTUFBTSxDQUFDO0lBRXJCOzs7T0FHRztJQUNILEtBQUssSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7Q0FDeEIifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native_world_state_instance.d.ts","sourceRoot":"","sources":["../../src/native/native_world_state_instance.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native_world_state_instance.d.ts","sourceRoot":"","sources":["../../src/native/native_world_state_instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EACV,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