@aztec/world-state 0.0.1-commit.b655e406 → 0.0.1-commit.b9865e97
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/index.d.ts +1 -1
- package/dest/instrumentation/instrumentation.d.ts +4 -3
- package/dest/instrumentation/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation/instrumentation.js +21 -50
- package/dest/native/bench_metrics.d.ts +1 -1
- package/dest/native/bench_metrics.d.ts.map +1 -1
- 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/index.d.ts +1 -1
- package/dest/native/ipc_world_state_instance.d.ts +87 -0
- package/dest/native/ipc_world_state_instance.d.ts.map +1 -0
- package/dest/native/ipc_world_state_instance.js +660 -0
- package/dest/native/merkle_trees_facade.d.ts +18 -8
- package/dest/native/merkle_trees_facade.d.ts.map +1 -1
- package/dest/native/merkle_trees_facade.js +90 -111
- package/dest/native/message.d.ts +22 -228
- package/dest/native/message.d.ts.map +1 -1
- package/dest/native/message.js +14 -55
- package/dest/native/native_world_state.d.ts +30 -15
- package/dest/native/native_world_state.d.ts.map +1 -1
- package/dest/native/native_world_state.js +126 -66
- package/dest/native/native_world_state_instance.d.ts +58 -32
- package/dest/native/native_world_state_instance.d.ts.map +1 -1
- package/dest/native/native_world_state_instance.js +5 -181
- 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 +3 -5
- package/dest/synchronizer/config.d.ts.map +1 -1
- package/dest/synchronizer/config.js +15 -18
- package/dest/synchronizer/errors.d.ts +1 -1
- package/dest/synchronizer/errors.d.ts.map +1 -1
- package/dest/synchronizer/factory.d.ts +6 -5
- package/dest/synchronizer/factory.d.ts.map +1 -1
- package/dest/synchronizer/factory.js +7 -6
- package/dest/synchronizer/index.d.ts +1 -1
- package/dest/synchronizer/server_world_state_synchronizer.d.ts +11 -28
- package/dest/synchronizer/server_world_state_synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/server_world_state_synchronizer.js +165 -81
- package/dest/test/index.d.ts +1 -1
- package/dest/test/utils.d.ts +12 -5
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +54 -50
- package/dest/testing.d.ts +5 -4
- package/dest/testing.d.ts.map +1 -1
- package/dest/testing.js +11 -7
- package/dest/world-state-db/index.d.ts +1 -1
- package/dest/world-state-db/merkle_tree_db.d.ts +9 -19
- package/dest/world-state-db/merkle_tree_db.d.ts.map +1 -1
- package/package.json +17 -13
- package/src/instrumentation/instrumentation.ts +23 -59
- package/src/native/fork_checkpoint.ts +19 -3
- package/src/native/ipc_world_state_instance.ts +830 -0
- package/src/native/merkle_trees_facade.ts +118 -104
- package/src/native/message.ts +33 -305
- package/src/native/native_world_state.ts +164 -108
- package/src/native/native_world_state_instance.ts +96 -250
- package/src/native/world_state_operation.ts +33 -0
- package/src/synchronizer/config.ts +16 -23
- package/src/synchronizer/factory.ts +18 -11
- package/src/synchronizer/server_world_state_synchronizer.ts +181 -106
- package/src/test/utils.ts +87 -92
- package/src/testing.ts +9 -10
- package/src/world-state-db/merkle_tree_db.ts +12 -19
- 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,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
3
|
import { type IndexedTreeLeafPreimage, SiblingPath } from '@aztec/foundation/trees';
|
|
4
|
+
import { BlockHash } from '@aztec/stdlib/block';
|
|
3
5
|
import type { BatchInsertionResult, IndexedTreeId, MerkleTreeLeafType, MerkleTreeReadOperations, MerkleTreeWriteOperations, SequentialInsertionResult, TreeInfo } from '@aztec/stdlib/interfaces/server';
|
|
4
6
|
import { MerkleTreeId, NullifierLeaf, PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
5
7
|
import { type BlockHeader, StateReference } from '@aztec/stdlib/tx';
|
|
@@ -13,6 +15,7 @@ export declare class MerkleTreesFacade implements MerkleTreeReadOperations {
|
|
|
13
15
|
constructor(instance: NativeWorldStateInstance, initialHeader: BlockHeader, revision: WorldStateRevision);
|
|
14
16
|
getInitialHeader(): BlockHeader;
|
|
15
17
|
getRevision(): WorldStateRevision;
|
|
18
|
+
getIpcPath(): string;
|
|
16
19
|
findLeafIndices(treeId: MerkleTreeId, values: MerkleTreeLeafType<MerkleTreeId>[]): Promise<(bigint | undefined)[]>;
|
|
17
20
|
findSiblingPaths<N extends number>(treeId: MerkleTreeId, values: MerkleTreeLeafType<MerkleTreeId>[]): Promise<({
|
|
18
21
|
path: SiblingPath<N>;
|
|
@@ -29,20 +32,27 @@ export declare class MerkleTreesFacade implements MerkleTreeReadOperations {
|
|
|
29
32
|
getStateReference(): Promise<StateReference>;
|
|
30
33
|
getInitialStateReference(): Promise<StateReference>;
|
|
31
34
|
getTreeInfo(treeId: MerkleTreeId): Promise<TreeInfo>;
|
|
32
|
-
getBlockNumbersForLeafIndices<ID extends MerkleTreeId>(treeId: ID, leafIndices: bigint[]): Promise<(
|
|
35
|
+
getBlockNumbersForLeafIndices<ID extends MerkleTreeId>(treeId: ID, leafIndices: bigint[]): Promise<(BlockNumber | undefined)[]>;
|
|
33
36
|
}
|
|
34
37
|
export declare class MerkleTreesForkFacade extends MerkleTreesFacade implements MerkleTreeWriteOperations {
|
|
35
|
-
|
|
38
|
+
private opts;
|
|
39
|
+
private log;
|
|
40
|
+
private closePromise;
|
|
41
|
+
constructor(instance: NativeWorldStateInstance, initialHeader: BlockHeader, revision: WorldStateRevision, opts: {
|
|
42
|
+
closeDelayMs?: number;
|
|
43
|
+
});
|
|
36
44
|
updateArchive(header: BlockHeader): Promise<void>;
|
|
37
45
|
appendLeaves<ID extends MerkleTreeId>(treeId: ID, leaves: MerkleTreeLeafType<ID>[]): Promise<void>;
|
|
38
46
|
batchInsert<TreeHeight extends number, SubtreeSiblingPathHeight extends number, ID extends IndexedTreeId>(treeId: ID, rawLeaves: Buffer[], subtreeHeight: number): Promise<BatchInsertionResult<TreeHeight, SubtreeSiblingPathHeight>>;
|
|
39
47
|
sequentialInsert<TreeHeight extends number, ID extends IndexedTreeId>(treeId: ID, rawLeaves: Buffer[]): Promise<SequentialInsertionResult<TreeHeight>>;
|
|
40
48
|
close(): Promise<void>;
|
|
41
|
-
|
|
49
|
+
private doClose;
|
|
50
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
51
|
+
createCheckpoint(): Promise<number>;
|
|
42
52
|
commitCheckpoint(): Promise<void>;
|
|
43
53
|
revertCheckpoint(): Promise<void>;
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
commitAllCheckpointsTo(depth: number): Promise<void>;
|
|
55
|
+
revertAllCheckpointsTo(depth: number): Promise<void>;
|
|
46
56
|
}
|
|
47
|
-
export declare function serializeLeaf(leaf: Fr | NullifierLeaf | PublicDataTreeLeaf): SerializedLeafValue;
|
|
48
|
-
//# sourceMappingURL=
|
|
57
|
+
export declare function serializeLeaf(leaf: Fr | BlockHash | NullifierLeaf | PublicDataTreeLeaf): SerializedLeafValue;
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVya2xlX3RyZWVzX2ZhY2FkZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25hdGl2ZS9tZXJrbGVfdHJlZXNfZmFjYWRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM5RCxPQUFPLEVBQUUsRUFBRS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0FBTyxDQUFDLElBQUksQ0FBQyxDQUc3QztJQUVZLHNCQUFzQixDQUFDLEtBQUssRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUdoRTtJQUVZLHNCQUFzQixDQUFDLEtBQUssRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUdoRTtDQUNGO0FBZ0JELHdCQUFnQixhQUFhLENBQUMsSUFBSSxFQUFFLEVBQUUsR0FBRyxTQUFTLEdBQUcsYUFBYSxHQUFHLGtCQUFrQixHQUFHLG1CQUFtQixDQVU1RyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merkle_trees_facade.d.ts","sourceRoot":"","sources":["../../src/native/merkle_trees_facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"merkle_trees_facade.d.ts","sourceRoot":"","sources":["../../src/native/merkle_trees_facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD,OAAO,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,QAAQ,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,aAAa,EAEb,kBAAkB,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,WAAW,EAAyB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,OAAO,EAEL,KAAK,mBAA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,OAAO,CAAC,IAAI,CAAC,CAMvG;IAEK,WAAW,CAAC,UAAU,SAAS,MAAM,EAAE,wBAAwB,SAAS,MAAM,EAAE,EAAE,SAAS,aAAa,EAC5G,MAAM,EAAE,EAAE,EACV,SAAS,EAAE,MAAM,EAAE,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,oBAAoB,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAoBrE;IAEK,gBAAgB,CAAC,UAAU,SAAS,MAAM,EAAE,EAAE,SAAS,aAAa,EACxE,MAAM,EAAE,EAAE,EACV,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC,CAgBhD;IAEM,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAQ5B;YAEa,OAAO;IAmBf,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAU3C;IAEY,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAG/C;IAEY,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG7C;IAEY,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG7C;IAEY,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhE;IAEY,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhE;CACF;AAgBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,GAAG,aAAa,GAAG,kBAAkB,GAAG,mBAAmB,CAU5G"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var _computedKey;
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
5
|
import { serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
3
7
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
8
|
+
import { BlockHash } from '@aztec/stdlib/block';
|
|
4
9
|
import { MerkleTreeId, NullifierLeaf, NullifierLeafPreimage, PublicDataTreeLeaf, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
|
|
5
10
|
import { PartialStateReference, StateReference } from '@aztec/stdlib/tx';
|
|
6
11
|
import assert from 'assert';
|
|
7
|
-
import {
|
|
12
|
+
import { blockStateReference, treeStateReferenceToSnapshot } from './message.js';
|
|
8
13
|
export class MerkleTreesFacade {
|
|
9
14
|
instance;
|
|
10
15
|
initialHeader;
|
|
@@ -20,16 +25,15 @@ export class MerkleTreesFacade {
|
|
|
20
25
|
getRevision() {
|
|
21
26
|
return this.revision;
|
|
22
27
|
}
|
|
28
|
+
getIpcPath() {
|
|
29
|
+
return this.instance.getIpcPath();
|
|
30
|
+
}
|
|
23
31
|
findLeafIndices(treeId, values) {
|
|
24
32
|
return this.findLeafIndicesAfter(treeId, values, 0n);
|
|
25
33
|
}
|
|
26
34
|
async findSiblingPaths(treeId, values) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
revision: this.revision,
|
|
30
|
-
treeId
|
|
31
|
-
});
|
|
32
|
-
return response.paths.map((path)=>{
|
|
35
|
+
const paths = await this.instance.findSiblingPaths(treeId, this.revision, values.map((leaf)=>serializeLeaf(hydrateLeaf(treeId, leaf))));
|
|
36
|
+
return paths.map((path)=>{
|
|
33
37
|
if (!path) {
|
|
34
38
|
return undefined;
|
|
35
39
|
}
|
|
@@ -40,13 +44,8 @@ export class MerkleTreesFacade {
|
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
46
|
async findLeafIndicesAfter(treeId, leaves, startIndex) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
revision: this.revision,
|
|
46
|
-
treeId,
|
|
47
|
-
startIndex
|
|
48
|
-
});
|
|
49
|
-
return response.indices.map((index)=>{
|
|
47
|
+
const indices = await this.instance.findLeafIndices(treeId, this.revision, leaves.map((leaf)=>serializeLeaf(hydrateLeaf(treeId, leaf))), startIndex);
|
|
48
|
+
return indices.map((index)=>{
|
|
50
49
|
if (typeof index === 'number' || typeof index === 'bigint') {
|
|
51
50
|
return BigInt(index);
|
|
52
51
|
} else {
|
|
@@ -55,114 +54,72 @@ export class MerkleTreesFacade {
|
|
|
55
54
|
});
|
|
56
55
|
}
|
|
57
56
|
async getLeafPreimage(treeId, leafIndex) {
|
|
58
|
-
const resp = await this.instance.
|
|
59
|
-
leafIndex,
|
|
60
|
-
revision: this.revision,
|
|
61
|
-
treeId
|
|
62
|
-
});
|
|
57
|
+
const resp = await this.instance.getLeafPreimage(treeId, this.revision, leafIndex);
|
|
63
58
|
return resp ? deserializeIndexedLeaf(resp) : undefined;
|
|
64
59
|
}
|
|
65
60
|
async getLeafValue(treeId, leafIndex) {
|
|
66
|
-
const resp = await this.instance.
|
|
67
|
-
leafIndex,
|
|
68
|
-
revision: this.revision,
|
|
69
|
-
treeId
|
|
70
|
-
});
|
|
61
|
+
const resp = await this.instance.getLeafValue(treeId, this.revision, leafIndex);
|
|
71
62
|
if (!resp) {
|
|
72
63
|
return undefined;
|
|
73
64
|
}
|
|
74
65
|
const leaf = deserializeLeafValue(resp);
|
|
75
66
|
if (leaf instanceof Fr) {
|
|
76
|
-
return leaf;
|
|
67
|
+
return treeId === MerkleTreeId.ARCHIVE ? new BlockHash(leaf) : leaf;
|
|
77
68
|
} else {
|
|
78
69
|
return leaf.toBuffer();
|
|
79
70
|
}
|
|
80
71
|
}
|
|
81
72
|
async getPreviousValueIndex(treeId, value) {
|
|
82
|
-
const resp = await this.instance.
|
|
83
|
-
key: new Fr(value),
|
|
84
|
-
revision: this.revision,
|
|
85
|
-
treeId
|
|
86
|
-
});
|
|
73
|
+
const resp = await this.instance.findLowLeaf(treeId, this.revision, new Fr(value));
|
|
87
74
|
return {
|
|
88
75
|
alreadyPresent: resp.alreadyPresent,
|
|
89
76
|
index: BigInt(resp.index)
|
|
90
77
|
};
|
|
91
78
|
}
|
|
92
79
|
async getSiblingPath(treeId, leafIndex) {
|
|
93
|
-
const siblingPath = await this.instance.
|
|
94
|
-
leafIndex,
|
|
95
|
-
revision: this.revision,
|
|
96
|
-
treeId
|
|
97
|
-
});
|
|
80
|
+
const siblingPath = await this.instance.getSiblingPath(treeId, this.revision, leafIndex);
|
|
98
81
|
return new SiblingPath(siblingPath.length, siblingPath);
|
|
99
82
|
}
|
|
100
83
|
async getStateReference() {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
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])));
|
|
84
|
+
const state = await this.instance.getStateReference(this.revision);
|
|
85
|
+
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])));
|
|
105
86
|
}
|
|
106
87
|
async getInitialStateReference() {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
});
|
|
110
|
-
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])));
|
|
88
|
+
const state = await this.instance.getInitialStateReference();
|
|
89
|
+
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])));
|
|
111
90
|
}
|
|
112
91
|
async getTreeInfo(treeId) {
|
|
113
|
-
|
|
114
|
-
treeId: treeId,
|
|
115
|
-
revision: this.revision
|
|
116
|
-
});
|
|
117
|
-
return {
|
|
118
|
-
depth: resp.depth,
|
|
119
|
-
root: resp.root,
|
|
120
|
-
size: BigInt(resp.size),
|
|
121
|
-
treeId
|
|
122
|
-
};
|
|
92
|
+
return await this.instance.getTreeInfo(treeId, this.revision);
|
|
123
93
|
}
|
|
124
94
|
async getBlockNumbersForLeafIndices(treeId, leafIndices) {
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
revision: this.revision,
|
|
128
|
-
leafIndices
|
|
129
|
-
});
|
|
130
|
-
return response.blockNumbers.map((x)=>x === undefined || x === null ? undefined : BigInt(x));
|
|
95
|
+
const blockNumbers = await this.instance.getBlockNumbersForLeafIndices(treeId, this.revision, leafIndices);
|
|
96
|
+
return blockNumbers.map((x)=>x === undefined || x === null ? undefined : BlockNumber(Number(x)));
|
|
131
97
|
}
|
|
132
98
|
}
|
|
99
|
+
_computedKey = Symbol.asyncDispose;
|
|
133
100
|
export class MerkleTreesForkFacade extends MerkleTreesFacade {
|
|
134
|
-
|
|
101
|
+
opts;
|
|
102
|
+
log;
|
|
103
|
+
closePromise;
|
|
104
|
+
constructor(instance, initialHeader, revision, opts){
|
|
135
105
|
assert.notEqual(revision.forkId, 0, 'Fork ID must be set');
|
|
136
106
|
assert.equal(revision.includeUncommitted, true, 'Fork must include uncommitted data');
|
|
137
|
-
super(instance, initialHeader, revision);
|
|
107
|
+
super(instance, initialHeader, revision), this.opts = opts, this.log = createLogger('world-state:merkle-trees-fork-facade');
|
|
138
108
|
}
|
|
139
109
|
async updateArchive(header) {
|
|
140
|
-
await this.instance.
|
|
141
|
-
forkId: this.revision.forkId,
|
|
142
|
-
blockHeaderHash: (await header.hash()).toBuffer(),
|
|
143
|
-
blockStateRef: blockStateReference(header.state)
|
|
144
|
-
});
|
|
110
|
+
await this.instance.updateArchive(this.revision.forkId, blockStateReference(header.state), (await header.hash()).toBuffer());
|
|
145
111
|
}
|
|
146
112
|
async appendLeaves(treeId, leaves) {
|
|
147
|
-
await this.instance.
|
|
148
|
-
leaves: leaves.map((leaf)=>leaf),
|
|
149
|
-
forkId: this.revision.forkId,
|
|
150
|
-
treeId
|
|
151
|
-
});
|
|
113
|
+
await this.instance.appendLeaves(treeId, this.revision.forkId, leaves.map((leaf)=>serializeLeaf(hydrateLeaf(treeId, leaf))));
|
|
152
114
|
}
|
|
153
115
|
async batchInsert(treeId, rawLeaves, subtreeHeight) {
|
|
154
116
|
const leaves = rawLeaves.map((leaf)=>hydrateLeaf(treeId, leaf)).map(serializeLeaf);
|
|
155
|
-
const resp = await this.instance.
|
|
156
|
-
leaves,
|
|
157
|
-
treeId,
|
|
158
|
-
forkId: this.revision.forkId,
|
|
159
|
-
subtreeDepth: subtreeHeight
|
|
160
|
-
});
|
|
117
|
+
const resp = await this.instance.batchInsert(treeId, this.revision.forkId, leaves, subtreeHeight);
|
|
161
118
|
return {
|
|
162
|
-
newSubtreeSiblingPath: new SiblingPath(resp.
|
|
163
|
-
sortedNewLeaves: resp.
|
|
164
|
-
sortedNewLeavesIndexes: resp.
|
|
165
|
-
lowLeavesWitnessData: resp.
|
|
119
|
+
newSubtreeSiblingPath: new SiblingPath(resp.subtreePath.length, resp.subtreePath),
|
|
120
|
+
sortedNewLeaves: resp.sortedLeaves.map(([leaf])=>leaf).map(deserializeLeafValue).map(serializeToBuffer),
|
|
121
|
+
sortedNewLeavesIndexes: resp.sortedLeaves.map(([, index])=>index),
|
|
122
|
+
lowLeavesWitnessData: resp.lowLeafWitnessData.map((data)=>({
|
|
166
123
|
index: BigInt(data.index),
|
|
167
124
|
leafPreimage: deserializeIndexedLeaf(data.leaf),
|
|
168
125
|
siblingPath: new SiblingPath(data.path.length, data.path)
|
|
@@ -171,64 +128,84 @@ export class MerkleTreesForkFacade extends MerkleTreesFacade {
|
|
|
171
128
|
}
|
|
172
129
|
async sequentialInsert(treeId, rawLeaves) {
|
|
173
130
|
const leaves = rawLeaves.map((leaf)=>hydrateLeaf(treeId, leaf)).map(serializeLeaf);
|
|
174
|
-
const resp = await this.instance.
|
|
175
|
-
leaves,
|
|
176
|
-
treeId,
|
|
177
|
-
forkId: this.revision.forkId
|
|
178
|
-
});
|
|
131
|
+
const resp = await this.instance.sequentialInsert(treeId, this.revision.forkId, leaves);
|
|
179
132
|
return {
|
|
180
|
-
lowLeavesWitnessData: resp.
|
|
133
|
+
lowLeavesWitnessData: resp.lowLeafWitnessData.map((data)=>({
|
|
181
134
|
index: BigInt(data.index),
|
|
182
135
|
leafPreimage: deserializeIndexedLeaf(data.leaf),
|
|
183
136
|
siblingPath: new SiblingPath(data.path.length, data.path)
|
|
184
137
|
})),
|
|
185
|
-
insertionWitnessData: resp.
|
|
138
|
+
insertionWitnessData: resp.insertionWitnessData.map((data)=>({
|
|
186
139
|
index: BigInt(data.index),
|
|
187
140
|
leafPreimage: deserializeIndexedLeaf(data.leaf),
|
|
188
141
|
siblingPath: new SiblingPath(data.path.length, data.path)
|
|
189
142
|
}))
|
|
190
143
|
};
|
|
191
144
|
}
|
|
192
|
-
|
|
145
|
+
close() {
|
|
193
146
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
147
|
+
// Share the in-flight close promise across duplicate dispose calls so DELETE_FORK is sent at most once.
|
|
148
|
+
if (this.closePromise) {
|
|
149
|
+
return this.closePromise;
|
|
150
|
+
}
|
|
151
|
+
this.closePromise = this.doClose();
|
|
152
|
+
return this.closePromise;
|
|
153
|
+
}
|
|
154
|
+
async doClose() {
|
|
155
|
+
try {
|
|
156
|
+
await this.instance.deleteFork(this.revision.forkId);
|
|
157
|
+
} catch (err) {
|
|
158
|
+
// Ignore errors due to native instance being closed during shutdown.
|
|
159
|
+
// This can happen when validators are still processing block proposals while the node is stopping.
|
|
160
|
+
if (err?.message === 'Native instance is closed' || err?.message === 'IPC instance is closed') {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
// Ignore "Fork not found": the native fork was already destroyed by a pending-chain unwind or a
|
|
164
|
+
// historical prune (both call C++ remove_forks_for_block). Fork IDs are monotonic and never reused,
|
|
165
|
+
// so swallowing this on close cannot mask a deletion of a different fork.
|
|
166
|
+
if (err?.message === 'Fork not found') {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
throw err;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async [_computedKey]() {
|
|
173
|
+
if (this.opts.closeDelayMs) {
|
|
174
|
+
void sleep(this.opts.closeDelayMs).then(()=>this.close()).catch((err)=>{
|
|
175
|
+
this.log.warn('Error closing MerkleTreesForkFacade after delay', {
|
|
176
|
+
err
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
} else {
|
|
180
|
+
await this.close();
|
|
181
|
+
}
|
|
197
182
|
}
|
|
198
183
|
async createCheckpoint() {
|
|
199
184
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
200
|
-
await this.instance.
|
|
201
|
-
forkId: this.revision.forkId
|
|
202
|
-
});
|
|
185
|
+
return await this.instance.createCheckpoint(this.revision.forkId);
|
|
203
186
|
}
|
|
204
187
|
async commitCheckpoint() {
|
|
205
188
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
206
|
-
await this.instance.
|
|
207
|
-
forkId: this.revision.forkId
|
|
208
|
-
});
|
|
189
|
+
await this.instance.commitCheckpoint(this.revision.forkId);
|
|
209
190
|
}
|
|
210
191
|
async revertCheckpoint() {
|
|
211
192
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
212
|
-
await this.instance.
|
|
213
|
-
forkId: this.revision.forkId
|
|
214
|
-
});
|
|
193
|
+
await this.instance.revertCheckpoint(this.revision.forkId);
|
|
215
194
|
}
|
|
216
|
-
async
|
|
195
|
+
async commitAllCheckpointsTo(depth) {
|
|
217
196
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
218
|
-
await this.instance.
|
|
219
|
-
forkId: this.revision.forkId
|
|
220
|
-
});
|
|
197
|
+
await this.instance.commitAllCheckpoints(this.revision.forkId, depth);
|
|
221
198
|
}
|
|
222
|
-
async
|
|
199
|
+
async revertAllCheckpointsTo(depth) {
|
|
223
200
|
assert.notEqual(this.revision.forkId, 0, 'Fork ID must be set');
|
|
224
|
-
await this.instance.
|
|
225
|
-
forkId: this.revision.forkId
|
|
226
|
-
});
|
|
201
|
+
await this.instance.revertAllCheckpoints(this.revision.forkId, depth);
|
|
227
202
|
}
|
|
228
203
|
}
|
|
229
204
|
function hydrateLeaf(treeId, leaf) {
|
|
230
205
|
if (leaf instanceof Fr) {
|
|
231
206
|
return leaf;
|
|
207
|
+
} else if (leaf instanceof BlockHash) {
|
|
208
|
+
return leaf.toFr();
|
|
232
209
|
} else if (treeId === MerkleTreeId.NULLIFIER_TREE) {
|
|
233
210
|
return NullifierLeaf.fromBuffer(leaf);
|
|
234
211
|
} else if (treeId === MerkleTreeId.PUBLIC_DATA_TREE) {
|
|
@@ -238,7 +215,9 @@ function hydrateLeaf(treeId, leaf) {
|
|
|
238
215
|
}
|
|
239
216
|
}
|
|
240
217
|
export function serializeLeaf(leaf) {
|
|
241
|
-
if (leaf instanceof
|
|
218
|
+
if (leaf instanceof BlockHash) {
|
|
219
|
+
return leaf.toBuffer();
|
|
220
|
+
} else if (leaf instanceof Fr) {
|
|
242
221
|
return leaf.toBuffer();
|
|
243
222
|
} else if (leaf instanceof NullifierLeaf) {
|
|
244
223
|
return {
|