@aztec/prover-client 2.0.0-nightly.20250822 → 2.0.0-nightly.20250824
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/orchestrator/block-proving-state.js +1 -1
- package/dest/orchestrator/orchestrator.d.ts +1 -1
- package/dest/orchestrator/orchestrator.js +5 -5
- package/dest/prover-client/server-epoch-prover.d.ts +1 -1
- package/dest/prover-client/server-epoch-prover.js +2 -2
- package/dest/proving_broker/proving_broker.d.ts +1 -1
- package/dest/proving_broker/proving_broker.js +1 -1
- package/package.json +15 -15
- package/src/orchestrator/block-proving-state.ts +1 -1
- package/src/orchestrator/orchestrator.ts +5 -5
- package/src/prover-client/server-epoch-prover.ts +2 -2
- package/src/proving_broker/proving_broker.ts +1 -1
|
@@ -71,7 +71,7 @@ import { accumulateBlobs, buildBlobHints, buildHeaderFromCircuitOutputs, getEmpt
|
|
|
71
71
|
throw new Error(`Block ${this.blockNumber} already initalised.`);
|
|
72
72
|
}
|
|
73
73
|
this.baseOrMergeProvingOutputs = new UnbalancedTreeStore(numTxs);
|
|
74
|
-
//
|
|
74
|
+
// Initialize the sponge which will eventually absorb all tx effects to be added to the blob.
|
|
75
75
|
// Like l1 to l2 messages, we need to know beforehand how many effects will be absorbed.
|
|
76
76
|
this.spongeBlobState = SpongeBlob.init(numBlobFields);
|
|
77
77
|
this.totalNumTxs = numTxs;
|
|
@@ -65,7 +65,7 @@ export declare class ProvingOrchestrator implements EpochProver {
|
|
|
65
65
|
/**
|
|
66
66
|
* Returns the proof for the current epoch.
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
finalizeEpoch(): Promise<{
|
|
69
69
|
proof: import("@aztec/stdlib/proofs").Proof;
|
|
70
70
|
publicInputs: import("@aztec/stdlib/rollup").RootRollupPublicInputs;
|
|
71
71
|
batchedBlobInputs: import("@aztec/blob-lib").BatchedBlob;
|
|
@@ -178,7 +178,7 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
178
178
|
throw new Error(`Block proving state for ${blockNumber} not found`);
|
|
179
179
|
}
|
|
180
180
|
if (!provingState.spongeBlobState) {
|
|
181
|
-
// If we are completing an empty block,
|
|
181
|
+
// If we are completing an empty block, initialize the provingState.
|
|
182
182
|
// We will have 0 txs and no blob fields.
|
|
183
183
|
provingState.startNewBlock(0, 0);
|
|
184
184
|
}
|
|
@@ -219,7 +219,7 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
219
219
|
const newArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
220
220
|
const l2Block = new L2Block(newArchive, header, body);
|
|
221
221
|
await this.verifyBuiltBlockAgainstSyncedState(l2Block, newArchive);
|
|
222
|
-
logger.verbose(`Orchestrator
|
|
222
|
+
logger.verbose(`Orchestrator finalized block ${l2Block.number}`);
|
|
223
223
|
provingState.setBlock(l2Block);
|
|
224
224
|
}
|
|
225
225
|
// Flagged as protected to disable in certain unit tests
|
|
@@ -239,9 +239,9 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
241
241
|
* Returns the proof for the current epoch.
|
|
242
|
-
*/ async
|
|
242
|
+
*/ async finalizeEpoch() {
|
|
243
243
|
if (!this.provingState || !this.provingPromise) {
|
|
244
|
-
throw new Error(`Invalid proving state, an epoch must be proven before it can be
|
|
244
|
+
throw new Error(`Invalid proving state, an epoch must be proven before it can be finalized`);
|
|
245
245
|
}
|
|
246
246
|
const result = await this.provingPromise;
|
|
247
247
|
if (result.status === 'failure') {
|
|
@@ -251,7 +251,7 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
251
251
|
// TODO(MW): EpochProvingState uses this.blocks.filter(b => !!b).length as total blocks, use this below:
|
|
252
252
|
const finalBlock = this.provingState.blocks[this.provingState.totalNumBlocks - 1];
|
|
253
253
|
if (!finalBlock || !finalBlock.endBlobAccumulator) {
|
|
254
|
-
throw new Error(`Epoch's final block not ready for
|
|
254
|
+
throw new Error(`Epoch's final block not ready for finalize`);
|
|
255
255
|
}
|
|
256
256
|
const finalBatchedBlob = await finalBlock.endBlobAccumulator.finalize();
|
|
257
257
|
this.provingState.setFinalBatchedBlob(finalBatchedBlob);
|
|
@@ -15,7 +15,7 @@ export declare class ServerEpochProver implements EpochProver {
|
|
|
15
15
|
startNewEpoch(epochNumber: number, firstBlockNumber: number, totalNumBlocks: number, finalBlobBatchingChallenges: FinalBlobBatchingChallenges): void;
|
|
16
16
|
startTubeCircuits(txs: Tx[]): Promise<void>;
|
|
17
17
|
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<L2Block>;
|
|
18
|
-
|
|
18
|
+
finalizeEpoch(): Promise<{
|
|
19
19
|
publicInputs: RootRollupPublicInputs;
|
|
20
20
|
proof: Proof;
|
|
21
21
|
batchedBlobInputs: BatchedBlob;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
setBlockCompleted(blockNumber, expectedBlockHeader) {
|
|
16
16
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
return this.orchestrator.
|
|
18
|
+
finalizeEpoch() {
|
|
19
|
+
return this.orchestrator.finalizeEpoch();
|
|
20
20
|
}
|
|
21
21
|
cancel() {
|
|
22
22
|
this.orchestrator.cancel();
|
|
@@ -28,7 +28,7 @@ export declare class ProvingBroker implements ProvingJobProducer, ProvingJobCons
|
|
|
28
28
|
/**
|
|
29
29
|
* The broker keeps track of the highest epoch its seen.
|
|
30
30
|
* This information is used for garbage collection: once it reaches the next epoch, it can start pruning the database of old state.
|
|
31
|
-
* It is important that this value is
|
|
31
|
+
* It is important that this value is initialized to zero. This ensures that we don't delete any old jobs until the current
|
|
32
32
|
* process instance receives a job request informing it of the actual current highest epoch
|
|
33
33
|
* Example:
|
|
34
34
|
* proving epoch 11 - the broker will wipe all jobs for epochs 9 and lower
|
|
@@ -47,7 +47,7 @@ import { ProvingBrokerInstrumentation } from './proving_broker_instrumentation.j
|
|
|
47
47
|
/**
|
|
48
48
|
* The broker keeps track of the highest epoch its seen.
|
|
49
49
|
* This information is used for garbage collection: once it reaches the next epoch, it can start pruning the database of old state.
|
|
50
|
-
* It is important that this value is
|
|
50
|
+
* It is important that this value is initialized to zero. This ensures that we don't delete any old jobs until the current
|
|
51
51
|
* process instance receives a job request informing it of the actual current highest epoch
|
|
52
52
|
* Example:
|
|
53
53
|
* proving epoch 11 - the broker will wipe all jobs for epochs 9 and lower
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-client",
|
|
3
|
-
"version": "2.0.0-nightly.
|
|
3
|
+
"version": "2.0.0-nightly.20250824",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@aztec/bb-prover": "2.0.0-nightly.
|
|
72
|
-
"@aztec/blob-lib": "2.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "2.0.0-nightly.
|
|
74
|
-
"@aztec/ethereum": "2.0.0-nightly.
|
|
75
|
-
"@aztec/foundation": "2.0.0-nightly.
|
|
76
|
-
"@aztec/kv-store": "2.0.0-nightly.
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "2.0.0-nightly.
|
|
78
|
-
"@aztec/noir-types": "2.0.0-nightly.
|
|
79
|
-
"@aztec/protocol-contracts": "2.0.0-nightly.
|
|
80
|
-
"@aztec/simulator": "2.0.0-nightly.
|
|
81
|
-
"@aztec/stdlib": "2.0.0-nightly.
|
|
82
|
-
"@aztec/telemetry-client": "2.0.0-nightly.
|
|
83
|
-
"@aztec/world-state": "2.0.0-nightly.
|
|
71
|
+
"@aztec/bb-prover": "2.0.0-nightly.20250824",
|
|
72
|
+
"@aztec/blob-lib": "2.0.0-nightly.20250824",
|
|
73
|
+
"@aztec/constants": "2.0.0-nightly.20250824",
|
|
74
|
+
"@aztec/ethereum": "2.0.0-nightly.20250824",
|
|
75
|
+
"@aztec/foundation": "2.0.0-nightly.20250824",
|
|
76
|
+
"@aztec/kv-store": "2.0.0-nightly.20250824",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250824",
|
|
78
|
+
"@aztec/noir-types": "2.0.0-nightly.20250824",
|
|
79
|
+
"@aztec/protocol-contracts": "2.0.0-nightly.20250824",
|
|
80
|
+
"@aztec/simulator": "2.0.0-nightly.20250824",
|
|
81
|
+
"@aztec/stdlib": "2.0.0-nightly.20250824",
|
|
82
|
+
"@aztec/telemetry-client": "2.0.0-nightly.20250824",
|
|
83
|
+
"@aztec/world-state": "2.0.0-nightly.20250824",
|
|
84
84
|
"@google-cloud/storage": "^7.15.0",
|
|
85
85
|
"@iarna/toml": "^2.2.5",
|
|
86
86
|
"commander": "^12.1.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"zod": "^3.23.8"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@aztec/noir-contracts.js": "2.0.0-nightly.
|
|
93
|
+
"@aztec/noir-contracts.js": "2.0.0-nightly.20250824",
|
|
94
94
|
"@jest/globals": "^30.0.0",
|
|
95
95
|
"@types/jest": "^30.0.0",
|
|
96
96
|
"@types/node": "^22.15.17",
|
|
@@ -101,7 +101,7 @@ export class BlockProvingState {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
this.baseOrMergeProvingOutputs = new UnbalancedTreeStore(numTxs);
|
|
104
|
-
//
|
|
104
|
+
// Initialize the sponge which will eventually absorb all tx effects to be added to the blob.
|
|
105
105
|
// Like l1 to l2 messages, we need to know beforehand how many effects will be absorbed.
|
|
106
106
|
this.spongeBlobState = SpongeBlob.init(numBlobFields);
|
|
107
107
|
this.totalNumTxs = numTxs;
|
|
@@ -277,7 +277,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
if (!provingState.spongeBlobState) {
|
|
280
|
-
// If we are completing an empty block,
|
|
280
|
+
// If we are completing an empty block, initialize the provingState.
|
|
281
281
|
// We will have 0 txs and no blob fields.
|
|
282
282
|
provingState.startNewBlock(0, 0);
|
|
283
283
|
}
|
|
@@ -339,7 +339,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
339
339
|
|
|
340
340
|
await this.verifyBuiltBlockAgainstSyncedState(l2Block, newArchive);
|
|
341
341
|
|
|
342
|
-
logger.verbose(`Orchestrator
|
|
342
|
+
logger.verbose(`Orchestrator finalized block ${l2Block.number}`);
|
|
343
343
|
provingState.setBlock(l2Block);
|
|
344
344
|
}
|
|
345
345
|
|
|
@@ -369,9 +369,9 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
369
369
|
/**
|
|
370
370
|
* Returns the proof for the current epoch.
|
|
371
371
|
*/
|
|
372
|
-
public async
|
|
372
|
+
public async finalizeEpoch() {
|
|
373
373
|
if (!this.provingState || !this.provingPromise) {
|
|
374
|
-
throw new Error(`Invalid proving state, an epoch must be proven before it can be
|
|
374
|
+
throw new Error(`Invalid proving state, an epoch must be proven before it can be finalized`);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
const result = await this.provingPromise!;
|
|
@@ -383,7 +383,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
383
383
|
// TODO(MW): EpochProvingState uses this.blocks.filter(b => !!b).length as total blocks, use this below:
|
|
384
384
|
const finalBlock = this.provingState.blocks[this.provingState.totalNumBlocks - 1];
|
|
385
385
|
if (!finalBlock || !finalBlock.endBlobAccumulator) {
|
|
386
|
-
throw new Error(`Epoch's final block not ready for
|
|
386
|
+
throw new Error(`Epoch's final block not ready for finalize`);
|
|
387
387
|
}
|
|
388
388
|
const finalBatchedBlob = await finalBlock.endBlobAccumulator.finalize();
|
|
389
389
|
this.provingState.setFinalBatchedBlob(finalBatchedBlob);
|
|
@@ -31,8 +31,8 @@ export class ServerEpochProver implements EpochProver {
|
|
|
31
31
|
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<L2Block> {
|
|
32
32
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
return this.orchestrator.
|
|
34
|
+
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
35
|
+
return this.orchestrator.finalizeEpoch();
|
|
36
36
|
}
|
|
37
37
|
cancel(): void {
|
|
38
38
|
this.orchestrator.cancel();
|
|
@@ -95,7 +95,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
|
|
|
95
95
|
/**
|
|
96
96
|
* The broker keeps track of the highest epoch its seen.
|
|
97
97
|
* This information is used for garbage collection: once it reaches the next epoch, it can start pruning the database of old state.
|
|
98
|
-
* It is important that this value is
|
|
98
|
+
* It is important that this value is initialized to zero. This ensures that we don't delete any old jobs until the current
|
|
99
99
|
* process instance receives a job request informing it of the actual current highest epoch
|
|
100
100
|
* Example:
|
|
101
101
|
* proving epoch 11 - the broker will wipe all jobs for epochs 9 and lower
|