@aztec/prover-client 0.0.1-commit.9b94fc1 → 0.0.1-commit.b468ad8

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.
Files changed (107) hide show
  1. package/dest/config.d.ts +2 -2
  2. package/dest/config.d.ts.map +1 -1
  3. package/dest/config.js +1 -1
  4. package/dest/light/index.d.ts +2 -0
  5. package/dest/light/index.d.ts.map +1 -0
  6. package/dest/light/index.js +1 -0
  7. package/dest/light/lightweight_checkpoint_builder.d.ts +33 -14
  8. package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -1
  9. package/dest/light/lightweight_checkpoint_builder.js +116 -23
  10. package/dest/mocks/fixtures.d.ts +1 -1
  11. package/dest/mocks/fixtures.d.ts.map +1 -1
  12. package/dest/mocks/fixtures.js +6 -5
  13. package/dest/mocks/test_context.d.ts +5 -3
  14. package/dest/mocks/test_context.d.ts.map +1 -1
  15. package/dest/mocks/test_context.js +25 -11
  16. package/dest/orchestrator/block-building-helpers.d.ts +4 -4
  17. package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
  18. package/dest/orchestrator/block-building-helpers.js +5 -4
  19. package/dest/orchestrator/block-proving-state.d.ts +5 -4
  20. package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
  21. package/dest/orchestrator/block-proving-state.js +1 -1
  22. package/dest/orchestrator/checkpoint-proving-state.d.ts +20 -6
  23. package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
  24. package/dest/orchestrator/checkpoint-proving-state.js +40 -5
  25. package/dest/orchestrator/epoch-proving-state.d.ts +8 -7
  26. package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
  27. package/dest/orchestrator/epoch-proving-state.js +36 -2
  28. package/dest/orchestrator/orchestrator.d.ts +23 -8
  29. package/dest/orchestrator/orchestrator.d.ts.map +1 -1
  30. package/dest/orchestrator/orchestrator.js +540 -137
  31. package/dest/orchestrator/orchestrator_metrics.d.ts +1 -3
  32. package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
  33. package/dest/orchestrator/orchestrator_metrics.js +2 -15
  34. package/dest/orchestrator/tx-proving-state.d.ts +6 -5
  35. package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
  36. package/dest/orchestrator/tx-proving-state.js +8 -8
  37. package/dest/prover-client/factory.d.ts +3 -3
  38. package/dest/prover-client/factory.d.ts.map +1 -1
  39. package/dest/prover-client/prover-client.d.ts +3 -3
  40. package/dest/prover-client/prover-client.d.ts.map +1 -1
  41. package/dest/prover-client/prover-client.js +7 -4
  42. package/dest/prover-client/server-epoch-prover.d.ts +5 -5
  43. package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
  44. package/dest/proving_broker/broker_prover_facade.d.ts +7 -5
  45. package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
  46. package/dest/proving_broker/broker_prover_facade.js +6 -13
  47. package/dest/proving_broker/config.d.ts +6 -2
  48. package/dest/proving_broker/config.d.ts.map +1 -1
  49. package/dest/proving_broker/config.js +8 -2
  50. package/dest/proving_broker/fixtures.js +1 -1
  51. package/dest/proving_broker/proving_agent.d.ts +5 -9
  52. package/dest/proving_broker/proving_agent.d.ts.map +1 -1
  53. package/dest/proving_broker/proving_agent.js +4 -19
  54. package/dest/proving_broker/proving_broker.d.ts +1 -1
  55. package/dest/proving_broker/proving_broker.d.ts.map +1 -1
  56. package/dest/proving_broker/proving_broker.js +4 -10
  57. package/dest/proving_broker/proving_broker_database/persisted.d.ts +3 -2
  58. package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
  59. package/dest/proving_broker/proving_broker_database/persisted.js +389 -1
  60. package/dest/proving_broker/proving_broker_instrumentation.d.ts +1 -1
  61. package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
  62. package/dest/proving_broker/proving_broker_instrumentation.js +15 -35
  63. package/dest/proving_broker/proving_job_controller.d.ts +4 -3
  64. package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
  65. package/dest/proving_broker/proving_job_controller.js +8 -6
  66. package/dest/test/mock_proof_store.d.ts +3 -3
  67. package/dest/test/mock_proof_store.d.ts.map +1 -1
  68. package/dest/test/mock_prover.d.ts +2 -2
  69. package/dest/test/mock_prover.d.ts.map +1 -1
  70. package/dest/test/mock_prover.js +4 -4
  71. package/package.json +20 -19
  72. package/src/config.ts +1 -1
  73. package/src/light/index.ts +1 -0
  74. package/src/light/lightweight_checkpoint_builder.ts +178 -31
  75. package/src/mocks/fixtures.ts +6 -5
  76. package/src/mocks/test_context.ts +25 -10
  77. package/src/orchestrator/block-building-helpers.ts +5 -4
  78. package/src/orchestrator/block-proving-state.ts +3 -2
  79. package/src/orchestrator/checkpoint-proving-state.ts +56 -8
  80. package/src/orchestrator/epoch-proving-state.ts +63 -12
  81. package/src/orchestrator/orchestrator.ts +138 -121
  82. package/src/orchestrator/orchestrator_metrics.ts +2 -25
  83. package/src/orchestrator/tx-proving-state.ts +10 -14
  84. package/src/prover-client/factory.ts +6 -2
  85. package/src/prover-client/prover-client.ts +25 -15
  86. package/src/prover-client/server-epoch-prover.ts +4 -4
  87. package/src/proving_broker/broker_prover_facade.ts +10 -17
  88. package/src/proving_broker/config.ts +10 -1
  89. package/src/proving_broker/fixtures.ts +1 -1
  90. package/src/proving_broker/proving_agent.ts +6 -19
  91. package/src/proving_broker/proving_broker.ts +4 -8
  92. package/src/proving_broker/proving_broker_database/persisted.ts +15 -1
  93. package/src/proving_broker/proving_broker_instrumentation.ts +14 -35
  94. package/src/proving_broker/proving_job_controller.ts +11 -6
  95. package/src/test/mock_prover.ts +2 -14
  96. package/dest/block-factory/index.d.ts +0 -2
  97. package/dest/block-factory/index.d.ts.map +0 -1
  98. package/dest/block-factory/index.js +0 -1
  99. package/dest/block-factory/light.d.ts +0 -38
  100. package/dest/block-factory/light.d.ts.map +0 -1
  101. package/dest/block-factory/light.js +0 -108
  102. package/dest/proving_broker/proving_agent_instrumentation.d.ts +0 -8
  103. package/dest/proving_broker/proving_agent_instrumentation.d.ts.map +0 -1
  104. package/dest/proving_broker/proving_agent_instrumentation.js +0 -16
  105. package/src/block-factory/index.ts +0 -1
  106. package/src/block-factory/light.ts +0 -137
  107. package/src/proving_broker/proving_agent_instrumentation.ts +0 -21
