@aztec/simulator 3.0.0-nightly.20251115 → 3.0.0-nightly.20251118
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sha256Trunc } from '@aztec/foundation/crypto';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import { AvmAppendLeavesHint, AvmBytecodeCommitmentHint, AvmCommitCheckpointHint, AvmContractClassHint,
|
|
4
|
+
import { AvmAppendLeavesHint, AvmBytecodeCommitmentHint, AvmCommitCheckpointHint, AvmContractClassHint, AvmContractDbCommitCheckpointHint, AvmContractDbCreateCheckpointHint, AvmContractDbRevertCheckpointHint, AvmContractInstanceHint, AvmCreateCheckpointHint, AvmDebugFunctionNameHint, AvmGetLeafPreimageHintNullifierTree, AvmGetLeafPreimageHintPublicDataTree, AvmGetLeafValueHint, AvmGetPreviousValueIndexHint, AvmGetSiblingPathHint, AvmRevertCheckpointHint, AvmSequentialInsertHintNullifierTree, AvmSequentialInsertHintPublicDataTree } from '@aztec/stdlib/avm';
|
|
5
5
|
import { AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeaf, PublicDataTreeLeaf, getTreeName, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
6
6
|
import { TreeSnapshots } from '@aztec/stdlib/tx';
|
|
7
7
|
import { strict as assert } from 'assert';
|
|
@@ -66,7 +66,7 @@ import { strict as assert } from 'assert';
|
|
|
66
66
|
this.db.createCheckpoint();
|
|
67
67
|
const newCheckpointId = this.nextCheckpointId++;
|
|
68
68
|
this.checkpointStack.push(newCheckpointId);
|
|
69
|
-
this.hints.
|
|
69
|
+
this.hints.contractDbCreateCheckpointHints.push(new AvmContractDbCreateCheckpointHint(hintKey, oldCheckpointId, newCheckpointId));
|
|
70
70
|
HintingPublicContractsDB.log.trace(`[createCheckpoint:${hintKey}] Checkpoint evolved ${oldCheckpointId} -> ${newCheckpointId}.`);
|
|
71
71
|
}
|
|
72
72
|
commitCheckpoint() {
|
|
@@ -76,7 +76,7 @@ import { strict as assert } from 'assert';
|
|
|
76
76
|
this.db.commitCheckpoint();
|
|
77
77
|
this.checkpointStack.pop();
|
|
78
78
|
const newCheckpointId = this.getCurrentCheckpointId();
|
|
79
|
-
this.hints.
|
|
79
|
+
this.hints.contractDbCommitCheckpointHints.push(new AvmContractDbCommitCheckpointHint(hintKey, oldCheckpointId, newCheckpointId));
|
|
80
80
|
HintingPublicContractsDB.log.trace(`[commitCheckpoint:${hintKey}] Checkpoint evolved ${oldCheckpointId} -> ${newCheckpointId}.`);
|
|
81
81
|
}
|
|
82
82
|
revertCheckpoint() {
|
|
@@ -86,7 +86,7 @@ import { strict as assert } from 'assert';
|
|
|
86
86
|
this.db.revertCheckpoint();
|
|
87
87
|
this.checkpointStack.pop();
|
|
88
88
|
const newCheckpointId = this.getCurrentCheckpointId();
|
|
89
|
-
this.hints.
|
|
89
|
+
this.hints.contractDbRevertCheckpointHints.push(new AvmContractDbRevertCheckpointHint(hintKey, oldCheckpointId, newCheckpointId));
|
|
90
90
|
HintingPublicContractsDB.log.trace(`[revertCheckpoint:${hintKey}] Checkpoint evolved ${oldCheckpointId} -> ${newCheckpointId}.`);
|
|
91
91
|
}
|
|
92
92
|
// Private methods.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/simulator",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251118",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": "./dest/server.js",
|
|
@@ -64,26 +64,26 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
68
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
69
|
-
"@aztec/native": "3.0.0-nightly.
|
|
70
|
-
"@aztec/noir-acvm_js": "3.0.0-nightly.
|
|
71
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
72
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
73
|
-
"@aztec/noir-types": "3.0.0-nightly.
|
|
74
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
75
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
76
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
77
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
67
|
+
"@aztec/constants": "3.0.0-nightly.20251118",
|
|
68
|
+
"@aztec/foundation": "3.0.0-nightly.20251118",
|
|
69
|
+
"@aztec/native": "3.0.0-nightly.20251118",
|
|
70
|
+
"@aztec/noir-acvm_js": "3.0.0-nightly.20251118",
|
|
71
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20251118",
|
|
72
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251118",
|
|
73
|
+
"@aztec/noir-types": "3.0.0-nightly.20251118",
|
|
74
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251118",
|
|
75
|
+
"@aztec/stdlib": "3.0.0-nightly.20251118",
|
|
76
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251118",
|
|
77
|
+
"@aztec/world-state": "3.0.0-nightly.20251118",
|
|
78
78
|
"lodash.clonedeep": "^4.5.0",
|
|
79
79
|
"lodash.merge": "^4.6.2",
|
|
80
80
|
"tslib": "^2.4.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
84
|
-
"@aztec/merkle-tree": "3.0.0-nightly.
|
|
85
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
86
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
83
|
+
"@aztec/kv-store": "3.0.0-nightly.20251118",
|
|
84
|
+
"@aztec/merkle-tree": "3.0.0-nightly.20251118",
|
|
85
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20251118",
|
|
86
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251118",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
88
|
"@types/jest": "^30.0.0",
|
|
89
89
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
AvmBytecodeCommitmentHint,
|
|
9
9
|
AvmCommitCheckpointHint,
|
|
10
10
|
AvmContractClassHint,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
AvmContractDbCommitCheckpointHint,
|
|
12
|
+
AvmContractDbCreateCheckpointHint,
|
|
13
|
+
AvmContractDbRevertCheckpointHint,
|
|
14
14
|
AvmContractInstanceHint,
|
|
15
15
|
AvmCreateCheckpointHint,
|
|
16
16
|
AvmDebugFunctionNameHint,
|
|
@@ -152,8 +152,8 @@ export class HintingPublicContractsDB implements PublicContractsDBInterface {
|
|
|
152
152
|
const newCheckpointId = this.nextCheckpointId++;
|
|
153
153
|
this.checkpointStack.push(newCheckpointId);
|
|
154
154
|
|
|
155
|
-
this.hints.
|
|
156
|
-
new
|
|
155
|
+
this.hints.contractDbCreateCheckpointHints.push(
|
|
156
|
+
new AvmContractDbCreateCheckpointHint(hintKey, oldCheckpointId, newCheckpointId),
|
|
157
157
|
);
|
|
158
158
|
|
|
159
159
|
HintingPublicContractsDB.log.trace(
|
|
@@ -171,8 +171,8 @@ export class HintingPublicContractsDB implements PublicContractsDBInterface {
|
|
|
171
171
|
this.checkpointStack.pop();
|
|
172
172
|
const newCheckpointId = this.getCurrentCheckpointId();
|
|
173
173
|
|
|
174
|
-
this.hints.
|
|
175
|
-
new
|
|
174
|
+
this.hints.contractDbCommitCheckpointHints.push(
|
|
175
|
+
new AvmContractDbCommitCheckpointHint(hintKey, oldCheckpointId, newCheckpointId),
|
|
176
176
|
);
|
|
177
177
|
|
|
178
178
|
HintingPublicContractsDB.log.trace(
|
|
@@ -190,8 +190,8 @@ export class HintingPublicContractsDB implements PublicContractsDBInterface {
|
|
|
190
190
|
this.checkpointStack.pop();
|
|
191
191
|
const newCheckpointId = this.getCurrentCheckpointId();
|
|
192
192
|
|
|
193
|
-
this.hints.
|
|
194
|
-
new
|
|
193
|
+
this.hints.contractDbRevertCheckpointHints.push(
|
|
194
|
+
new AvmContractDbRevertCheckpointHint(hintKey, oldCheckpointId, newCheckpointId),
|
|
195
195
|
);
|
|
196
196
|
|
|
197
197
|
HintingPublicContractsDB.log.trace(
|