@aztec/aztec-node 5.0.0-nightly.20260414 → 5.0.0-nightly.20260415
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/aztec-node/server.js +4 -4
- package/package.json +26 -26
- package/src/aztec-node/server.ts +5 -5
|
@@ -1181,13 +1181,13 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1181
1181
|
if (blockNumber === undefined) {
|
|
1182
1182
|
throw new Error(`Block number not found for leaf index ${index} in tree ${MerkleTreeId[treeId]}`);
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
if (
|
|
1184
|
+
const l2BlockHash = blockNumberToHash.get(blockNumber);
|
|
1185
|
+
if (l2BlockHash === undefined) {
|
|
1186
1186
|
throw new Error(`Block hash not found for block number ${blockNumber}`);
|
|
1187
1187
|
}
|
|
1188
1188
|
return {
|
|
1189
1189
|
l2BlockNumber: blockNumber,
|
|
1190
|
-
l2BlockHash
|
|
1190
|
+
l2BlockHash,
|
|
1191
1191
|
data: index
|
|
1192
1192
|
};
|
|
1193
1193
|
});
|
|
@@ -1700,7 +1700,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1700
1700
|
// Double-check world-state synced to the same block hash as was requested
|
|
1701
1701
|
if (BlockHash.isBlockHash(block)) {
|
|
1702
1702
|
const blockHash = await snapshot.getLeafValue(MerkleTreeId.ARCHIVE, BigInt(blockNumber));
|
|
1703
|
-
if (!blockHash || !
|
|
1703
|
+
if (!blockHash || !block.equals(blockHash)) {
|
|
1704
1704
|
throw new Error(`Block hash ${block.toString()} not found in world state at block number ${blockNumber}. If the node API has been queried with anchor block hash possibly a reorg has occurred.`);
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec-node",
|
|
3
|
-
"version": "5.0.0-nightly.
|
|
3
|
+
"version": "5.0.0-nightly.20260415",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -65,31 +65,31 @@
|
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@aztec/archiver": "5.0.0-nightly.
|
|
69
|
-
"@aztec/bb-prover": "5.0.0-nightly.
|
|
70
|
-
"@aztec/blob-client": "5.0.0-nightly.
|
|
71
|
-
"@aztec/blob-lib": "5.0.0-nightly.
|
|
72
|
-
"@aztec/constants": "5.0.0-nightly.
|
|
73
|
-
"@aztec/epoch-cache": "5.0.0-nightly.
|
|
74
|
-
"@aztec/ethereum": "5.0.0-nightly.
|
|
75
|
-
"@aztec/foundation": "5.0.0-nightly.
|
|
76
|
-
"@aztec/kv-store": "5.0.0-nightly.
|
|
77
|
-
"@aztec/l1-artifacts": "5.0.0-nightly.
|
|
78
|
-
"@aztec/node-keystore": "5.0.0-nightly.
|
|
79
|
-
"@aztec/node-lib": "5.0.0-nightly.
|
|
80
|
-
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.
|
|
81
|
-
"@aztec/p2p": "5.0.0-nightly.
|
|
82
|
-
"@aztec/protocol-contracts": "5.0.0-nightly.
|
|
83
|
-
"@aztec/prover-client": "5.0.0-nightly.
|
|
84
|
-
"@aztec/prover-node": "5.0.0-nightly.
|
|
85
|
-
"@aztec/sequencer-client": "5.0.0-nightly.
|
|
86
|
-
"@aztec/simulator": "5.0.0-nightly.
|
|
87
|
-
"@aztec/slasher": "5.0.0-nightly.
|
|
88
|
-
"@aztec/stdlib": "5.0.0-nightly.
|
|
89
|
-
"@aztec/telemetry-client": "5.0.0-nightly.
|
|
90
|
-
"@aztec/validator-client": "5.0.0-nightly.
|
|
91
|
-
"@aztec/validator-ha-signer": "5.0.0-nightly.
|
|
92
|
-
"@aztec/world-state": "5.0.0-nightly.
|
|
68
|
+
"@aztec/archiver": "5.0.0-nightly.20260415",
|
|
69
|
+
"@aztec/bb-prover": "5.0.0-nightly.20260415",
|
|
70
|
+
"@aztec/blob-client": "5.0.0-nightly.20260415",
|
|
71
|
+
"@aztec/blob-lib": "5.0.0-nightly.20260415",
|
|
72
|
+
"@aztec/constants": "5.0.0-nightly.20260415",
|
|
73
|
+
"@aztec/epoch-cache": "5.0.0-nightly.20260415",
|
|
74
|
+
"@aztec/ethereum": "5.0.0-nightly.20260415",
|
|
75
|
+
"@aztec/foundation": "5.0.0-nightly.20260415",
|
|
76
|
+
"@aztec/kv-store": "5.0.0-nightly.20260415",
|
|
77
|
+
"@aztec/l1-artifacts": "5.0.0-nightly.20260415",
|
|
78
|
+
"@aztec/node-keystore": "5.0.0-nightly.20260415",
|
|
79
|
+
"@aztec/node-lib": "5.0.0-nightly.20260415",
|
|
80
|
+
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.20260415",
|
|
81
|
+
"@aztec/p2p": "5.0.0-nightly.20260415",
|
|
82
|
+
"@aztec/protocol-contracts": "5.0.0-nightly.20260415",
|
|
83
|
+
"@aztec/prover-client": "5.0.0-nightly.20260415",
|
|
84
|
+
"@aztec/prover-node": "5.0.0-nightly.20260415",
|
|
85
|
+
"@aztec/sequencer-client": "5.0.0-nightly.20260415",
|
|
86
|
+
"@aztec/simulator": "5.0.0-nightly.20260415",
|
|
87
|
+
"@aztec/slasher": "5.0.0-nightly.20260415",
|
|
88
|
+
"@aztec/stdlib": "5.0.0-nightly.20260415",
|
|
89
|
+
"@aztec/telemetry-client": "5.0.0-nightly.20260415",
|
|
90
|
+
"@aztec/validator-client": "5.0.0-nightly.20260415",
|
|
91
|
+
"@aztec/validator-ha-signer": "5.0.0-nightly.20260415",
|
|
92
|
+
"@aztec/world-state": "5.0.0-nightly.20260415",
|
|
93
93
|
"koa": "^2.16.1",
|
|
94
94
|
"koa-router": "^13.1.1",
|
|
95
95
|
"tslib": "^2.4.0",
|
package/src/aztec-node/server.ts
CHANGED
|
@@ -1061,7 +1061,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
|
|
|
1061
1061
|
);
|
|
1062
1062
|
|
|
1063
1063
|
// Build a map from block number to block hash
|
|
1064
|
-
const blockNumberToHash = new Map<BlockNumber,
|
|
1064
|
+
const blockNumberToHash = new Map<BlockNumber, BlockHash>();
|
|
1065
1065
|
for (let i = 0; i < uniqueBlockNumbers.length; i++) {
|
|
1066
1066
|
const blockHash = blockHashes[i];
|
|
1067
1067
|
if (blockHash === undefined) {
|
|
@@ -1079,13 +1079,13 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
|
|
|
1079
1079
|
if (blockNumber === undefined) {
|
|
1080
1080
|
throw new Error(`Block number not found for leaf index ${index} in tree ${MerkleTreeId[treeId]}`);
|
|
1081
1081
|
}
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1082
|
+
const l2BlockHash = blockNumberToHash.get(blockNumber);
|
|
1083
|
+
if (l2BlockHash === undefined) {
|
|
1084
1084
|
throw new Error(`Block hash not found for block number ${blockNumber}`);
|
|
1085
1085
|
}
|
|
1086
1086
|
return {
|
|
1087
1087
|
l2BlockNumber: blockNumber,
|
|
1088
|
-
l2BlockHash
|
|
1088
|
+
l2BlockHash,
|
|
1089
1089
|
data: index,
|
|
1090
1090
|
};
|
|
1091
1091
|
});
|
|
@@ -1741,7 +1741,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
|
|
|
1741
1741
|
// Double-check world-state synced to the same block hash as was requested
|
|
1742
1742
|
if (BlockHash.isBlockHash(block)) {
|
|
1743
1743
|
const blockHash = await snapshot.getLeafValue(MerkleTreeId.ARCHIVE, BigInt(blockNumber));
|
|
1744
|
-
if (!blockHash || !
|
|
1744
|
+
if (!blockHash || !block.equals(blockHash)) {
|
|
1745
1745
|
throw new Error(
|
|
1746
1746
|
`Block hash ${block.toString()} not found in world state at block number ${blockNumber}. If the node API has been queried with anchor block hash possibly a reorg has occurred.`,
|
|
1747
1747
|
);
|