@@ -6,23 +6,23 @@ import {
6
6
  NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
7
7
  NUM_BASE_PARITY_PER_ROOT_PARITY,
8
8
  } from '@aztec/constants';
9
- import { EpochNumber } from '@aztec/foundation/branded-types';
9
+ import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
10
10
  import { padArrayEnd } from '@aztec/foundation/collection';
11
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
12
  import { AbortError } from '@aztec/foundation/error';
12
- import { Fr } from '@aztec/foundation/fields';
13
- import { createLogger } from '@aztec/foundation/log';
13
+ import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
14
14
  import { promiseWithResolvers } from '@aztec/foundation/promise';
15
15
  import { assertLength } from '@aztec/foundation/serialize';
16
16
  import { pushTestData } from '@aztec/foundation/testing';
17
17
  import { elapsed } from '@aztec/foundation/timer';
18
18
  import type { TreeNodeLocation } from '@aztec/foundation/trees';
19
- import { readAvmMinimalPublicTxInputsFromFile } from '@aztec/simulator/public/fixtures';
20
19
  import { EthAddress } from '@aztec/stdlib/block';
21
20
  import type {
22
21
  EpochProver,
23
22
  ForkMerkleTreeOperations,
24
23
  MerkleTreeWriteOperations,
25
24
  PublicInputsAndRecursiveProof,
25
+ ReadonlyWorldStateAccess,
26
26
  ServerCircuitProver,
27
27
  } from '@aztec/stdlib/interfaces/server';
28
28
  import type { Proof } from '@aztec/stdlib/proofs';
@@ -71,7 +71,10 @@ import { EpochProvingState, type ProvingResult, type TreeSnapshots } from './epo
71
71
  import { ProvingOrchestratorMetrics } from './orchestrator_metrics.js';
72
72
  import { TxProvingState } from './tx-proving-state.js';
73
73
 
74
- const logger = createLogger('prover-client:orchestrator');
74
+ type WorldStateFork = {
75
+ fork: MerkleTreeWriteOperations;
76
+ cleanupPromise: Promise<void> | undefined;
77
+ };
75
78
 
