@aztec/world-state 3.0.0-nightly.20251210 → 3.0.0-nightly.20251211
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.
|
@@ -207,13 +207,13 @@ import { WorldStateSynchronizerError } from './errors.js';
|
|
|
207
207
|
await this.handleL2Blocks(event.blocks.map((b)=>b.block.toL2Block()));
|
|
208
208
|
break;
|
|
209
209
|
case 'chain-pruned':
|
|
210
|
-
await this.handleChainPruned(
|
|
210
|
+
await this.handleChainPruned(event.block.number);
|
|
211
211
|
break;
|
|
212
212
|
case 'chain-proven':
|
|
213
|
-
await this.handleChainProven(
|
|
213
|
+
await this.handleChainProven(event.block.number);
|
|
214
214
|
break;
|
|
215
215
|
case 'chain-finalized':
|
|
216
|
-
await this.handleChainFinalized(
|
|
216
|
+
await this.handleChainFinalized(event.block.number);
|
|
217
217
|
break;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -271,12 +271,12 @@ import { WorldStateSynchronizerError } from './errors.js';
|
|
|
271
271
|
if (this.historyToKeep === undefined) {
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
|
-
const newHistoricBlock =
|
|
275
|
-
if (newHistoricBlock <=
|
|
274
|
+
const newHistoricBlock = summary.finalizedBlockNumber - this.historyToKeep + 1;
|
|
275
|
+
if (newHistoricBlock <= 1) {
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
278
|
this.log.verbose(`Pruning historic blocks to ${newHistoricBlock}`);
|
|
279
|
-
const status = await this.merkleTreeDb.removeHistoricalBlocks(newHistoricBlock);
|
|
279
|
+
const status = await this.merkleTreeDb.removeHistoricalBlocks(BlockNumber(newHistoricBlock));
|
|
280
280
|
this.log.debug(`World state summary `, status.summary);
|
|
281
281
|
}
|
|
282
282
|
handleChainProven(blockNumber) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/world-state",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251211",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
68
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
69
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
70
|
-
"@aztec/merkle-tree": "3.0.0-nightly.
|
|
71
|
-
"@aztec/native": "3.0.0-nightly.
|
|
72
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
73
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
74
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
67
|
+
"@aztec/constants": "3.0.0-nightly.20251211",
|
|
68
|
+
"@aztec/foundation": "3.0.0-nightly.20251211",
|
|
69
|
+
"@aztec/kv-store": "3.0.0-nightly.20251211",
|
|
70
|
+
"@aztec/merkle-tree": "3.0.0-nightly.20251211",
|
|
71
|
+
"@aztec/native": "3.0.0-nightly.20251211",
|
|
72
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251211",
|
|
73
|
+
"@aztec/stdlib": "3.0.0-nightly.20251211",
|
|
74
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251211",
|
|
75
75
|
"tslib": "^2.4.0",
|
|
76
76
|
"zod": "^3.23.8"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
79
|
+
"@aztec/archiver": "3.0.0-nightly.20251211",
|
|
80
80
|
"@jest/globals": "^30.0.0",
|
|
81
81
|
"@types/jest": "^30.0.0",
|
|
82
82
|
"@types/node": "^22.15.17",
|
|
@@ -270,13 +270,13 @@ export class ServerWorldStateSynchronizer
|
|
|
270
270
|
await this.handleL2Blocks(event.blocks.map(b => b.block.toL2Block()));
|
|
271
271
|
break;
|
|
272
272
|
case 'chain-pruned':
|
|
273
|
-
await this.handleChainPruned(
|
|
273
|
+
await this.handleChainPruned(event.block.number);
|
|
274
274
|
break;
|
|
275
275
|
case 'chain-proven':
|
|
276
|
-
await this.handleChainProven(
|
|
276
|
+
await this.handleChainProven(event.block.number);
|
|
277
277
|
break;
|
|
278
278
|
case 'chain-finalized':
|
|
279
|
-
await this.handleChainFinalized(
|
|
279
|
+
await this.handleChainFinalized(event.block.number);
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
@@ -349,12 +349,12 @@ export class ServerWorldStateSynchronizer
|
|
|
349
349
|
if (this.historyToKeep === undefined) {
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
|
-
const newHistoricBlock =
|
|
353
|
-
if (newHistoricBlock <=
|
|
352
|
+
const newHistoricBlock = summary.finalizedBlockNumber - this.historyToKeep + 1;
|
|
353
|
+
if (newHistoricBlock <= 1) {
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
356
|
this.log.verbose(`Pruning historic blocks to ${newHistoricBlock}`);
|
|
357
|
-
const status = await this.merkleTreeDb.removeHistoricalBlocks(newHistoricBlock);
|
|
357
|
+
const status = await this.merkleTreeDb.removeHistoricalBlocks(BlockNumber(newHistoricBlock));
|
|
358
358
|
this.log.debug(`World state summary `, status.summary);
|
|
359
359
|
}
|
|
360
360
|
|