@aztec/prover-client 0.0.1-commit.f295ac2 → 0.0.1-commit.f504929
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/light/lightweight_checkpoint_builder.d.ts +13 -6
- package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -1
- package/dest/light/lightweight_checkpoint_builder.js +44 -22
- package/dest/mocks/fixtures.d.ts +1 -1
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +2 -1
- package/dest/mocks/test_context.js +5 -2
- package/dest/orchestrator/block-building-helpers.d.ts +4 -4
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +3 -3
- package/dest/orchestrator/block-proving-state.d.ts +4 -1
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +7 -0
- package/dest/orchestrator/checkpoint-proving-state.d.ts +3 -3
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +3 -3
- package/dest/orchestrator/epoch-proving-state.d.ts +3 -3
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +5 -3
- package/dest/orchestrator/orchestrator.d.ts +9 -4
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +112 -105
- package/dest/prover-client/prover-client.d.ts +3 -3
- package/dest/prover-client/prover-client.d.ts.map +1 -1
- package/dest/prover-client/prover-client.js +15 -10
- package/dest/proving_broker/broker_prover_facade.d.ts +4 -3
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +3 -3
- package/dest/proving_broker/config.d.ts +13 -1
- package/dest/proving_broker/config.d.ts.map +1 -1
- package/dest/proving_broker/config.js +19 -2
- package/dest/proving_broker/proof_store/factory.d.ts +2 -5
- package/dest/proving_broker/proof_store/factory.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/factory.js +7 -30
- package/dest/proving_broker/proof_store/file_store_proof_store.d.ts +18 -0
- package/dest/proving_broker/proof_store/file_store_proof_store.d.ts.map +1 -0
- package/dest/proving_broker/proof_store/file_store_proof_store.js +60 -0
- package/dest/proving_broker/proof_store/index.d.ts +2 -2
- package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/index.js +1 -1
- package/dest/proving_broker/proving_agent.d.ts +4 -3
- package/dest/proving_broker/proving_agent.d.ts.map +1 -1
- package/dest/proving_broker/proving_agent.js +4 -4
- package/dest/proving_broker/proving_broker.d.ts +7 -4
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +36 -4
- package/dest/proving_broker/proving_broker_instrumentation.d.ts +3 -1
- package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_instrumentation.js +18 -7
- package/dest/proving_broker/proving_job_controller.d.ts +4 -3
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +6 -3
- package/dest/proving_broker/rpc.d.ts +4 -2
- package/dest/proving_broker/rpc.d.ts.map +1 -1
- package/dest/proving_broker/rpc.js +8 -0
- package/dest/test/mock_prover.d.ts +4 -4
- package/package.json +17 -18
- package/src/light/lightweight_checkpoint_builder.ts +52 -25
- package/src/mocks/fixtures.ts +2 -1
- package/src/mocks/test_context.ts +2 -2
- package/src/orchestrator/block-building-helpers.ts +3 -3
- package/src/orchestrator/block-proving-state.ts +9 -0
- package/src/orchestrator/checkpoint-proving-state.ts +4 -4
- package/src/orchestrator/epoch-proving-state.ts +6 -4
- package/src/orchestrator/orchestrator.ts +121 -113
- package/src/prover-client/prover-client.ts +29 -14
- package/src/proving_broker/broker_prover_facade.ts +6 -3
- package/src/proving_broker/config.ts +22 -0
- package/src/proving_broker/proof_store/factory.ts +10 -32
- package/src/proving_broker/proof_store/file_store_proof_store.ts +78 -0
- package/src/proving_broker/proof_store/index.ts +1 -1
- package/src/proving_broker/proving_agent.ts +5 -2
- package/src/proving_broker/proving_broker.ts +37 -3
- package/src/proving_broker/proving_broker_instrumentation.ts +19 -6
- package/src/proving_broker/proving_job_controller.ts +9 -3
- package/src/proving_broker/rpc.ts +14 -0
- package/dest/proving_broker/proof_store/gcs_proof_store.d.ts +0 -14
- package/dest/proving_broker/proof_store/gcs_proof_store.d.ts.map +0 -1
- package/dest/proving_broker/proof_store/gcs_proof_store.js +0 -52
- package/src/proving_broker/proof_store/gcs_proof_store.ts +0 -76
|
@@ -10,7 +10,7 @@ import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
|
10
10
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
11
11
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
12
12
|
import { AbortError } from '@aztec/foundation/error';
|
|
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';
|
|
@@ -71,8 +71,6 @@ 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');
|
|
75
|
-
|
|
76
74
|
/**
|
|
77
75
|
* Implements an event driven proving scheduler to build the recursive proof tree. The idea being:
|
|
78
76
|
* 1. Transactions are provided to the scheduler post simulation.
|
|
@@ -95,13 +93,17 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
95
93
|
private metrics: ProvingOrchestratorMetrics;
|
|
96
94
|
// eslint-disable-next-line aztec-custom/no-non-primitive-in-collections
|
|
97
95
|
private dbs: Map<BlockNumber, MerkleTreeWriteOperations> = new Map();
|
|
96
|
+
private logger: Logger;
|
|
98
97
|
|
|
99
98
|
constructor(
|
|
100
99
|
private dbProvider: ReadonlyWorldStateAccess & ForkMerkleTreeOperations,
|
|
101
100
|
private prover: ServerCircuitProver,
|
|
102
101
|
private readonly proverId: EthAddress,
|
|
102
|
+
private readonly cancelJobsOnStop: boolean = false,
|
|
103
103
|
telemetryClient: TelemetryClient = getTelemetryClient(),
|
|
104
|
+
bindings?: LoggerBindings,
|
|
104
105
|
) {
|
|
106
|
+
this.logger = createLogger('prover-client:orchestrator', bindings);
|
|
105
107
|
this.metrics = new ProvingOrchestratorMetrics(telemetryClient, 'ProvingOrchestrator');
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -135,7 +137,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
135
137
|
|
|
136
138
|
const { promise: _promise, resolve, reject } = promiseWithResolvers<ProvingResult>();
|
|
137
139
|
const promise = _promise.catch((reason): ProvingResult => ({ status: 'failure', reason }));
|
|
138
|
-
logger.info(`Starting epoch ${epochNumber} with ${totalNumCheckpoints} checkpoints.`);
|
|
140
|
+
this.logger.info(`Starting epoch ${epochNumber} with ${totalNumCheckpoints} checkpoints.`);
|
|
139
141
|
this.provingState = new EpochProvingState(
|
|
140
142
|
epochNumber,
|
|
141
143
|
totalNumCheckpoints,
|
|
@@ -227,7 +229,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
const constants = checkpointProvingState.constants;
|
|
230
|
-
logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber}.`);
|
|
232
|
+
this.logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber}.`);
|
|
231
233
|
|
|
232
234
|
// Fork the db only when it's not already set. The db for the first block is set in `startNewCheckpoint`.
|
|
233
235
|
if (!this.dbs.has(blockNumber)) {
|
|
@@ -235,7 +237,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
235
237
|
const db = await this.dbProvider.fork(BlockNumber(blockNumber - 1));
|
|
236
238
|
this.dbs.set(blockNumber, db);
|
|
237
239
|
}
|
|
238
|
-
const db = this.
|
|
240
|
+
const db = this.getDbForBlock(blockNumber);
|
|
239
241
|
|
|
240
242
|
// Get archive snapshot and sibling path before any txs in this block lands.
|
|
241
243
|
const lastArchiveTreeSnapshot = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
@@ -288,7 +290,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
288
290
|
if (!txs.length) {
|
|
289
291
|
// To avoid an ugly throw below. If we require an empty block, we can just call setBlockCompleted
|
|
290
292
|
// on a block with no txs. We cannot do that here because we cannot find the blockNumber without any txs.
|
|
291
|
-
logger.warn(`Provided no txs to orchestrator addTxs.`);
|
|
293
|
+
this.logger.warn(`Provided no txs to orchestrator addTxs.`);
|
|
292
294
|
return;
|
|
293
295
|
}
|
|
294
296
|
|
|
@@ -308,9 +310,9 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
308
310
|
throw new Error(`Block ${blockNumber} has been initialized with transactions.`);
|
|
309
311
|
}
|
|
310
312
|
|
|
311
|
-
logger.info(`Adding ${txs.length} transactions to block ${blockNumber}`);
|
|
313
|
+
this.logger.info(`Adding ${txs.length} transactions to block ${blockNumber}`);
|
|
312
314
|
|
|
313
|
-
const db = this.
|
|
315
|
+
const db = this.getDbForBlock(blockNumber);
|
|
314
316
|
const lastArchive = provingState.lastArchiveTreeSnapshot;
|
|
315
317
|
const newL1ToL2MessageTreeSnapshot = provingState.newL1ToL2MessageTreeSnapshot;
|
|
316
318
|
const spongeBlobState = provingState.getStartSpongeBlob().clone();
|
|
@@ -323,7 +325,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
323
325
|
|
|
324
326
|
validateTx(tx);
|
|
325
327
|
|
|
326
|
-
logger.debug(`Received transaction: ${tx.hash}`);
|
|
328
|
+
this.logger.debug(`Received transaction: ${tx.hash}`);
|
|
327
329
|
|
|
328
330
|
const startSpongeBlob = spongeBlobState.clone();
|
|
329
331
|
const [hints, treeSnapshots] = await this.prepareBaseRollupInputs(
|
|
@@ -344,10 +346,10 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
344
346
|
const txIndex = provingState.addNewTx(txProvingState);
|
|
345
347
|
if (txProvingState.requireAvmProof) {
|
|
346
348
|
this.getOrEnqueueChonkVerifier(provingState, txIndex);
|
|
347
|
-
logger.debug(`Enqueueing public VM for tx ${txIndex}`);
|
|
349
|
+
this.logger.debug(`Enqueueing public VM for tx ${txIndex}`);
|
|
348
350
|
this.enqueueVM(provingState, txIndex);
|
|
349
351
|
} else {
|
|
350
|
-
logger.debug(`Enqueueing base rollup for private-only tx ${txIndex}`);
|
|
352
|
+
this.logger.debug(`Enqueueing base rollup for private-only tx ${txIndex}`);
|
|
351
353
|
this.enqueueBaseRollup(provingState, txIndex);
|
|
352
354
|
}
|
|
353
355
|
} catch (err: any) {
|
|
@@ -390,7 +392,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
390
392
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
391
393
|
>
|
|
392
394
|
>();
|
|
393
|
-
logger.debug(`Starting chonk verifier circuit for tx ${txHash}`);
|
|
395
|
+
this.logger.debug(`Starting chonk verifier circuit for tx ${txHash}`);
|
|
394
396
|
this.doEnqueueChonkVerifier(txHash, privateInputs, proof => {
|
|
395
397
|
tubeProof.resolve(proof);
|
|
396
398
|
});
|
|
@@ -430,22 +432,28 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
430
432
|
}
|
|
431
433
|
|
|
432
434
|
// Given we've applied every change from this block, now assemble the block header:
|
|
433
|
-
logger.verbose(`Block ${blockNumber} completed. Assembling header.`);
|
|
435
|
+
this.logger.verbose(`Block ${blockNumber} completed. Assembling header.`);
|
|
434
436
|
const header = await provingState.buildBlockHeader();
|
|
435
437
|
|
|
436
438
|
if (expectedHeader && !header.equals(expectedHeader)) {
|
|
437
|
-
logger.error(`Block header mismatch: header=${header} expectedHeader=${expectedHeader}`);
|
|
439
|
+
this.logger.error(`Block header mismatch: header=${header} expectedHeader=${expectedHeader}`);
|
|
438
440
|
throw new Error('Block header mismatch');
|
|
439
441
|
}
|
|
440
442
|
|
|
441
|
-
// Get db for this block
|
|
442
|
-
const db = this.
|
|
443
|
+
// Get db for this block and remove from map — no other code should use it after this point.
|
|
444
|
+
const db = this.getDbForBlock(provingState.blockNumber);
|
|
445
|
+
this.dbs.delete(provingState.blockNumber);
|
|
443
446
|
|
|
444
|
-
// Update the archive tree,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
// Update the archive tree, capture the snapshot, and close the fork deterministically.
|
|
448
|
+
try {
|
|
449
|
+
this.logger.verbose(
|
|
450
|
+
`Updating archive tree with block ${provingState.blockNumber} header ${(await header.hash()).toString()}`,
|
|
451
|
+
);
|
|
452
|
+
await db.updateArchive(header);
|
|
453
|
+
provingState.setBuiltArchive(await getTreeSnapshot(MerkleTreeId.ARCHIVE, db));
|
|
454
|
+
} finally {
|
|
455
|
+
await db.close();
|
|
456
|
+
}
|
|
449
457
|
|
|
450
458
|
await this.verifyBuiltBlockAgainstSyncedState(provingState);
|
|
451
459
|
|
|
@@ -456,31 +464,34 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
456
464
|
protected async verifyBuiltBlockAgainstSyncedState(provingState: BlockProvingState) {
|
|
457
465
|
const builtBlockHeader = provingState.getBuiltBlockHeader();
|
|
458
466
|
if (!builtBlockHeader) {
|
|
459
|
-
logger.debug('Block header not built yet, skipping header check.');
|
|
467
|
+
this.logger.debug('Block header not built yet, skipping header check.');
|
|
460
468
|
return;
|
|
461
469
|
}
|
|
462
470
|
|
|
463
471
|
const output = provingState.getBlockRootRollupOutput();
|
|
464
472
|
if (!output) {
|
|
465
|
-
logger.debug('Block root rollup proof not built yet, skipping header check.');
|
|
473
|
+
this.logger.debug('Block root rollup proof not built yet, skipping header check.');
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const newArchive = provingState.getBuiltArchive();
|
|
478
|
+
if (!newArchive) {
|
|
479
|
+
this.logger.debug('Archive snapshot not yet captured, skipping header check.');
|
|
466
480
|
return;
|
|
467
481
|
}
|
|
482
|
+
|
|
468
483
|
const header = await buildHeaderFromCircuitOutputs(output);
|
|
469
484
|
|
|
470
485
|
if (!(await header.hash()).equals(await builtBlockHeader.hash())) {
|
|
471
|
-
logger.error(`Block header mismatch.\nCircuit: ${inspect(header)}\nComputed: ${inspect(builtBlockHeader)}`);
|
|
486
|
+
this.logger.error(`Block header mismatch.\nCircuit: ${inspect(header)}\nComputed: ${inspect(builtBlockHeader)}`);
|
|
472
487
|
provingState.reject(`Block header hash mismatch.`);
|
|
473
488
|
return;
|
|
474
489
|
}
|
|
475
490
|
|
|
476
|
-
// Get db for this block
|
|
477
491
|
const blockNumber = provingState.blockNumber;
|
|
478
|
-
const db = this.dbs.get(blockNumber)!;
|
|
479
|
-
|
|
480
|
-
const newArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
481
492
|
const syncedArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, this.dbProvider.getSnapshot(blockNumber));
|
|
482
493
|
if (!syncedArchive.equals(newArchive)) {
|
|
483
|
-
logger.error(
|
|
494
|
+
this.logger.error(
|
|
484
495
|
`Archive tree mismatch for block ${blockNumber}: world state synced to ${inspect(
|
|
485
496
|
syncedArchive,
|
|
486
497
|
)} but built ${inspect(newArchive)}`,
|
|
@@ -491,27 +502,38 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
491
502
|
|
|
492
503
|
const circuitArchive = output.newArchive;
|
|
493
504
|
if (!newArchive.equals(circuitArchive)) {
|
|
494
|
-
logger.error(`New archive mismatch.\nCircuit: ${output.newArchive}\nComputed: ${newArchive}`);
|
|
505
|
+
this.logger.error(`New archive mismatch.\nCircuit: ${output.newArchive}\nComputed: ${newArchive}`);
|
|
495
506
|
provingState.reject(`New archive mismatch.`);
|
|
496
507
|
return;
|
|
497
508
|
}
|
|
498
|
-
|
|
499
|
-
// TODO(palla/prover): This closes the fork only on the happy path. If this epoch orchestrator
|
|
500
|
-
// is aborted and never reaches this point, it will leak the fork. We need to add a global cleanup,
|
|
501
|
-
// but have to make sure it only runs once all operations are completed, otherwise some function here
|
|
502
|
-
// will attempt to access the fork after it was closed.
|
|
503
|
-
void this.cleanupDBFork(blockNumber);
|
|
504
509
|
}
|
|
505
510
|
|
|
506
511
|
/**
|
|
507
|
-
* Cancel any further proving
|
|
512
|
+
* Cancel any further proving.
|
|
513
|
+
* If cancelJobsOnStop is true, aborts all pending jobs with the broker (which marks them as 'Aborted').
|
|
514
|
+
* If cancelJobsOnStop is false (default), jobs remain in the broker queue and can be reused on restart/reorg.
|
|
508
515
|
*/
|
|
509
516
|
public cancel() {
|
|
510
|
-
|
|
511
|
-
controller.
|
|
517
|
+
if (this.cancelJobsOnStop) {
|
|
518
|
+
for (const controller of this.pendingProvingJobs) {
|
|
519
|
+
controller.abort();
|
|
520
|
+
}
|
|
512
521
|
}
|
|
513
522
|
|
|
514
523
|
this.provingState?.cancel();
|
|
524
|
+
|
|
525
|
+
for (const [blockNumber, db] of this.dbs.entries()) {
|
|
526
|
+
void db.close().catch(err => this.logger.error(`Error closing db for block ${blockNumber}`, err));
|
|
527
|
+
}
|
|
528
|
+
this.dbs.clear();
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
private getDbForBlock(blockNumber: BlockNumber): MerkleTreeWriteOperations {
|
|
532
|
+
const db = this.dbs.get(blockNumber);
|
|
533
|
+
if (!db) {
|
|
534
|
+
throw new Error(`World state fork for block ${blockNumber} not found.`);
|
|
535
|
+
}
|
|
536
|
+
return db;
|
|
515
537
|
}
|
|
516
538
|
|
|
517
539
|
/**
|
|
@@ -543,21 +565,6 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
543
565
|
return epochProofResult;
|
|
544
566
|
}
|
|
545
567
|
|
|
546
|
-
private async cleanupDBFork(blockNumber: BlockNumber): Promise<void> {
|
|
547
|
-
logger.debug(`Cleaning up world state fork for ${blockNumber}`);
|
|
548
|
-
const fork = this.dbs.get(blockNumber);
|
|
549
|
-
if (!fork) {
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
try {
|
|
554
|
-
await fork.close();
|
|
555
|
-
this.dbs.delete(blockNumber);
|
|
556
|
-
} catch (err) {
|
|
557
|
-
logger.error(`Error closing db for block ${blockNumber}`, err);
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
568
|
/**
|
|
562
569
|
* Enqueue a job to be scheduled
|
|
563
570
|
* @param provingState - The proving state object being operated on
|
|
@@ -570,7 +577,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
570
577
|
callback: (result: T) => void | Promise<void>,
|
|
571
578
|
) {
|
|
572
579
|
if (!provingState.verifyState()) {
|
|
573
|
-
logger.debug(`Not enqueuing job, state no longer valid`);
|
|
580
|
+
this.logger.debug(`Not enqueuing job, state no longer valid`);
|
|
574
581
|
return;
|
|
575
582
|
}
|
|
576
583
|
|
|
@@ -588,7 +595,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
588
595
|
|
|
589
596
|
const result = await request(controller.signal);
|
|
590
597
|
if (!provingState.verifyState()) {
|
|
591
|
-
logger.debug(`State no longer valid, discarding result`);
|
|
598
|
+
this.logger.debug(`State no longer valid, discarding result`);
|
|
592
599
|
return;
|
|
593
600
|
}
|
|
594
601
|
|
|
@@ -606,7 +613,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
606
613
|
return;
|
|
607
614
|
}
|
|
608
615
|
|
|
609
|
-
logger.error(`Error thrown when proving job`, err);
|
|
616
|
+
this.logger.error(`Error thrown when proving job`, err);
|
|
610
617
|
provingState!.reject(`${err}`);
|
|
611
618
|
} finally {
|
|
612
619
|
const index = this.pendingProvingJobs.indexOf(controller);
|
|
@@ -691,12 +698,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
691
698
|
// Executes the next level of merge if all inputs are available
|
|
692
699
|
private enqueueBaseRollup(provingState: BlockProvingState, txIndex: number) {
|
|
693
700
|
if (!provingState.verifyState()) {
|
|
694
|
-
logger.debug('Not running base rollup, state invalid');
|
|
701
|
+
this.logger.debug('Not running base rollup, state invalid');
|
|
695
702
|
return;
|
|
696
703
|
}
|
|
697
704
|
|
|
698
705
|
if (!provingState.tryStartProvingBase(txIndex)) {
|
|
699
|
-
logger.debug(`Base rollup for tx ${txIndex} already started.`);
|
|
706
|
+
this.logger.debug(`Base rollup for tx ${txIndex} already started.`);
|
|
700
707
|
return;
|
|
701
708
|
}
|
|
702
709
|
|
|
@@ -704,7 +711,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
704
711
|
const { processedTx } = txProvingState;
|
|
705
712
|
const { rollupType, inputs } = txProvingState.getBaseRollupTypeAndInputs();
|
|
706
713
|
|
|
707
|
-
logger.debug(`Enqueuing deferred proving base rollup for ${processedTx.hash.toString()}`);
|
|
714
|
+
this.logger.debug(`Enqueuing deferred proving base rollup for ${processedTx.hash.toString()}`);
|
|
708
715
|
|
|
709
716
|
this.deferredProving(
|
|
710
717
|
provingState,
|
|
@@ -728,7 +735,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
728
735
|
},
|
|
729
736
|
),
|
|
730
737
|
result => {
|
|
731
|
-
logger.debug(`Completed proof for ${rollupType} for tx ${processedTx.hash.toString()}`);
|
|
738
|
+
this.logger.debug(`Completed proof for ${rollupType} for tx ${processedTx.hash.toString()}`);
|
|
732
739
|
validatePartialState(result.inputs.endTreeSnapshots, txProvingState.treeSnapshots);
|
|
733
740
|
const leafLocation = provingState.setBaseRollupProof(txIndex, result);
|
|
734
741
|
if (provingState.totalNumTxs === 1) {
|
|
@@ -744,7 +751,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
744
751
|
// Once completed, will enqueue the the public tx base rollup.
|
|
745
752
|
private getOrEnqueueChonkVerifier(provingState: BlockProvingState, txIndex: number) {
|
|
746
753
|
if (!provingState.verifyState()) {
|
|
747
|
-
logger.debug('Not running chonk verifier circuit, state invalid');
|
|
754
|
+
this.logger.debug('Not running chonk verifier circuit, state invalid');
|
|
748
755
|
return;
|
|
749
756
|
}
|
|
750
757
|
|
|
@@ -757,19 +764,19 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
757
764
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
758
765
|
>,
|
|
759
766
|
) => {
|
|
760
|
-
logger.debug(`Got chonk verifier proof for tx index: ${txIndex}`, { txHash });
|
|
767
|
+
this.logger.debug(`Got chonk verifier proof for tx index: ${txIndex}`, { txHash });
|
|
761
768
|
txProvingState.setPublicChonkVerifierProof(result);
|
|
762
769
|
this.provingState?.cachedChonkVerifierProofs.delete(txHash);
|
|
763
770
|
this.checkAndEnqueueBaseRollup(provingState, txIndex);
|
|
764
771
|
};
|
|
765
772
|
|
|
766
773
|
if (this.provingState?.cachedChonkVerifierProofs.has(txHash)) {
|
|
767
|
-
logger.debug(`Chonk verifier proof already enqueued for tx index: ${txIndex}`, { txHash });
|
|
774
|
+
this.logger.debug(`Chonk verifier proof already enqueued for tx index: ${txIndex}`, { txHash });
|
|
768
775
|
void this.provingState!.cachedChonkVerifierProofs.get(txHash)!.then(handleResult);
|
|
769
776
|
return;
|
|
770
777
|
}
|
|
771
778
|
|
|
772
|
-
logger.debug(`Enqueuing chonk verifier circuit for tx index: ${txIndex}`);
|
|
779
|
+
this.logger.debug(`Enqueuing chonk verifier circuit for tx index: ${txIndex}`);
|
|
773
780
|
this.doEnqueueChonkVerifier(txHash, txProvingState.getPublicChonkVerifierPrivateInputs(), handleResult);
|
|
774
781
|
}
|
|
775
782
|
|
|
@@ -785,7 +792,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
785
792
|
provingState: EpochProvingState | BlockProvingState = this.provingState!,
|
|
786
793
|
) {
|
|
787
794
|
if (!provingState.verifyState()) {
|
|
788
|
-
logger.debug('Not running chonk verifier circuit, state invalid');
|
|
795
|
+
this.logger.debug('Not running chonk verifier circuit, state invalid');
|
|
789
796
|
return;
|
|
790
797
|
}
|
|
791
798
|
|
|
@@ -808,12 +815,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
808
815
|
// Enqueues the next level of merge if all inputs are available
|
|
809
816
|
private enqueueMergeRollup(provingState: BlockProvingState, location: TreeNodeLocation) {
|
|
810
817
|
if (!provingState.verifyState()) {
|
|
811
|
-
logger.debug('Not running merge rollup. State no longer valid.');
|
|
818
|
+
this.logger.debug('Not running merge rollup. State no longer valid.');
|
|
812
819
|
return;
|
|
813
820
|
}
|
|
814
821
|
|
|
815
822
|
if (!provingState.tryStartProvingMerge(location)) {
|
|
816
|
-
logger.debug('Merge rollup already started.');
|
|
823
|
+
this.logger.debug('Merge rollup already started.');
|
|
817
824
|
return;
|
|
818
825
|
}
|
|
819
826
|
|
|
@@ -839,18 +846,18 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
839
846
|
// Executes the block root rollup circuit
|
|
840
847
|
private enqueueBlockRootRollup(provingState: BlockProvingState) {
|
|
841
848
|
if (!provingState.verifyState()) {
|
|
842
|
-
logger.debug('Not running block root rollup, state no longer valid');
|
|
849
|
+
this.logger.debug('Not running block root rollup, state no longer valid');
|
|
843
850
|
return;
|
|
844
851
|
}
|
|
845
852
|
|
|
846
853
|
if (!provingState.tryStartProvingBlockRoot()) {
|
|
847
|
-
logger.debug('Block root rollup already started.');
|
|
854
|
+
this.logger.debug('Block root rollup already started.');
|
|
848
855
|
return;
|
|
849
856
|
}
|
|
850
857
|
|
|
851
858
|
const { rollupType, inputs } = provingState.getBlockRootRollupTypeAndInputs();
|
|
852
859
|
|
|
853
|
-
logger.debug(`Enqueuing ${rollupType} for block ${provingState.blockNumber}.`);
|
|
860
|
+
this.logger.debug(`Enqueuing ${rollupType} for block ${provingState.blockNumber}.`);
|
|
854
861
|
|
|
855
862
|
this.deferredProving(
|
|
856
863
|
provingState,
|
|
@@ -875,22 +882,20 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
875
882
|
},
|
|
876
883
|
),
|
|
877
884
|
async result => {
|
|
878
|
-
logger.debug(`Completed ${rollupType} proof for block ${provingState.blockNumber}`);
|
|
885
|
+
this.logger.debug(`Completed ${rollupType} proof for block ${provingState.blockNumber}`);
|
|
879
886
|
|
|
880
887
|
const leafLocation = provingState.setBlockRootRollupProof(result);
|
|
881
888
|
const checkpointProvingState = provingState.parentCheckpoint;
|
|
882
889
|
|
|
883
|
-
//
|
|
890
|
+
// Verification is called from both here and setBlockCompleted. Whichever runs last
|
|
891
|
+
// will be the first to see all three pieces (header, proof output, archive) and run the checks.
|
|
884
892
|
await this.verifyBuiltBlockAgainstSyncedState(provingState);
|
|
885
893
|
|
|
886
894
|
if (checkpointProvingState.totalNumBlocks === 1) {
|
|
887
|
-
this.checkAndEnqueueCheckpointRootRollup(checkpointProvingState);
|
|
895
|
+
await this.checkAndEnqueueCheckpointRootRollup(checkpointProvingState);
|
|
888
896
|
} else {
|
|
889
|
-
this.checkAndEnqueueNextBlockMergeRollup(checkpointProvingState, leafLocation);
|
|
897
|
+
await this.checkAndEnqueueNextBlockMergeRollup(checkpointProvingState, leafLocation);
|
|
890
898
|
}
|
|
891
|
-
|
|
892
|
-
// We are finished with the block at this point, ensure the fork is cleaned up
|
|
893
|
-
void this.cleanupDBFork(provingState.blockNumber);
|
|
894
899
|
},
|
|
895
900
|
);
|
|
896
901
|
}
|
|
@@ -903,12 +908,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
903
908
|
baseParityIndex: number,
|
|
904
909
|
) {
|
|
905
910
|
if (!provingState.verifyState()) {
|
|
906
|
-
logger.debug('Not running base parity. State no longer valid.');
|
|
911
|
+
this.logger.debug('Not running base parity. State no longer valid.');
|
|
907
912
|
return;
|
|
908
913
|
}
|
|
909
914
|
|
|
910
915
|
if (!provingState.tryStartProvingBaseParity(baseParityIndex)) {
|
|
911
|
-
logger.warn(`Base parity ${baseParityIndex} already started.`);
|
|
916
|
+
this.logger.warn(`Base parity ${baseParityIndex} already started.`);
|
|
912
917
|
return;
|
|
913
918
|
}
|
|
914
919
|
|
|
@@ -943,12 +948,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
943
948
|
// Enqueues the root rollup proof if all inputs are available
|
|
944
949
|
private enqueueRootParityCircuit(provingState: BlockProvingState) {
|
|
945
950
|
if (!provingState.verifyState()) {
|
|
946
|
-
logger.debug('Not running root parity. State no longer valid.');
|
|
951
|
+
this.logger.debug('Not running root parity. State no longer valid.');
|
|
947
952
|
return;
|
|
948
953
|
}
|
|
949
954
|
|
|
950
955
|
if (!provingState.tryStartProvingRootParity()) {
|
|
951
|
-
logger.debug('Root parity already started.');
|
|
956
|
+
this.logger.debug('Root parity already started.');
|
|
952
957
|
return;
|
|
953
958
|
}
|
|
954
959
|
|
|
@@ -975,12 +980,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
975
980
|
// Enqueues the next level of merge if all inputs are available
|
|
976
981
|
private enqueueBlockMergeRollup(provingState: CheckpointProvingState, location: TreeNodeLocation) {
|
|
977
982
|
if (!provingState.verifyState()) {
|
|
978
|
-
logger.debug('Not running block merge rollup. State no longer valid.');
|
|
983
|
+
this.logger.debug('Not running block merge rollup. State no longer valid.');
|
|
979
984
|
return;
|
|
980
985
|
}
|
|
981
986
|
|
|
982
987
|
if (!provingState.tryStartProvingBlockMerge(location)) {
|
|
983
|
-
logger.debug('Block merge rollup already started.');
|
|
988
|
+
this.logger.debug('Block merge rollup already started.');
|
|
984
989
|
return;
|
|
985
990
|
}
|
|
986
991
|
|
|
@@ -995,29 +1000,29 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
995
1000
|
},
|
|
996
1001
|
signal => this.prover.getBlockMergeRollupProof(inputs, signal, provingState.epochNumber),
|
|
997
1002
|
),
|
|
998
|
-
result => {
|
|
1003
|
+
async result => {
|
|
999
1004
|
provingState.setBlockMergeRollupProof(location, result);
|
|
1000
|
-
this.checkAndEnqueueNextBlockMergeRollup(provingState, location);
|
|
1005
|
+
await this.checkAndEnqueueNextBlockMergeRollup(provingState, location);
|
|
1001
1006
|
},
|
|
1002
1007
|
);
|
|
1003
1008
|
}
|
|
1004
1009
|
|
|
1005
|
-
private enqueueCheckpointRootRollup(provingState: CheckpointProvingState) {
|
|
1010
|
+
private async enqueueCheckpointRootRollup(provingState: CheckpointProvingState) {
|
|
1006
1011
|
if (!provingState.verifyState()) {
|
|
1007
|
-
logger.debug('Not running checkpoint root rollup. State no longer valid.');
|
|
1012
|
+
this.logger.debug('Not running checkpoint root rollup. State no longer valid.');
|
|
1008
1013
|
return;
|
|
1009
1014
|
}
|
|
1010
1015
|
|
|
1011
1016
|
if (!provingState.tryStartProvingCheckpointRoot()) {
|
|
1012
|
-
logger.debug('Checkpoint root rollup already started.');
|
|
1017
|
+
this.logger.debug('Checkpoint root rollup already started.');
|
|
1013
1018
|
return;
|
|
1014
1019
|
}
|
|
1015
1020
|
|
|
1016
1021
|
const rollupType = provingState.getCheckpointRootRollupType();
|
|
1017
1022
|
|
|
1018
|
-
logger.debug(`Enqueuing ${rollupType} for checkpoint ${provingState.index}.`);
|
|
1023
|
+
this.logger.debug(`Enqueuing ${rollupType} for checkpoint ${provingState.index}.`);
|
|
1019
1024
|
|
|
1020
|
-
const inputs = provingState.getCheckpointRootRollupInputs();
|
|
1025
|
+
const inputs = await provingState.getCheckpointRootRollupInputs();
|
|
1021
1026
|
|
|
1022
1027
|
this.deferredProving(
|
|
1023
1028
|
provingState,
|
|
@@ -1039,7 +1044,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1039
1044
|
const computedEndBlobAccumulatorState = provingState.getEndBlobAccumulator()!.toBlobAccumulator();
|
|
1040
1045
|
const circuitEndBlobAccumulatorState = result.inputs.endBlobAccumulator;
|
|
1041
1046
|
if (!circuitEndBlobAccumulatorState.equals(computedEndBlobAccumulatorState)) {
|
|
1042
|
-
logger.error(
|
|
1047
|
+
this.logger.error(
|
|
1043
1048
|
`Blob accumulator state mismatch.\nCircuit: ${inspect(circuitEndBlobAccumulatorState)}\nComputed: ${inspect(
|
|
1044
1049
|
computedEndBlobAccumulatorState,
|
|
1045
1050
|
)}`,
|
|
@@ -1048,7 +1053,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1048
1053
|
return;
|
|
1049
1054
|
}
|
|
1050
1055
|
|
|
1051
|
-
logger.debug(`Completed ${rollupType} proof for checkpoint ${provingState.index}.`);
|
|
1056
|
+
this.logger.debug(`Completed ${rollupType} proof for checkpoint ${provingState.index}.`);
|
|
1052
1057
|
|
|
1053
1058
|
const leafLocation = provingState.setCheckpointRootRollupProof(result);
|
|
1054
1059
|
const epochProvingState = provingState.parentEpoch;
|
|
@@ -1064,12 +1069,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1064
1069
|
|
|
1065
1070
|
private enqueueCheckpointMergeRollup(provingState: EpochProvingState, location: TreeNodeLocation) {
|
|
1066
1071
|
if (!provingState.verifyState()) {
|
|
1067
|
-
logger.debug('Not running checkpoint merge rollup. State no longer valid.');
|
|
1072
|
+
this.logger.debug('Not running checkpoint merge rollup. State no longer valid.');
|
|
1068
1073
|
return;
|
|
1069
1074
|
}
|
|
1070
1075
|
|
|
1071
1076
|
if (!provingState.tryStartProvingCheckpointMerge(location)) {
|
|
1072
|
-
logger.debug('Checkpoint merge rollup already started.');
|
|
1077
|
+
this.logger.debug('Checkpoint merge rollup already started.');
|
|
1073
1078
|
return;
|
|
1074
1079
|
}
|
|
1075
1080
|
|
|
@@ -1086,7 +1091,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1086
1091
|
signal => this.prover.getCheckpointMergeRollupProof(inputs, signal, provingState.epochNumber),
|
|
1087
1092
|
),
|
|
1088
1093
|
result => {
|
|
1089
|
-
logger.debug('Completed proof for checkpoint merge rollup.');
|
|
1094
|
+
this.logger.debug('Completed proof for checkpoint merge rollup.');
|
|
1090
1095
|
provingState.setCheckpointMergeRollupProof(location, result);
|
|
1091
1096
|
this.checkAndEnqueueNextCheckpointMergeRollup(provingState, location);
|
|
1092
1097
|
},
|
|
@@ -1095,16 +1100,16 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1095
1100
|
|
|
1096
1101
|
private enqueueEpochPadding(provingState: EpochProvingState) {
|
|
1097
1102
|
if (!provingState.verifyState()) {
|
|
1098
|
-
logger.debug('Not running epoch padding. State no longer valid.');
|
|
1103
|
+
this.logger.debug('Not running epoch padding. State no longer valid.');
|
|
1099
1104
|
return;
|
|
1100
1105
|
}
|
|
1101
1106
|
|
|
1102
1107
|
if (!provingState.tryStartProvingPaddingCheckpoint()) {
|
|
1103
|
-
logger.debug('Padding checkpoint already started.');
|
|
1108
|
+
this.logger.debug('Padding checkpoint already started.');
|
|
1104
1109
|
return;
|
|
1105
1110
|
}
|
|
1106
1111
|
|
|
1107
|
-
logger.debug('Padding epoch proof with a padding block root proof.');
|
|
1112
|
+
this.logger.debug('Padding epoch proof with a padding block root proof.');
|
|
1108
1113
|
|
|
1109
1114
|
const inputs = provingState.getPaddingCheckpointInputs();
|
|
1110
1115
|
|
|
@@ -1119,7 +1124,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1119
1124
|
signal => this.prover.getCheckpointPaddingRollupProof(inputs, signal, provingState.epochNumber),
|
|
1120
1125
|
),
|
|
1121
1126
|
result => {
|
|
1122
|
-
logger.debug('Completed proof for padding checkpoint.');
|
|
1127
|
+
this.logger.debug('Completed proof for padding checkpoint.');
|
|
1123
1128
|
provingState.setCheckpointPaddingProof(result);
|
|
1124
1129
|
this.checkAndEnqueueRootRollup(provingState);
|
|
1125
1130
|
},
|
|
@@ -1129,11 +1134,11 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1129
1134
|
// Executes the root rollup circuit
|
|
1130
1135
|
private enqueueRootRollup(provingState: EpochProvingState) {
|
|
1131
1136
|
if (!provingState.verifyState()) {
|
|
1132
|
-
logger.debug('Not running root rollup, state no longer valid');
|
|
1137
|
+
this.logger.debug('Not running root rollup, state no longer valid');
|
|
1133
1138
|
return;
|
|
1134
1139
|
}
|
|
1135
1140
|
|
|
1136
|
-
logger.debug(`Preparing root rollup`);
|
|
1141
|
+
this.logger.debug(`Preparing root rollup`);
|
|
1137
1142
|
|
|
1138
1143
|
const inputs = provingState.getRootRollupInputs();
|
|
1139
1144
|
|
|
@@ -1148,7 +1153,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1148
1153
|
signal => this.prover.getRootRollupProof(inputs, signal, provingState.epochNumber),
|
|
1149
1154
|
),
|
|
1150
1155
|
result => {
|
|
1151
|
-
logger.verbose(`Orchestrator completed root rollup for epoch ${provingState.epochNumber}`);
|
|
1156
|
+
this.logger.verbose(`Orchestrator completed root rollup for epoch ${provingState.epochNumber}`);
|
|
1152
1157
|
provingState.setRootRollupProof(result);
|
|
1153
1158
|
provingState.resolve({ status: 'success' });
|
|
1154
1159
|
},
|
|
@@ -1170,32 +1175,35 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1170
1175
|
|
|
1171
1176
|
private checkAndEnqueueBlockRootRollup(provingState: BlockProvingState) {
|
|
1172
1177
|
if (!provingState.isReadyForBlockRootRollup()) {
|
|
1173
|
-
logger.debug('Not ready for block root rollup');
|
|
1178
|
+
this.logger.debug('Not ready for block root rollup');
|
|
1174
1179
|
return;
|
|
1175
1180
|
}
|
|
1176
1181
|
|
|
1177
1182
|
this.enqueueBlockRootRollup(provingState);
|
|
1178
1183
|
}
|
|
1179
1184
|
|
|
1180
|
-
private checkAndEnqueueNextBlockMergeRollup(
|
|
1185
|
+
private async checkAndEnqueueNextBlockMergeRollup(
|
|
1186
|
+
provingState: CheckpointProvingState,
|
|
1187
|
+
currentLocation: TreeNodeLocation,
|
|
1188
|
+
) {
|
|
1181
1189
|
if (!provingState.isReadyForBlockMerge(currentLocation)) {
|
|
1182
1190
|
return;
|
|
1183
1191
|
}
|
|
1184
1192
|
|
|
1185
1193
|
const parentLocation = provingState.getParentLocation(currentLocation);
|
|
1186
1194
|
if (parentLocation.level === 0) {
|
|
1187
|
-
this.checkAndEnqueueCheckpointRootRollup(provingState);
|
|
1195
|
+
await this.checkAndEnqueueCheckpointRootRollup(provingState);
|
|
1188
1196
|
} else {
|
|
1189
1197
|
this.enqueueBlockMergeRollup(provingState, parentLocation);
|
|
1190
1198
|
}
|
|
1191
1199
|
}
|
|
1192
1200
|
|
|
1193
|
-
private checkAndEnqueueCheckpointRootRollup(provingState: CheckpointProvingState) {
|
|
1201
|
+
private async checkAndEnqueueCheckpointRootRollup(provingState: CheckpointProvingState) {
|
|
1194
1202
|
if (!provingState.isReadyForCheckpointRoot()) {
|
|
1195
1203
|
return;
|
|
1196
1204
|
}
|
|
1197
1205
|
|
|
1198
|
-
this.enqueueCheckpointRootRollup(provingState);
|
|
1206
|
+
await this.enqueueCheckpointRootRollup(provingState);
|
|
1199
1207
|
}
|
|
1200
1208
|
|
|
1201
1209
|
private checkAndEnqueueNextCheckpointMergeRollup(provingState: EpochProvingState, currentLocation: TreeNodeLocation) {
|
|
@@ -1213,7 +1221,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1213
1221
|
|
|
1214
1222
|
private checkAndEnqueueRootRollup(provingState: EpochProvingState) {
|
|
1215
1223
|
if (!provingState.isReadyForRootRollup()) {
|
|
1216
|
-
logger.debug('Not ready for root rollup');
|
|
1224
|
+
this.logger.debug('Not ready for root rollup');
|
|
1217
1225
|
return;
|
|
1218
1226
|
}
|
|
1219
1227
|
|
|
@@ -1228,7 +1236,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1228
1236
|
*/
|
|
1229
1237
|
private enqueueVM(provingState: BlockProvingState, txIndex: number) {
|
|
1230
1238
|
if (!provingState.verifyState()) {
|
|
1231
|
-
logger.debug(`Not running VM circuit as state is no longer valid`);
|
|
1239
|
+
this.logger.debug(`Not running VM circuit as state is no longer valid`);
|
|
1232
1240
|
return;
|
|
1233
1241
|
}
|
|
1234
1242
|
|
|
@@ -1247,7 +1255,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1247
1255
|
);
|
|
1248
1256
|
|
|
1249
1257
|
this.deferredProving(provingState, doAvmProving, proof => {
|
|
1250
|
-
logger.debug(`Proven VM for tx index: ${txIndex}`);
|
|
1258
|
+
this.logger.debug(`Proven VM for tx index: ${txIndex}`);
|
|
1251
1259
|
txProvingState.setAvmProof(proof);
|
|
1252
1260
|
this.checkAndEnqueueBaseRollup(provingState, txIndex);
|
|
1253
1261
|
});
|
|
@@ -1260,7 +1268,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1260
1268
|
}
|
|
1261
1269
|
|
|
1262
1270
|
// We must have completed all proving (chonk verifier proof and (if required) vm proof are generated), we now move to the base rollup.
|
|
1263
|
-
logger.debug(`Public functions completed for tx ${txIndex} enqueueing base rollup`);
|
|
1271
|
+
this.logger.debug(`Public functions completed for tx ${txIndex} enqueueing base rollup`);
|
|
1264
1272
|
|
|
1265
1273
|
this.enqueueBaseRollup(provingState, txIndex);
|
|
1266
1274
|
}
|