76
79
  /**
77
80
  * Implements an event driven proving scheduler to build the recursive proof tree. The idea being:
@@ -93,14 +96,19 @@ export class ProvingOrchestrator implements EpochProver {
93
96
 
94
97
  private provingPromise: Promise<ProvingResult> | undefined = undefined;
95
98
  private metrics: ProvingOrchestratorMetrics;
96
- private dbs: Map<number, MerkleTreeWriteOperations> = new Map();
99
+ // eslint-disable-next-line aztec-custom/no-non-primitive-in-collections
100
+ private dbs: Map<BlockNumber, WorldStateFork> = new Map();
101
+ private logger: Logger;
97
102
 
98
103
  constructor(
99
- private dbProvider: ForkMerkleTreeOperations,
104
+ private dbProvider: ReadonlyWorldStateAccess & ForkMerkleTreeOperations,
100
105
  private prover: ServerCircuitProver,
101
106
  private readonly proverId: EthAddress,
107
+ private readonly cancelJobsOnStop: boolean = false,
102
108
  telemetryClient: TelemetryClient = getTelemetryClient(),
109
+ bindings?: LoggerBindings,
103
110
  ) {
111
+ this.logger = createLogger('prover-client:orchestrator', bindings);
104
112
  this.metrics = new ProvingOrchestratorMetrics(telemetryClient, 'ProvingOrchestrator');
105
113
  }
106
114
 
@@ -112,6 +120,10 @@ export class ProvingOrchestrator implements EpochProver {
112
120
  return this.proverId;
113
121
  }
114
122
 
123
+ public getNumActiveForks() {
124
+ return this.dbs.size;
125
+ }
126
+
115
127
  public stop(): Promise<void> {
116
128
  this.cancel();
117
129
  return Promise.resolve();
@@ -130,7 +142,7 @@ export class ProvingOrchestrator implements EpochProver {
130
142
 
131
143
  const { promise: _promise, resolve, reject } = promiseWithResolvers<ProvingResult>();
132
144
  const promise = _promise.catch((reason): ProvingResult => ({ status: 'failure', reason }));
133
- logger.info(`Starting epoch ${epochNumber} with ${totalNumCheckpoints} checkpoints.`);
145
+ this.logger.info(`Starting epoch ${epochNumber} with ${totalNumCheckpoints} checkpoints.`);
134
146
  this.provingState = new EpochProvingState(
135
147
  epochNumber,
136
148
  totalNumCheckpoints,
@@ -142,6 +154,14 @@ export class ProvingOrchestrator implements EpochProver {
142
154
  this.provingPromise = promise;
143
155
  }
144
156
 
157
+ /**
158
+ * Starts a new checkpoint.
159
+ * @param checkpointIndex - The index of the checkpoint in the epoch.
160
+ * @param constants - The constants for this checkpoint.
161
+ * @param l1ToL2Messages - The set of L1 to L2 messages to be inserted at the beginning of this checkpoint.
162
+ * @param totalNumBlocks - The total number of blocks expected in the checkpoint (must be at least one).
163
+ * @param headerOfLastBlockInPreviousCheckpoint - The header of the last block in the previous checkpoint.
164
+ */
145
165
  public async startNewCheckpoint(
146
166
  checkpointIndex: number,
147
167
  constants: CheckpointConstantData,
@@ -161,8 +181,8 @@ export class ProvingOrchestrator implements EpochProver {
161
181
  const lastBlockNumber = headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber;
162
182
  const db = await this.dbProvider.fork(lastBlockNumber);
163
183
 
164
- const firstBlockNumber = lastBlockNumber + 1;
165
- this.dbs.set(firstBlockNumber, db);
184
+ const firstBlockNumber = BlockNumber(lastBlockNumber + 1);
185
+ this.dbs.set(firstBlockNumber, { fork: db, cleanupPromise: undefined });
166
186
 
167
187
  // Get archive sibling path before any block in this checkpoint lands.
168
188
  const lastArchiveSiblingPath = await getLastSiblingPath(MerkleTreeId.ARCHIVE, db);
@@ -199,7 +219,7 @@ export class ProvingOrchestrator implements EpochProver {
199
219
  @trackSpan('ProvingOrchestrator.startNewBlock', blockNumber => ({
200
220
  [Attributes.BLOCK_NUMBER]: blockNumber,
201
221
  }))
202
- public async startNewBlock(blockNumber: number, timestamp: UInt64, totalNumTxs: number) {
222
+ public async startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number) {
203
223
  if (!this.provingState) {
204
224
  throw new Error('Empty epoch proving state. Call startNewEpoch before starting a block.');
205
225
  }
@@ -214,15 +234,15 @@ export class ProvingOrchestrator implements EpochProver {
214
234
  }
215
235
 
216
236
  const constants = checkpointProvingState.constants;
217
- logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber}.`);
237
+ this.logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber}.`);
218
238
 
219
239
  // Fork the db only when it's not already set. The db for the first block is set in `startNewCheckpoint`.
220
240
  if (!this.dbs.has(blockNumber)) {
221
241
  // Fork world state at the end of the immediately previous block
222
- const db = await this.dbProvider.fork(blockNumber - 1);
223
- this.dbs.set(blockNumber, db);
242
+ const db = await this.dbProvider.fork(BlockNumber(blockNumber - 1));
243
+ this.dbs.set(blockNumber, { fork: db, cleanupPromise: undefined });
224
244
  }
225
- const db = this.dbs.get(blockNumber)!;
245
+ const db = this.dbs.get(blockNumber)!.fork;
226
246
 
227
247
  // Get archive snapshot and sibling path before any txs in this block lands.
228
248
  const lastArchiveTreeSnapshot = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
@@ -254,7 +274,8 @@ export class ProvingOrchestrator implements EpochProver {
254
274
  await endSpongeBlob.absorb(blockEndBlobFields);
255
275
  blockProvingState.setEndSpongeBlob(endSpongeBlob);
256
276
 
257
- // And also try to accumulate the blobs as far as we can:
277
+ // Try to accumulate the out hashes and blobs as far as we can:
278
+ await this.provingState.accumulateCheckpointOutHashes();
258
279
  await this.provingState.setBlobAccumulators();
259
280
  }
260
281
  }
@@ -274,11 +295,11 @@ export class ProvingOrchestrator implements EpochProver {
274
295
  if (!txs.length) {
275
296
  // To avoid an ugly throw below. If we require an empty block, we can just call setBlockCompleted
276
297
  // on a block with no txs. We cannot do that here because we cannot find the blockNumber without any txs.
277
- logger.warn(`Provided no txs to orchestrator addTxs.`);
298
+ this.logger.warn(`Provided no txs to orchestrator addTxs.`);
278
299
  return;
279
300
  }
280
301
 
281
- const blockNumber = txs[0].globalVariables.blockNumber;
302
+ const blockNumber = BlockNumber(txs[0].globalVariables.blockNumber);
282
303
  const provingState = this.provingState.getBlockProvingStateByBlockNumber(blockNumber!);
283
304
  if (!provingState) {
284
305
  throw new Error(`Proving state for block ${blockNumber} not found. Call startNewBlock first.`);
@@ -294,9 +315,9 @@ export class ProvingOrchestrator implements EpochProver {
294
315
  throw new Error(`Block ${blockNumber} has been initialized with transactions.`);
295
316
  }
296
317
 
297
- logger.info(`Adding ${txs.length} transactions to block ${blockNumber}`);
318
+ this.logger.info(`Adding ${txs.length} transactions to block ${blockNumber}`);
298
319
 
299
- const db = this.dbs.get(blockNumber)!;
320
+ const db = this.dbs.get(blockNumber)!.fork;
300
321
  const lastArchive = provingState.lastArchiveTreeSnapshot;
301
322
  const newL1ToL2MessageTreeSnapshot = provingState.newL1ToL2MessageTreeSnapshot;
302
323
  const spongeBlobState = provingState.getStartSpongeBlob().clone();
@@ -309,7 +330,7 @@ export class ProvingOrchestrator implements EpochProver {
309
330
 
310
331
  validateTx(tx);
311
332
 
312
- logger.info(`Received transaction: ${tx.hash}`);
333
+ this.logger.debug(`Received transaction: ${tx.hash}`);
313
334
 
314
335
  const startSpongeBlob = spongeBlobState.clone();
315
336
  const [hints, treeSnapshots] = await this.prepareBaseRollupInputs(
@@ -330,10 +351,10 @@ export class ProvingOrchestrator implements EpochProver {
330
351
  const txIndex = provingState.addNewTx(txProvingState);
331
352
  if (txProvingState.requireAvmProof) {
332
353
  this.getOrEnqueueChonkVerifier(provingState, txIndex);
333
- logger.debug(`Enqueueing public VM for tx ${txIndex}`);
354
+ this.logger.debug(`Enqueueing public VM for tx ${txIndex}`);
334
355
  this.enqueueVM(provingState, txIndex);
335
356
  } else {
336
- logger.debug(`Enqueueing base rollup for private-only tx ${txIndex}`);
357
+ this.logger.debug(`Enqueueing base rollup for private-only tx ${txIndex}`);
337
358
  this.enqueueBaseRollup(provingState, txIndex);
338
359
  }
339
360
  } catch (err: any) {
@@ -351,7 +372,8 @@ export class ProvingOrchestrator implements EpochProver {
351
372
 
352
373
  provingState.setEndSpongeBlob(spongeBlobState);
353
374
 
354
- // Txs have been added to the block. Now try to accumulate the blobs as far as we can:
375
+ // Txs have been added to the block. Now try to accumulate the out hashes and blobs as far as we can:
376
+ await this.provingState.accumulateCheckpointOutHashes();
355
377
  await this.provingState.setBlobAccumulators();
356
378
  }
357
379
 
@@ -375,7 +397,7 @@ export class ProvingOrchestrator implements EpochProver {
375
397
  typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
376
398
  >
377
399
  >();
378
- logger.debug(`Starting chonk verifier circuit for tx ${txHash}`);
400
+ this.logger.debug(`Starting chonk verifier circuit for tx ${txHash}`);
379
401
  this.doEnqueueChonkVerifier(txHash, privateInputs, proof => {
380
402
  tubeProof.resolve(proof);
381
403
  });
@@ -388,10 +410,10 @@ export class ProvingOrchestrator implements EpochProver {
388
410
  * Marks the block as completed.
389
411
  * Computes the block header and updates the archive tree.
390
412
  */
391
- @trackSpan('ProvingOrchestrator.setBlockCompleted', (blockNumber: number) => ({
413
+ @trackSpan('ProvingOrchestrator.setBlockCompleted', (blockNumber: BlockNumber) => ({
392
414
  [Attributes.BLOCK_NUMBER]: blockNumber,
393
415
  }))
394
- public async setBlockCompleted(blockNumber: number, expectedHeader?: BlockHeader): Promise<BlockHeader> {
416
+ public async setBlockCompleted(blockNumber: BlockNumber, expectedHeader?: BlockHeader): Promise<BlockHeader> {
395
417
  const provingState = this.provingState?.getBlockProvingStateByBlockNumber(blockNumber);
396
418
  if (!provingState) {
397
419
  throw new Error(`Block proving state for ${blockNumber} not found`);
@@ -415,19 +437,19 @@ export class ProvingOrchestrator implements EpochProver {
415
437
  }
416
438
 
417
439
  // Given we've applied every change from this block, now assemble the block header:
418
- logger.verbose(`Block ${blockNumber} completed. Assembling header.`);
440
+ this.logger.verbose(`Block ${blockNumber} completed. Assembling header.`);
419
441
  const header = await provingState.buildBlockHeader();
420
442
 
421
443
  if (expectedHeader && !header.equals(expectedHeader)) {
422
- logger.error(`Block header mismatch: header=${header} expectedHeader=${expectedHeader}`);
444
+ this.logger.error(`Block header mismatch: header=${header} expectedHeader=${expectedHeader}`);
423
445
  throw new Error('Block header mismatch');
424
446
  }
425
447
 
426
448
  // Get db for this block
427
- const db = this.dbs.get(provingState.blockNumber)!;
449
+ const db = this.dbs.get(provingState.blockNumber)!.fork;
428
450
 
429
451
  // Update the archive tree, so we're ready to start processing the next block:
430
- logger.verbose(
452
+ this.logger.verbose(
431
453
  `Updating archive tree with block ${provingState.blockNumber} header ${(await header.hash()).toString()}`,
432
454
  );
433
455
  await db.updateArchive(header);
@@ -441,31 +463,31 @@ export class ProvingOrchestrator implements EpochProver {
441
463
  protected async verifyBuiltBlockAgainstSyncedState(provingState: BlockProvingState) {
442
464
  const builtBlockHeader = provingState.getBuiltBlockHeader();
443
465
  if (!builtBlockHeader) {
444
- logger.debug('Block header not built yet, skipping header check.');
466
+ this.logger.debug('Block header not built yet, skipping header check.');
445
467
  return;
446
468
  }
447
469
 
448
470
  const output = provingState.getBlockRootRollupOutput();
449
471
  if (!output) {
450
- logger.debug('Block root rollup proof not built yet, skipping header check.');
472
+ this.logger.debug('Block root rollup proof not built yet, skipping header check.');
451
473
  return;
452
474
  }
453
475
  const header = await buildHeaderFromCircuitOutputs(output);
454
476
 
455
477
  if (!(await header.hash()).equals(await builtBlockHeader.hash())) {
456
- logger.error(`Block header mismatch.\nCircuit: ${inspect(header)}\nComputed: ${inspect(builtBlockHeader)}`);
478
+ this.logger.error(`Block header mismatch.\nCircuit: ${inspect(header)}\nComputed: ${inspect(builtBlockHeader)}`);
457
479
  provingState.reject(`Block header hash mismatch.`);
458
480
  return;
459
481
  }
460
482
 
461
483
  // Get db for this block
462
484
  const blockNumber = provingState.blockNumber;
463
- const db = this.dbs.get(blockNumber)!;
485
+ const db = this.dbs.get(blockNumber)!.fork;
464
486
 
465
487
  const newArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
466
488
  const syncedArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, this.dbProvider.getSnapshot(blockNumber));
467
489
  if (!syncedArchive.equals(newArchive)) {
468
- logger.error(
490
+ this.logger.error(
469
491
  `Archive tree mismatch for block ${blockNumber}: world state synced to ${inspect(
470
492
  syncedArchive,
471
493
  )} but built ${inspect(newArchive)}`,
@@ -476,7 +498,7 @@ export class ProvingOrchestrator implements EpochProver {
476
498
 
477
499
  const circuitArchive = output.newArchive;
478
500
  if (!newArchive.equals(circuitArchive)) {
479
- logger.error(`New archive mismatch.\nCircuit: ${output.newArchive}\nComputed: ${newArchive}`);
501
+ this.logger.error(`New archive mismatch.\nCircuit: ${output.newArchive}\nComputed: ${newArchive}`);
480
502
  provingState.reject(`New archive mismatch.`);
481
503
  return;
482
504
  }
@@ -485,20 +507,19 @@ export class ProvingOrchestrator implements EpochProver {
485
507
  // is aborted and never reaches this point, it will leak the fork. We need to add a global cleanup,
486
508
  // but have to make sure it only runs once all operations are completed, otherwise some function here
487
509
  // will attempt to access the fork after it was closed.
488
- logger.debug(`Cleaning up world state fork for ${blockNumber}`);
489
- void this.dbs
490
- .get(blockNumber)
491
- ?.close()
492
- .then(() => this.dbs.delete(blockNumber))
493
- .catch(err => logger.error(`Error closing db for block ${blockNumber}`, err));
510
+ void this.cleanupDBFork(blockNumber);
494
511
  }
495
512
 
496
513
  /**
497
- * Cancel any further proving
514
+ * Cancel any further proving.
515
+ * If cancelJobsOnStop is true, aborts all pending jobs with the broker (which marks them as 'Aborted').
516
+ * If cancelJobsOnStop is false (default), jobs remain in the broker queue and can be reused on restart/reorg.
498
517
  */
499
518
  public cancel() {
500
- for (const controller of this.pendingProvingJobs) {
501
- controller.abort();
519
+ if (this.cancelJobsOnStop) {
520
+ for (const controller of this.pendingProvingJobs) {
521
+ controller.abort();
522
+ }
502
523
  }
503
524
 
504
525
  this.provingState?.cancel();
@@ -533,6 +554,24 @@ export class ProvingOrchestrator implements EpochProver {
533
554
  return epochProofResult;
534
555
  }
535
556
 
557
+ private async cleanupDBFork(blockNumber: BlockNumber): Promise<void> {
558
+ this.logger.debug(`Cleaning up world state fork for ${blockNumber}`);
559
+ const fork = this.dbs.get(blockNumber);
560
+ if (!fork) {
561
+ return;
562
+ }
563
+
564
+ try {
565
+ if (!fork.cleanupPromise) {
566
+ fork.cleanupPromise = fork.fork.close();
567
+ }
568
+ await fork.cleanupPromise;
569
+ this.dbs.delete(blockNumber);
570
+ } catch (err) {
571
+ this.logger.error(`Error closing db for block ${blockNumber}`, err);
572
+ }
573
+ }
574
+
536
575
  /**
537
576
  * Enqueue a job to be scheduled
538
577
  * @param provingState - The proving state object being operated on
@@ -545,7 +584,7 @@ export class ProvingOrchestrator implements EpochProver {
545
584
  callback: (result: T) => void | Promise<void>,
546
585
  ) {
547
586
  if (!provingState.verifyState()) {
548
- logger.debug(`Not enqueuing job, state no longer valid`);
587
+ this.logger.debug(`Not enqueuing job, state no longer valid`);
549
588
  return;
550
589
  }
551
590
 
@@ -563,7 +602,7 @@ export class ProvingOrchestrator implements EpochProver {
563
602
 
564
603
  const result = await request(controller.signal);
565
604
  if (!provingState.verifyState()) {
566
- logger.debug(`State no longer valid, discarding result`);
605
+ this.logger.debug(`State no longer valid, discarding result`);
567
606
  return;
568
607
  }
569
608
 
@@ -581,7 +620,7 @@ export class ProvingOrchestrator implements EpochProver {
581
620
  return;
582
621
  }
583
622
 
584
- logger.error(`Error thrown when proving job`, err);
623
+ this.logger.error(`Error thrown when proving job`, err);
585
624
  provingState!.reject(`${err}`);
586
625
  } finally {
587
626
  const index = this.pendingProvingJobs.indexOf(controller);
@@ -666,12 +705,12 @@ export class ProvingOrchestrator implements EpochProver {
666
705
  // Executes the next level of merge if all inputs are available
667
706
  private enqueueBaseRollup(provingState: BlockProvingState, txIndex: number) {
668
707
  if (!provingState.verifyState()) {
669
- logger.debug('Not running base rollup, state invalid');
708
+ this.logger.debug('Not running base rollup, state invalid');
670
709
  return;
671
710
  }
672
711
 
673
712
  if (!provingState.tryStartProvingBase(txIndex)) {
674
- logger.debug(`Base rollup for tx ${txIndex} already started.`);
713
+ this.logger.debug(`Base rollup for tx ${txIndex} already started.`);
675
714
  return;
676
715
  }
677
716
 
@@ -679,7 +718,7 @@ export class ProvingOrchestrator implements EpochProver {
679
718
  const { processedTx } = txProvingState;
680
719
  const { rollupType, inputs } = txProvingState.getBaseRollupTypeAndInputs();
681
720
 
682
- logger.debug(`Enqueuing deferred proving base rollup for ${processedTx.hash.toString()}`);
721
+ this.logger.debug(`Enqueuing deferred proving base rollup for ${processedTx.hash.toString()}`);
683
722
 
684
723
  this.deferredProving(
685
724
  provingState,
@@ -703,7 +742,7 @@ export class ProvingOrchestrator implements EpochProver {
703
742
  },
704
743
  ),
705
744
  result => {
706
- logger.debug(`Completed proof for ${rollupType} for tx ${processedTx.hash.toString()}`);
745
+ this.logger.debug(`Completed proof for ${rollupType} for tx ${processedTx.hash.toString()}`);
707
746
  validatePartialState(result.inputs.endTreeSnapshots, txProvingState.treeSnapshots);
708
747
  const leafLocation = provingState.setBaseRollupProof(txIndex, result);
709
748
  if (provingState.totalNumTxs === 1) {
@@ -719,7 +758,7 @@ export class ProvingOrchestrator implements EpochProver {
719
758
  // Once completed, will enqueue the the public tx base rollup.
720
759
  private getOrEnqueueChonkVerifier(provingState: BlockProvingState, txIndex: number) {
721
760
  if (!provingState.verifyState()) {
722
- logger.debug('Not running chonk verifier circuit, state invalid');
761
+ this.logger.debug('Not running chonk verifier circuit, state invalid');
723
762
  return;
724
763
  }
725
764
 
@@ -732,19 +771,19 @@ export class ProvingOrchestrator implements EpochProver {
732
771
  typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
733
772
  >,
734
773
  ) => {
735
- logger.debug(`Got chonk verifier proof for tx index: ${txIndex}`, { txHash });
774
+ this.logger.debug(`Got chonk verifier proof for tx index: ${txIndex}`, { txHash });
736
775
  txProvingState.setPublicChonkVerifierProof(result);
737
776
  this.provingState?.cachedChonkVerifierProofs.delete(txHash);
738
777
  this.checkAndEnqueueBaseRollup(provingState, txIndex);
739
778
  };
740
779
 
741
780
  if (this.provingState?.cachedChonkVerifierProofs.has(txHash)) {
742
- logger.debug(`Chonk verifier proof already enqueued for tx index: ${txIndex}`, { txHash });
781
+ this.logger.debug(`Chonk verifier proof already enqueued for tx index: ${txIndex}`, { txHash });
743
782
  void this.provingState!.cachedChonkVerifierProofs.get(txHash)!.then(handleResult);
744
783
  return;
745
784
  }
746
785
 
747
- logger.debug(`Enqueuing chonk verifier circuit for tx index: ${txIndex}`);
786
+ this.logger.debug(`Enqueuing chonk verifier circuit for tx index: ${txIndex}`);
748
787
  this.doEnqueueChonkVerifier(txHash, txProvingState.getPublicChonkVerifierPrivateInputs(), handleResult);
749
788
  }
750
789
 
@@ -760,7 +799,7 @@ export class ProvingOrchestrator implements EpochProver {
760
799
  provingState: EpochProvingState | BlockProvingState = this.provingState!,
761
800
  ) {
762
801
  if (!provingState.verifyState()) {
763
- logger.debug('Not running chonk verifier circuit, state invalid');
802
+ this.logger.debug('Not running chonk verifier circuit, state invalid');
764
803
  return;
765
804
  }
766
805
 
@@ -783,12 +822,12 @@ export class ProvingOrchestrator implements EpochProver {
783
822
  // Enqueues the next level of merge if all inputs are available
784
823
  private enqueueMergeRollup(provingState: BlockProvingState, location: TreeNodeLocation) {
785
824
  if (!provingState.verifyState()) {
786
- logger.debug('Not running merge rollup. State no longer valid.');
825
+ this.logger.debug('Not running merge rollup. State no longer valid.');
787
826
  return;
788
827
  }
789
828
 
790
829
  if (!provingState.tryStartProvingMerge(location)) {
791
- logger.debug('Merge rollup already started.');
830
+ this.logger.debug('Merge rollup already started.');
792
831
  return;
793
832
  }
794
833
 
@@ -814,18 +853,18 @@ export class ProvingOrchestrator implements EpochProver {
814
853
  // Executes the block root rollup circuit
815
854
  private enqueueBlockRootRollup(provingState: BlockProvingState) {
816
855
  if (!provingState.verifyState()) {
817
- logger.debug('Not running block root rollup, state no longer valid');
856
+ this.logger.debug('Not running block root rollup, state no longer valid');
818
857
  return;
819
858
  }
820
859
 
821
860
  if (!provingState.tryStartProvingBlockRoot()) {
822
- logger.debug('Block root rollup already started.');
861
+ this.logger.debug('Block root rollup already started.');
823
862
  return;
824
863
  }
825
864
 
826
865
  const { rollupType, inputs } = provingState.getBlockRootRollupTypeAndInputs();
827
866
 
828
- logger.debug(`Enqueuing ${rollupType} for block ${provingState.blockNumber}.`);
867
+ this.logger.debug(`Enqueuing ${rollupType} for block ${provingState.blockNumber}.`);
829
868
 
830
869
  this.deferredProving(
831
870
  provingState,
@@ -850,19 +889,22 @@ export class ProvingOrchestrator implements EpochProver {
850
889
  },
851
890
  ),
852
891
  async result => {
853
- // If the proofs were slower than the block header building, then we need to try validating the block header hashes here.
854
- await this.verifyBuiltBlockAgainstSyncedState(provingState);
855
-
856
- logger.debug(`Completed ${rollupType} proof for block ${provingState.blockNumber}`);
892
+ this.logger.debug(`Completed ${rollupType} proof for block ${provingState.blockNumber}`);
857
893
 
858
894
  const leafLocation = provingState.setBlockRootRollupProof(result);
859
895
  const checkpointProvingState = provingState.parentCheckpoint;
860
896
 
897
+ // If the proofs were slower than the block header building, then we need to try validating the block header hashes here.
898
+ await this.verifyBuiltBlockAgainstSyncedState(provingState);
899
+
861
900
  if (checkpointProvingState.totalNumBlocks === 1) {
862
901
  this.checkAndEnqueueCheckpointRootRollup(checkpointProvingState);
863
902
  } else {
864
903
  this.checkAndEnqueueNextBlockMergeRollup(checkpointProvingState, leafLocation);
865
904
  }
905
+
906
+ // We are finished with the block at this point, ensure the fork is cleaned up
907
+ void this.cleanupDBFork(provingState.blockNumber);
866
908
  },
867
909
  );
868
910
  }
@@ -875,12 +917,12 @@ export class ProvingOrchestrator implements EpochProver {
875
917
  baseParityIndex: number,
876
918
  ) {
877
919
  if (!provingState.verifyState()) {
878
- logger.debug('Not running base parity. State no longer valid.');
920
+ this.logger.debug('Not running base parity. State no longer valid.');
879
921
  return;
880
922
  }
881
923
 
882
924
  if (!provingState.tryStartProvingBaseParity(baseParityIndex)) {
883
- logger.warn(`Base parity ${baseParityIndex} already started.`);
925
+ this.logger.warn(`Base parity ${baseParityIndex} already started.`);
884
926
  return;
885
927
  }
886
928
 
@@ -915,12 +957,12 @@ export class ProvingOrchestrator implements EpochProver {
915
957
  // Enqueues the root rollup proof if all inputs are available
916
958
  private enqueueRootParityCircuit(provingState: BlockProvingState) {
917
959
  if (!provingState.verifyState()) {
918
- logger.debug('Not running root parity. State no longer valid.');
960
+ this.logger.debug('Not running root parity. State no longer valid.');
919
961
  return;
920
962
  }
921
963
 
922
964
  if (!provingState.tryStartProvingRootParity()) {
923
- logger.debug('Root parity already started.');
965
+ this.logger.debug('Root parity already started.');
924
966
  return;
925
967
  }
926
968
 
@@ -947,12 +989,12 @@ export class ProvingOrchestrator implements EpochProver {
947
989
  // Enqueues the next level of merge if all inputs are available
948
990
  private enqueueBlockMergeRollup(provingState: CheckpointProvingState, location: TreeNodeLocation) {
949
991
  if (!provingState.verifyState()) {
950
- logger.debug('Not running block merge rollup. State no longer valid.');
992
+ this.logger.debug('Not running block merge rollup. State no longer valid.');
951
993
  return;
952
994
  }
953
995
 
954
996
  if (!provingState.tryStartProvingBlockMerge(location)) {
955
- logger.debug('Block merge rollup already started.');
997
+ this.logger.debug('Block merge rollup already started.');
956
998
  return;
957
999
  }
958
1000
 
@@ -976,18 +1018,18 @@ export class ProvingOrchestrator implements EpochProver {
976
1018
 
977
1019
  private enqueueCheckpointRootRollup(provingState: CheckpointProvingState) {
978
1020
  if (!provingState.verifyState()) {
979
- logger.debug('Not running checkpoint root rollup. State no longer valid.');
1021
+ this.logger.debug('Not running checkpoint root rollup. State no longer valid.');
980
1022
  return;
981
1023
  }
982
1024
 
983
1025
  if (!provingState.tryStartProvingCheckpointRoot()) {
984
- logger.debug('Checkpoint root rollup already started.');
1026
+ this.logger.debug('Checkpoint root rollup already started.');
985
1027
  return;
986
1028
  }
987
1029
 
988
1030
  const rollupType = provingState.getCheckpointRootRollupType();
989
1031
 
990
- logger.debug(`Enqueuing ${rollupType} for checkpoint ${provingState.index}.`);
1032
+ this.logger.debug(`Enqueuing ${rollupType} for checkpoint ${provingState.index}.`);
991
1033
 
992
1034
  const inputs = provingState.getCheckpointRootRollupInputs();
993
1035
 
@@ -1011,7 +1053,7 @@ export class ProvingOrchestrator implements EpochProver {
1011
1053
  const computedEndBlobAccumulatorState = provingState.getEndBlobAccumulator()!.toBlobAccumulator();
1012
1054
  const circuitEndBlobAccumulatorState = result.inputs.endBlobAccumulator;
1013
1055
  if (!circuitEndBlobAccumulatorState.equals(computedEndBlobAccumulatorState)) {
1014
- logger.error(
1056
+ this.logger.error(
1015
1057
  `Blob accumulator state mismatch.\nCircuit: ${inspect(circuitEndBlobAccumulatorState)}\nComputed: ${inspect(
1016
1058
  computedEndBlobAccumulatorState,
1017
1059
  )}`,
@@ -1020,7 +1062,7 @@ export class ProvingOrchestrator implements EpochProver {
1020
1062
  return;
1021
1063
  }
1022
1064
 
1023
- logger.debug(`Completed ${rollupType} proof for checkpoint ${provingState.index}.`);
1065
+ this.logger.debug(`Completed ${rollupType} proof for checkpoint ${provingState.index}.`);
1024
1066
 
1025
1067
  const leafLocation = provingState.setCheckpointRootRollupProof(result);
1026
1068
  const epochProvingState = provingState.parentEpoch;
@@ -1036,12 +1078,12 @@ export class ProvingOrchestrator implements EpochProver {
1036
1078
 
1037
1079
  private enqueueCheckpointMergeRollup(provingState: EpochProvingState, location: TreeNodeLocation) {
1038
1080
  if (!provingState.verifyState()) {
1039
- logger.debug('Not running checkpoint merge rollup. State no longer valid.');
1081
+ this.logger.debug('Not running checkpoint merge rollup. State no longer valid.');
1040
1082
  return;
1041
1083
  }
1042
1084
 
1043
1085
  if (!provingState.tryStartProvingCheckpointMerge(location)) {
1044
- logger.debug('Checkpoint merge rollup already started.');
1086
+ this.logger.debug('Checkpoint merge rollup already started.');
1045
1087
  return;
1046
1088
  }
1047
1089
 
@@ -1058,7 +1100,7 @@ export class ProvingOrchestrator implements EpochProver {
1058
1100
  signal => this.prover.getCheckpointMergeRollupProof(inputs, signal, provingState.epochNumber),
1059
1101
  ),
1060
1102
  result => {
1061
- logger.debug('Completed proof for checkpoint merge rollup.');
1103
+ this.logger.debug('Completed proof for checkpoint merge rollup.');
1062
1104
  provingState.setCheckpointMergeRollupProof(location, result);
1063
1105
  this.checkAndEnqueueNextCheckpointMergeRollup(provingState, location);
1064
1106
  },
@@ -1067,16 +1109,16 @@ export class ProvingOrchestrator implements EpochProver {
1067
1109
 
1068
1110
  private enqueueEpochPadding(provingState: EpochProvingState) {
1069
1111
  if (!provingState.verifyState()) {
1070
- logger.debug('Not running epoch padding. State no longer valid.');
1112
+ this.logger.debug('Not running epoch padding. State no longer valid.');
1071
1113
  return;
1072
1114
  }
1073
1115
 
1074
1116
  if (!provingState.tryStartProvingPaddingCheckpoint()) {
1075
- logger.debug('Padding checkpoint already started.');
1117
+ this.logger.debug('Padding checkpoint already started.');
1076
1118
  return;
1077
1119
  }
1078
1120
 
1079
- logger.debug('Padding epoch proof with a padding block root proof.');
1121
+ this.logger.debug('Padding epoch proof with a padding block root proof.');
1080
1122
 
1081
1123
  const inputs = provingState.getPaddingCheckpointInputs();
1082
1124
 
@@ -1091,7 +1133,7 @@ export class ProvingOrchestrator implements EpochProver {
1091
1133
  signal => this.prover.getCheckpointPaddingRollupProof(inputs, signal, provingState.epochNumber),
1092
1134
  ),
1093
1135
  result => {
1094
- logger.debug('Completed proof for padding checkpoint.');
1136
+ this.logger.debug('Completed proof for padding checkpoint.');
1095
1137
  provingState.setCheckpointPaddingProof(result);
1096
1138
  this.checkAndEnqueueRootRollup(provingState);
1097
1139
  },
@@ -1101,11 +1143,11 @@ export class ProvingOrchestrator implements EpochProver {
1101
1143
  // Executes the root rollup circuit
1102
1144
  private enqueueRootRollup(provingState: EpochProvingState) {
1103
1145
  if (!provingState.verifyState()) {
1104
- logger.debug('Not running root rollup, state no longer valid');
1146
+ this.logger.debug('Not running root rollup, state no longer valid');
1105
1147
  return;
1106
1148
  }
1107
1149
 
1108
- logger.debug(`Preparing root rollup`);
1150
+ this.logger.debug(`Preparing root rollup`);
1109
1151
 
1110
1152
  const inputs = provingState.getRootRollupInputs();
1111
1153
 
@@ -1120,7 +1162,7 @@ export class ProvingOrchestrator implements EpochProver {
1120
1162
  signal => this.prover.getRootRollupProof(inputs, signal, provingState.epochNumber),
1121
1163
  ),
1122
1164
  result => {
1123
- logger.verbose(`Orchestrator completed root rollup for epoch ${provingState.epochNumber}`);
1165
+ this.logger.verbose(`Orchestrator completed root rollup for epoch ${provingState.epochNumber}`);
1124
1166
  provingState.setRootRollupProof(result);
1125
1167
  provingState.resolve({ status: 'success' });
1126
1168
  },
@@ -1142,7 +1184,7 @@ export class ProvingOrchestrator implements EpochProver {
1142
1184
 
1143
1185
  private checkAndEnqueueBlockRootRollup(provingState: BlockProvingState) {
1144
1186
  if (!provingState.isReadyForBlockRootRollup()) {
1145
- logger.debug('Not ready for block root rollup');
1187
+ this.logger.debug('Not ready for block root rollup');
1146
1188
  return;
1147
1189
  }
1148
1190
 
@@ -1185,7 +1227,7 @@ export class ProvingOrchestrator implements EpochProver {
1185
1227
 
1186
1228
  private checkAndEnqueueRootRollup(provingState: EpochProvingState) {
1187
1229
  if (!provingState.isReadyForRootRollup()) {
1188
- logger.debug('Not ready for root rollup');
1230
+ this.logger.debug('Not ready for root rollup');
1189
1231
  return;
1190
1232
  }
1191
1233
 
@@ -1200,14 +1242,12 @@ export class ProvingOrchestrator implements EpochProver {
1200
1242
  */
1201
1243
  private enqueueVM(provingState: BlockProvingState, txIndex: number) {
1202
1244
  if (!provingState.verifyState()) {
1203
- logger.debug(`Not running VM circuit as state is no longer valid`);
1245
+ this.logger.debug(`Not running VM circuit as state is no longer valid`);
1204
1246
  return;
1205
1247
  }
1206
1248
 
1207
1249
  const txProvingState = provingState.getTxProvingState(txIndex);
1208
1250
 
1209
- // This function tries to do AVM proving. If there is a failure, it fakes the proof unless AVM_PROVING_STRICT is defined.
1210
- // Nothing downstream depends on the AVM proof yet. So having this mode lets us incrementally build the AVM circuit.
1211
1251
  const doAvmProving = wrapCallbackInSpan(
1212
1252
  this.tracer,
1213
1253
  'ProvingOrchestrator.prover.getAvmProof',
@@ -1216,36 +1256,13 @@ export class ProvingOrchestrator implements EpochProver {
1216
1256
  },
1217
1257
  async (signal: AbortSignal) => {
1218
1258
  const inputs = txProvingState.getAvmInputs();
1219
- try {
1220
- // TODO(#14234)[Unconditional PIs validation]: Remove the whole try-catch logic and
1221
- // just keep the next line but removing the second argument (false).
1222
- return await this.prover.getAvmProof(inputs, false, signal, provingState.epochNumber);
1223
- } catch (err) {
1224
- if (process.env.AVM_PROVING_STRICT) {
1225
- logger.error(`Error thrown when proving AVM circuit with AVM_PROVING_STRICT on`, err);
1226
- throw err;
1227
- } else {
1228
- logger.warn(
1229
- `Error thrown when proving AVM circuit but AVM_PROVING_STRICT is off. Use snapshotted
1230
- AVM inputs and carrying on. ${inspect(err)}.`,
1231
- );
1232
-
1233
- try {
1234
- this.metrics.incAvmFallback();
1235
- const snapshotAvmPrivateInputs = readAvmMinimalPublicTxInputsFromFile();
1236
- return await this.prover.getAvmProof(snapshotAvmPrivateInputs, true, signal, provingState.epochNumber);
1237
- } catch (err) {
1238
- logger.error(`Error thrown when proving snapshotted AVM inputs.`, err);
1239
- throw err;
1240
- }
1241
- }
1242
- }
1259
+ return await this.prover.getAvmProof(inputs, signal, provingState.epochNumber);
1243
1260
  },
1244
1261
  );
1245
1262
 
1246
- this.deferredProving(provingState, doAvmProving, proofAndVk => {
1247
- logger.debug(`Proven VM for tx index: ${txIndex}`);
1248
- txProvingState.setAvmProof(proofAndVk);
1263
+ this.deferredProving(provingState, doAvmProving, proof => {
1264
+ this.logger.debug(`Proven VM for tx index: ${txIndex}`);
1265
+ txProvingState.setAvmProof(proof);
1249
1266
  this.checkAndEnqueueBaseRollup(provingState, txIndex);
1250
1267
  });
1251
1268
  }
@@ -1257,7 +1274,7 @@ export class ProvingOrchestrator implements EpochProver {
1257
1274
  }
1258
1275
 
1259
1276
  // We must have completed all proving (chonk verifier proof and (if required) vm proof are generated), we now move to the base rollup.
1260
- logger.debug(`Public functions completed for tx ${txIndex} enqueueing base rollup`);
1277
+ this.logger.debug(`Public functions completed for tx ${txIndex} enqueueing base rollup`);
1261
1278
 
1262
1279
  this.enqueueBaseRollup(provingState, txIndex);
1263
1280
  }