@aztec/prover-client 3.0.0-nightly.20250917 → 3.0.0-nightly.20250918
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/block-factory/light.d.ts +5 -3
- package/dest/block-factory/light.d.ts.map +1 -1
- package/dest/block-factory/light.js +16 -9
- package/dest/mocks/fixtures.d.ts +3 -1
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +19 -2
- package/dest/mocks/test_context.d.ts +30 -9
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +68 -15
- package/dest/orchestrator/block-building-helpers.d.ts +16 -14
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +69 -66
- package/dest/orchestrator/block-proving-state.d.ts +53 -46
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +209 -172
- package/dest/orchestrator/checkpoint-proving-state.d.ts +62 -0
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -0
- package/dest/orchestrator/checkpoint-proving-state.js +208 -0
- package/dest/orchestrator/epoch-proving-state.d.ts +32 -25
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +132 -81
- package/dest/orchestrator/orchestrator.d.ts +25 -24
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +318 -190
- package/dest/prover-client/server-epoch-prover.d.ts +8 -7
- package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
- package/dest/prover-client/server-epoch-prover.js +7 -7
- package/dest/proving_broker/broker_prover_facade.d.ts +12 -7
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +30 -15
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +18 -7
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +26 -6
- package/dest/test/mock_prover.d.ts +12 -7
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +25 -10
- package/package.json +15 -15
- package/src/block-factory/light.ts +33 -9
- package/src/mocks/fixtures.ts +25 -7
- package/src/mocks/test_context.ts +113 -21
- package/src/orchestrator/block-building-helpers.ts +107 -93
- package/src/orchestrator/block-proving-state.ts +225 -212
- package/src/orchestrator/checkpoint-proving-state.ts +294 -0
- package/src/orchestrator/epoch-proving-state.ts +169 -121
- package/src/orchestrator/orchestrator.ts +466 -247
- package/src/prover-client/server-epoch-prover.ts +30 -16
- package/src/proving_broker/broker_prover_facade.ts +145 -71
- package/src/proving_broker/proving_broker.ts +24 -6
- package/src/proving_broker/proving_job_controller.ts +26 -6
- package/src/test/mock_prover.ts +105 -28
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
2
|
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import type { EthAddress
|
|
3
|
+
import type { EthAddress } from '@aztec/stdlib/block';
|
|
4
4
|
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
5
5
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
6
|
-
import type { RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
7
|
-
import type { BlockHeader,
|
|
6
|
+
import type { CheckpointConstantData, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
7
|
+
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
8
|
+
import type { UInt64 } from '@aztec/stdlib/types';
|
|
8
9
|
|
|
9
10
|
import type { ProvingOrchestrator } from '../orchestrator/orchestrator.js';
|
|
10
11
|
import type { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
@@ -18,17 +19,37 @@ export class ServerEpochProver implements EpochProver {
|
|
|
18
19
|
|
|
19
20
|
startNewEpoch(
|
|
20
21
|
epochNumber: number,
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
firstCheckpointNumber: Fr,
|
|
23
|
+
totalNumCheckpoints: number,
|
|
23
24
|
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
24
25
|
): void {
|
|
25
|
-
this.orchestrator.startNewEpoch(
|
|
26
|
+
this.orchestrator.startNewEpoch(
|
|
27
|
+
epochNumber,
|
|
28
|
+
firstCheckpointNumber,
|
|
29
|
+
totalNumCheckpoints,
|
|
30
|
+
finalBlobBatchingChallenges,
|
|
31
|
+
);
|
|
26
32
|
this.facade.start();
|
|
27
33
|
}
|
|
34
|
+
startNewCheckpoint(
|
|
35
|
+
constants: CheckpointConstantData,
|
|
36
|
+
l1ToL2Messages: Fr[],
|
|
37
|
+
totalNumBlocks: number,
|
|
38
|
+
totalNumBlobFields: number,
|
|
39
|
+
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
40
|
+
): Promise<void> {
|
|
41
|
+
return this.orchestrator.startNewCheckpoint(
|
|
42
|
+
constants,
|
|
43
|
+
l1ToL2Messages,
|
|
44
|
+
totalNumBlocks,
|
|
45
|
+
totalNumBlobFields,
|
|
46
|
+
headerOfLastBlockInPreviousCheckpoint,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
28
49
|
startTubeCircuits(txs: Tx[]): Promise<void> {
|
|
29
50
|
return this.orchestrator.startTubeCircuits(txs);
|
|
30
51
|
}
|
|
31
|
-
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<
|
|
52
|
+
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<BlockHeader> {
|
|
32
53
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
33
54
|
}
|
|
34
55
|
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
@@ -40,19 +61,12 @@ export class ServerEpochProver implements EpochProver {
|
|
|
40
61
|
getProverId(): EthAddress {
|
|
41
62
|
return this.orchestrator.getProverId();
|
|
42
63
|
}
|
|
43
|
-
getBlock(index: number): L2Block {
|
|
44
|
-
return this.orchestrator.getBlock(index);
|
|
45
|
-
}
|
|
46
64
|
async stop(): Promise<void> {
|
|
47
65
|
await this.facade.stop();
|
|
48
66
|
await this.orchestrator.stop();
|
|
49
67
|
}
|
|
50
|
-
startNewBlock(
|
|
51
|
-
|
|
52
|
-
l1ToL2Messages: Fr[],
|
|
53
|
-
previousBlockHeader: BlockHeader,
|
|
54
|
-
): Promise<void> {
|
|
55
|
-
return this.orchestrator.startNewBlock(globalVariables, l1ToL2Messages, previousBlockHeader);
|
|
68
|
+
startNewBlock(blockNumber: number, timestamp: UInt64, totalNumTxs: number): Promise<void> {
|
|
69
|
+
return this.orchestrator.startNewBlock(blockNumber, timestamp, totalNumTxs);
|
|
56
70
|
}
|
|
57
71
|
addTxs(txs: ProcessedTx[]): Promise<void> {
|
|
58
72
|
return this.orchestrator.addTxs(txs);
|
|
@@ -27,18 +27,24 @@ import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@az
|
|
|
27
27
|
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
28
28
|
import type {
|
|
29
29
|
BaseOrMergeRollupPublicInputs,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
BlockMergeRollupPrivateInputs,
|
|
31
|
+
BlockRollupPublicInputs,
|
|
32
|
+
BlockRootEmptyTxFirstRollupPrivateInputs,
|
|
33
|
+
BlockRootFirstRollupPrivateInputs,
|
|
34
|
+
BlockRootRollupPrivateInputs,
|
|
35
|
+
BlockRootSingleTxFirstRollupPrivateInputs,
|
|
36
|
+
BlockRootSingleTxRollupPrivateInputs,
|
|
37
|
+
CheckpointMergeRollupPrivateInputs,
|
|
38
|
+
CheckpointPaddingRollupPrivateInputs,
|
|
39
|
+
CheckpointRollupPublicInputs,
|
|
40
|
+
CheckpointRootRollupPrivateInputs,
|
|
41
|
+
CheckpointRootSingleBlockRollupPrivateInputs,
|
|
34
42
|
MergeRollupInputs,
|
|
35
|
-
PaddingBlockRootRollupInputs,
|
|
36
43
|
PrivateBaseRollupInputs,
|
|
37
44
|
PublicBaseRollupInputs,
|
|
38
45
|
PublicTubePrivateInputs,
|
|
39
|
-
|
|
46
|
+
RootRollupPrivateInputs,
|
|
40
47
|
RootRollupPublicInputs,
|
|
41
|
-
SingleTxBlockRootRollupInputs,
|
|
42
48
|
} from '@aztec/stdlib/rollup';
|
|
43
49
|
|
|
44
50
|
import { InlineProofStore, type ProofStore } from './proof_store/index.js';
|
|
@@ -425,169 +431,237 @@ export class BrokerCircuitProverFacade implements ServerCircuitProver {
|
|
|
425
431
|
);
|
|
426
432
|
}
|
|
427
433
|
|
|
428
|
-
|
|
429
|
-
input:
|
|
434
|
+
getMergeRollupProof(
|
|
435
|
+
input: MergeRollupInputs,
|
|
430
436
|
signal?: AbortSignal,
|
|
431
437
|
epochNumber?: number,
|
|
432
438
|
): Promise<
|
|
433
|
-
PublicInputsAndRecursiveProof<
|
|
439
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
434
440
|
> {
|
|
435
441
|
return this.enqueueJob(
|
|
436
|
-
this.generateId(ProvingRequestType.
|
|
437
|
-
ProvingRequestType.
|
|
442
|
+
this.generateId(ProvingRequestType.MERGE_ROLLUP, input, epochNumber),
|
|
443
|
+
ProvingRequestType.MERGE_ROLLUP,
|
|
438
444
|
input,
|
|
439
445
|
epochNumber,
|
|
440
446
|
signal,
|
|
441
447
|
);
|
|
442
448
|
}
|
|
443
449
|
|
|
444
|
-
|
|
445
|
-
|
|
450
|
+
getPublicTubeProof(
|
|
451
|
+
inputs: PublicTubePrivateInputs,
|
|
446
452
|
signal?: AbortSignal,
|
|
447
453
|
epochNumber?: number,
|
|
448
454
|
): Promise<
|
|
449
|
-
PublicInputsAndRecursiveProof<
|
|
455
|
+
PublicInputsAndRecursiveProof<
|
|
456
|
+
PrivateToPublicKernelCircuitPublicInputs,
|
|
457
|
+
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
458
|
+
>
|
|
450
459
|
> {
|
|
451
460
|
return this.enqueueJob(
|
|
452
|
-
this.generateId(ProvingRequestType.
|
|
453
|
-
ProvingRequestType.
|
|
454
|
-
|
|
461
|
+
this.generateId(ProvingRequestType.PUBLIC_TUBE, inputs, epochNumber),
|
|
462
|
+
ProvingRequestType.PUBLIC_TUBE,
|
|
463
|
+
inputs,
|
|
455
464
|
epochNumber,
|
|
456
465
|
signal,
|
|
457
466
|
);
|
|
458
467
|
}
|
|
459
468
|
|
|
460
|
-
|
|
461
|
-
|
|
469
|
+
getPrivateBaseRollupProof(
|
|
470
|
+
baseRollupInput: PrivateBaseRollupInputs,
|
|
462
471
|
signal?: AbortSignal,
|
|
463
472
|
epochNumber?: number,
|
|
464
473
|
): Promise<
|
|
465
|
-
PublicInputsAndRecursiveProof<
|
|
474
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
466
475
|
> {
|
|
467
476
|
return this.enqueueJob(
|
|
468
|
-
this.generateId(ProvingRequestType.
|
|
469
|
-
ProvingRequestType.
|
|
470
|
-
|
|
477
|
+
this.generateId(ProvingRequestType.PRIVATE_BASE_ROLLUP, baseRollupInput, epochNumber),
|
|
478
|
+
ProvingRequestType.PRIVATE_BASE_ROLLUP,
|
|
479
|
+
baseRollupInput,
|
|
471
480
|
epochNumber,
|
|
472
481
|
signal,
|
|
473
482
|
);
|
|
474
483
|
}
|
|
475
484
|
|
|
476
|
-
|
|
477
|
-
|
|
485
|
+
getPublicBaseRollupProof(
|
|
486
|
+
inputs: PublicBaseRollupInputs,
|
|
478
487
|
signal?: AbortSignal,
|
|
479
488
|
epochNumber?: number,
|
|
480
489
|
): Promise<
|
|
481
|
-
PublicInputsAndRecursiveProof<
|
|
490
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
482
491
|
> {
|
|
483
492
|
return this.enqueueJob(
|
|
484
|
-
this.generateId(ProvingRequestType.
|
|
485
|
-
ProvingRequestType.
|
|
493
|
+
this.generateId(ProvingRequestType.PUBLIC_BASE_ROLLUP, inputs, epochNumber),
|
|
494
|
+
ProvingRequestType.PUBLIC_BASE_ROLLUP,
|
|
495
|
+
inputs,
|
|
496
|
+
epochNumber,
|
|
497
|
+
signal,
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
getRootParityProof(
|
|
502
|
+
inputs: RootParityInputs,
|
|
503
|
+
signal?: AbortSignal,
|
|
504
|
+
epochNumber?: number,
|
|
505
|
+
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>> {
|
|
506
|
+
return this.enqueueJob(
|
|
507
|
+
this.generateId(ProvingRequestType.ROOT_PARITY, inputs, epochNumber),
|
|
508
|
+
ProvingRequestType.ROOT_PARITY,
|
|
509
|
+
inputs,
|
|
510
|
+
epochNumber,
|
|
511
|
+
signal,
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
getBlockRootFirstRollupProof(
|
|
516
|
+
input: BlockRootFirstRollupPrivateInputs,
|
|
517
|
+
signal?: AbortSignal,
|
|
518
|
+
epochNumber?: number,
|
|
519
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
520
|
+
return this.enqueueJob(
|
|
521
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP, input, epochNumber),
|
|
522
|
+
ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP,
|
|
486
523
|
input,
|
|
487
524
|
epochNumber,
|
|
488
525
|
signal,
|
|
489
526
|
);
|
|
490
527
|
}
|
|
491
528
|
|
|
492
|
-
|
|
493
|
-
input:
|
|
529
|
+
getBlockRootSingleTxFirstRollupProof(
|
|
530
|
+
input: BlockRootSingleTxFirstRollupPrivateInputs,
|
|
494
531
|
signal?: AbortSignal,
|
|
495
532
|
epochNumber?: number,
|
|
496
|
-
): Promise<
|
|
497
|
-
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
498
|
-
> {
|
|
533
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
499
534
|
return this.enqueueJob(
|
|
500
|
-
this.generateId(ProvingRequestType.
|
|
501
|
-
ProvingRequestType.
|
|
535
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP, input, epochNumber),
|
|
536
|
+
ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP,
|
|
502
537
|
input,
|
|
503
538
|
epochNumber,
|
|
504
539
|
signal,
|
|
505
540
|
);
|
|
506
541
|
}
|
|
507
542
|
|
|
508
|
-
|
|
509
|
-
input:
|
|
543
|
+
getBlockRootEmptyTxFirstRollupProof(
|
|
544
|
+
input: BlockRootEmptyTxFirstRollupPrivateInputs,
|
|
510
545
|
signal?: AbortSignal,
|
|
511
546
|
epochNumber?: number,
|
|
512
|
-
): Promise<
|
|
513
|
-
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
514
|
-
> {
|
|
547
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
515
548
|
return this.enqueueJob(
|
|
516
|
-
this.generateId(ProvingRequestType.
|
|
517
|
-
ProvingRequestType.
|
|
549
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP, input, epochNumber),
|
|
550
|
+
ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP,
|
|
518
551
|
input,
|
|
519
552
|
epochNumber,
|
|
520
553
|
signal,
|
|
521
554
|
);
|
|
522
555
|
}
|
|
523
556
|
|
|
524
|
-
|
|
525
|
-
|
|
557
|
+
getBlockRootRollupProof(
|
|
558
|
+
input: BlockRootRollupPrivateInputs,
|
|
559
|
+
signal?: AbortSignal,
|
|
560
|
+
epochNumber?: number,
|
|
561
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
562
|
+
return this.enqueueJob(
|
|
563
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_ROLLUP, input, epochNumber),
|
|
564
|
+
ProvingRequestType.BLOCK_ROOT_ROLLUP,
|
|
565
|
+
input,
|
|
566
|
+
epochNumber,
|
|
567
|
+
signal,
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
getBlockRootSingleTxRollupProof(
|
|
572
|
+
input: BlockRootSingleTxRollupPrivateInputs,
|
|
573
|
+
signal?: AbortSignal,
|
|
574
|
+
epochNumber?: number,
|
|
575
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
576
|
+
return this.enqueueJob(
|
|
577
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP, input, epochNumber),
|
|
578
|
+
ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP,
|
|
579
|
+
input,
|
|
580
|
+
epochNumber,
|
|
581
|
+
signal,
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
getBlockMergeRollupProof(
|
|
586
|
+
input: BlockMergeRollupPrivateInputs,
|
|
587
|
+
signal?: AbortSignal,
|
|
588
|
+
epochNumber?: number,
|
|
589
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
590
|
+
return this.enqueueJob(
|
|
591
|
+
this.generateId(ProvingRequestType.BLOCK_MERGE_ROLLUP, input, epochNumber),
|
|
592
|
+
ProvingRequestType.BLOCK_MERGE_ROLLUP,
|
|
593
|
+
input,
|
|
594
|
+
epochNumber,
|
|
595
|
+
signal,
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
getCheckpointRootRollupProof(
|
|
600
|
+
input: CheckpointRootRollupPrivateInputs,
|
|
526
601
|
signal?: AbortSignal,
|
|
527
602
|
epochNumber?: number,
|
|
528
603
|
): Promise<
|
|
529
|
-
PublicInputsAndRecursiveProof<
|
|
530
|
-
PrivateToPublicKernelCircuitPublicInputs,
|
|
531
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
532
|
-
>
|
|
604
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
533
605
|
> {
|
|
534
606
|
return this.enqueueJob(
|
|
535
|
-
this.generateId(ProvingRequestType.
|
|
536
|
-
ProvingRequestType.
|
|
537
|
-
|
|
607
|
+
this.generateId(ProvingRequestType.CHECKPOINT_ROOT_ROLLUP, input, epochNumber),
|
|
608
|
+
ProvingRequestType.CHECKPOINT_ROOT_ROLLUP,
|
|
609
|
+
input,
|
|
538
610
|
epochNumber,
|
|
539
611
|
signal,
|
|
540
612
|
);
|
|
541
613
|
}
|
|
542
614
|
|
|
543
|
-
|
|
544
|
-
|
|
615
|
+
getCheckpointRootSingleBlockRollupProof(
|
|
616
|
+
input: CheckpointRootSingleBlockRollupPrivateInputs,
|
|
545
617
|
signal?: AbortSignal,
|
|
546
618
|
epochNumber?: number,
|
|
547
619
|
): Promise<
|
|
548
|
-
PublicInputsAndRecursiveProof<
|
|
620
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
549
621
|
> {
|
|
550
622
|
return this.enqueueJob(
|
|
551
|
-
this.generateId(ProvingRequestType.
|
|
552
|
-
ProvingRequestType.
|
|
553
|
-
|
|
623
|
+
this.generateId(ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP, input, epochNumber),
|
|
624
|
+
ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP,
|
|
625
|
+
input,
|
|
554
626
|
epochNumber,
|
|
555
627
|
signal,
|
|
556
628
|
);
|
|
557
629
|
}
|
|
558
630
|
|
|
559
|
-
|
|
560
|
-
|
|
631
|
+
getCheckpointPaddingRollupProof(
|
|
632
|
+
input: CheckpointPaddingRollupPrivateInputs,
|
|
561
633
|
signal?: AbortSignal,
|
|
562
634
|
epochNumber?: number,
|
|
563
635
|
): Promise<
|
|
564
|
-
PublicInputsAndRecursiveProof<
|
|
636
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
565
637
|
> {
|
|
566
638
|
return this.enqueueJob(
|
|
567
|
-
this.generateId(ProvingRequestType.
|
|
568
|
-
ProvingRequestType.
|
|
569
|
-
|
|
639
|
+
this.generateId(ProvingRequestType.CHECKPOINT_PADDING_ROLLUP, input, epochNumber),
|
|
640
|
+
ProvingRequestType.CHECKPOINT_PADDING_ROLLUP,
|
|
641
|
+
input,
|
|
570
642
|
epochNumber,
|
|
571
643
|
signal,
|
|
572
644
|
);
|
|
573
645
|
}
|
|
574
646
|
|
|
575
|
-
|
|
576
|
-
|
|
647
|
+
getCheckpointMergeRollupProof(
|
|
648
|
+
input: CheckpointMergeRollupPrivateInputs,
|
|
577
649
|
signal?: AbortSignal,
|
|
578
650
|
epochNumber?: number,
|
|
579
|
-
): Promise<
|
|
651
|
+
): Promise<
|
|
652
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
653
|
+
> {
|
|
580
654
|
return this.enqueueJob(
|
|
581
|
-
this.generateId(ProvingRequestType.
|
|
582
|
-
ProvingRequestType.
|
|
583
|
-
|
|
655
|
+
this.generateId(ProvingRequestType.CHECKPOINT_MERGE_ROLLUP, input, epochNumber),
|
|
656
|
+
ProvingRequestType.CHECKPOINT_MERGE_ROLLUP,
|
|
657
|
+
input,
|
|
584
658
|
epochNumber,
|
|
585
659
|
signal,
|
|
586
660
|
);
|
|
587
661
|
}
|
|
588
662
|
|
|
589
663
|
getRootRollupProof(
|
|
590
|
-
input:
|
|
664
|
+
input: RootRollupPrivateInputs,
|
|
591
665
|
signal?: AbortSignal,
|
|
592
666
|
epochNumber?: number,
|
|
593
667
|
): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs, typeof RECURSIVE_PROOF_LENGTH>> {
|
|
@@ -52,10 +52,22 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
|
|
|
52
52
|
[ProvingRequestType.ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
53
53
|
|
|
54
54
|
[ProvingRequestType.BLOCK_MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
55
|
+
[ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
56
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
|
|
57
|
+
provingJobComparator,
|
|
58
|
+
),
|
|
59
|
+
[ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
|
|
60
|
+
provingJobComparator,
|
|
61
|
+
),
|
|
55
62
|
[ProvingRequestType.BLOCK_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
56
|
-
[ProvingRequestType.
|
|
57
|
-
|
|
58
|
-
[ProvingRequestType.
|
|
63
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
64
|
+
|
|
65
|
+
[ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
66
|
+
[ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
|
|
67
|
+
provingJobComparator,
|
|
68
|
+
),
|
|
69
|
+
[ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
70
|
+
[ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
59
71
|
|
|
60
72
|
[ProvingRequestType.BASE_PARITY]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
61
73
|
[ProvingRequestType.ROOT_PARITY]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
@@ -673,10 +685,17 @@ function proofTypeComparator(a: ProvingRequestType, b: ProvingRequestType): -1 |
|
|
|
673
685
|
* is to get picked up by agents
|
|
674
686
|
*/
|
|
675
687
|
export const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
|
|
688
|
+
ProvingRequestType.ROOT_ROLLUP,
|
|
689
|
+
ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP,
|
|
690
|
+
ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP,
|
|
691
|
+
ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP,
|
|
676
692
|
ProvingRequestType.BLOCK_ROOT_ROLLUP,
|
|
677
|
-
ProvingRequestType.
|
|
693
|
+
ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP,
|
|
678
694
|
ProvingRequestType.BLOCK_MERGE_ROLLUP,
|
|
679
|
-
ProvingRequestType.
|
|
695
|
+
ProvingRequestType.CHECKPOINT_ROOT_ROLLUP,
|
|
696
|
+
ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP,
|
|
697
|
+
ProvingRequestType.CHECKPOINT_MERGE_ROLLUP,
|
|
698
|
+
ProvingRequestType.CHECKPOINT_PADDING_ROLLUP,
|
|
680
699
|
ProvingRequestType.MERGE_ROLLUP,
|
|
681
700
|
ProvingRequestType.PUBLIC_BASE_ROLLUP,
|
|
682
701
|
ProvingRequestType.PRIVATE_BASE_ROLLUP,
|
|
@@ -684,5 +703,4 @@ export const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
|
|
|
684
703
|
ProvingRequestType.PUBLIC_TUBE,
|
|
685
704
|
ProvingRequestType.ROOT_PARITY,
|
|
686
705
|
ProvingRequestType.BASE_PARITY,
|
|
687
|
-
ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP,
|
|
688
706
|
];
|
|
@@ -144,26 +144,46 @@ export class ProvingJobController {
|
|
|
144
144
|
return await this.circuitProver.getMergeRollupProof(inputs, signal, this.epochNumber);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
case ProvingRequestType.
|
|
148
|
-
return await this.circuitProver.
|
|
147
|
+
case ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP: {
|
|
148
|
+
return await this.circuitProver.getBlockRootFirstRollupProof(inputs, signal, this.epochNumber);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
case ProvingRequestType.
|
|
152
|
-
return await this.circuitProver.
|
|
151
|
+
case ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP: {
|
|
152
|
+
return await this.circuitProver.getBlockRootSingleTxFirstRollupProof(inputs, signal, this.epochNumber);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
case ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP: {
|
|
156
|
+
return await this.circuitProver.getBlockRootEmptyTxFirstRollupProof(inputs, signal, this.epochNumber);
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
case ProvingRequestType.BLOCK_ROOT_ROLLUP: {
|
|
156
160
|
return await this.circuitProver.getBlockRootRollupProof(inputs, signal, this.epochNumber);
|
|
157
161
|
}
|
|
158
162
|
|
|
159
|
-
case ProvingRequestType.
|
|
160
|
-
return await this.circuitProver.
|
|
163
|
+
case ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP: {
|
|
164
|
+
return await this.circuitProver.getBlockRootSingleTxRollupProof(inputs, signal, this.epochNumber);
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
case ProvingRequestType.BLOCK_MERGE_ROLLUP: {
|
|
164
168
|
return await this.circuitProver.getBlockMergeRollupProof(inputs, signal, this.epochNumber);
|
|
165
169
|
}
|
|
166
170
|
|
|
171
|
+
case ProvingRequestType.CHECKPOINT_ROOT_ROLLUP: {
|
|
172
|
+
return await this.circuitProver.getCheckpointRootRollupProof(inputs, signal, this.epochNumber);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
case ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP: {
|
|
176
|
+
return await this.circuitProver.getCheckpointRootSingleBlockRollupProof(inputs, signal, this.epochNumber);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
case ProvingRequestType.CHECKPOINT_PADDING_ROLLUP: {
|
|
180
|
+
return await this.circuitProver.getCheckpointPaddingRollupProof(inputs, signal, this.epochNumber);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
case ProvingRequestType.CHECKPOINT_MERGE_ROLLUP: {
|
|
184
|
+
return await this.circuitProver.getCheckpointMergeRollupProof(inputs, signal, this.epochNumber);
|
|
185
|
+
}
|
|
186
|
+
|
|
167
187
|
case ProvingRequestType.ROOT_ROLLUP: {
|
|
168
188
|
return await this.circuitProver.getRootRollupProof(inputs, signal, this.epochNumber);
|
|
169
189
|
}
|