@aztec/prover-client 0.0.1-commit.b6e433891 → 0.0.1-commit.b8a057fa
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/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +16 -2
- package/dest/light/lightweight_checkpoint_builder.d.ts +1 -1
- package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -1
- package/dest/light/lightweight_checkpoint_builder.js +15 -5
- package/dest/mocks/test_context.d.ts +11 -11
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +26 -28
- package/dest/orchestrator/block-building-helpers.d.ts +1 -1
- package/dest/orchestrator/checkpoint-proving-state.d.ts +20 -36
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +22 -120
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts +161 -0
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts.map +1 -0
- package/dest/orchestrator/{orchestrator.js → checkpoint-sub-tree-orchestrator.js} +267 -451
- package/dest/orchestrator/chonk-cache.d.ts +39 -0
- package/dest/orchestrator/chonk-cache.d.ts.map +1 -0
- package/dest/orchestrator/chonk-cache.js +80 -0
- package/dest/orchestrator/index.d.ts +4 -2
- package/dest/orchestrator/index.d.ts.map +1 -1
- package/dest/orchestrator/index.js +3 -1
- package/dest/orchestrator/proving-scheduler.d.ts +81 -0
- package/dest/orchestrator/proving-scheduler.d.ts.map +1 -0
- package/dest/orchestrator/proving-scheduler.js +120 -0
- package/dest/orchestrator/top-tree-orchestrator.d.ts +88 -0
- package/dest/orchestrator/top-tree-orchestrator.d.ts.map +1 -0
- package/dest/orchestrator/top-tree-orchestrator.js +232 -0
- package/dest/orchestrator/top-tree-proving-state.d.ts +61 -0
- package/dest/orchestrator/top-tree-proving-state.d.ts.map +1 -0
- package/dest/orchestrator/top-tree-proving-state.js +185 -0
- package/dest/orchestrator/tx-proving-state.d.ts +3 -3
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/prover-client/prover-client.d.ts +61 -4
- package/dest/prover-client/prover-client.d.ts.map +1 -1
- package/dest/prover-client/prover-client.js +54 -7
- package/dest/proving_broker/broker_prover_facade.d.ts +3 -3
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +10 -16
- package/dest/proving_broker/config.d.ts +8 -72
- package/dest/proving_broker/config.d.ts.map +1 -1
- package/dest/proving_broker/config.js +2 -2
- package/dest/proving_broker/index.d.ts +2 -1
- package/dest/proving_broker/index.d.ts.map +1 -1
- package/dest/proving_broker/index.js +1 -0
- package/dest/proving_broker/proving_broker.d.ts +2 -2
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +32 -7
- package/dest/proving_broker/proving_broker_database/persisted.js +2 -2
- package/dest/proving_broker/rpc.d.ts +3 -1
- package/dest/proving_broker/rpc.d.ts.map +1 -1
- package/dest/proving_broker/rpc.js +80 -24
- package/dest/test/epoch_settlement.d.ts +36 -0
- package/dest/test/epoch_settlement.d.ts.map +1 -0
- package/dest/test/epoch_settlement.js +52 -0
- package/dest/test/index.d.ts +2 -0
- package/dest/test/index.d.ts.map +1 -0
- package/dest/test/index.js +1 -0
- package/dest/test/mock_prover.d.ts +4 -4
- package/dest/test/mock_prover.js +2 -2
- package/package.json +19 -18
- package/src/config.ts +18 -2
- package/src/light/lightweight_checkpoint_builder.ts +16 -6
- package/src/mocks/test_context.ts +25 -41
- package/src/orchestrator/checkpoint-proving-state.ts +21 -162
- package/src/orchestrator/{orchestrator.ts → checkpoint-sub-tree-orchestrator.ts} +415 -661
- package/src/orchestrator/chonk-cache.ts +99 -0
- package/src/orchestrator/index.ts +8 -1
- package/src/orchestrator/proving-scheduler.ts +160 -0
- package/src/orchestrator/top-tree-orchestrator.ts +384 -0
- package/src/orchestrator/top-tree-proving-state.ts +219 -0
- package/src/orchestrator/tx-proving-state.ts +3 -3
- package/src/prover-client/prover-client.ts +128 -18
- package/src/proving_broker/broker_prover_facade.ts +10 -18
- package/src/proving_broker/config.ts +2 -1
- package/src/proving_broker/index.ts +1 -0
- package/src/proving_broker/proving_broker.ts +27 -5
- package/src/proving_broker/proving_broker_database/persisted.ts +2 -2
- package/src/proving_broker/rpc.ts +36 -24
- package/src/test/epoch_settlement.ts +82 -0
- package/src/test/index.ts +1 -0
- package/src/test/mock_prover.ts +2 -2
- package/dest/orchestrator/epoch-proving-state.d.ts +0 -75
- package/dest/orchestrator/epoch-proving-state.d.ts.map +0 -1
- package/dest/orchestrator/epoch-proving-state.js +0 -269
- package/dest/orchestrator/orchestrator.d.ts +0 -130
- package/dest/orchestrator/orchestrator.d.ts.map +0 -1
- package/dest/prover-client/server-epoch-prover.d.ts +0 -32
- package/dest/prover-client/server-epoch-prover.d.ts.map +0 -1
- package/dest/prover-client/server-epoch-prover.js +0 -40
- package/src/orchestrator/epoch-proving-state.ts +0 -380
- package/src/prover-client/server-epoch-prover.ts +0 -69
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
5
|
-
import { EthAddress } from '@aztec/stdlib/block';
|
|
6
|
-
import type { EpochProver, ForkMerkleTreeOperations, ReadonlyWorldStateAccess, ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
7
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
8
|
-
import { CheckpointConstantData, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
9
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
10
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
11
|
-
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
12
|
-
import type { BlockProvingState } from './block-proving-state.js';
|
|
13
|
-
/**
|
|
14
|
-
* Implements an event driven proving scheduler to build the recursive proof tree. The idea being:
|
|
15
|
-
* 1. Transactions are provided to the scheduler post simulation.
|
|
16
|
-
* 2. Tree insertions are performed as required to generate transaction specific proofs
|
|
17
|
-
* 3. Those transaction specific proofs are generated in the necessary order accounting for dependencies
|
|
18
|
-
* 4. Once a transaction is proven, it will be incorporated into a merge proof
|
|
19
|
-
* 5. Merge proofs are produced at each level of the tree until the root proof is produced
|
|
20
|
-
*
|
|
21
|
-
* The proving implementation is determined by the provided prover. This could be for example a local prover or a remote prover pool.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* The orchestrator, managing the flow of recursive proving operations required to build the rollup proof tree.
|
|
25
|
-
*/
|
|
26
|
-
export declare class ProvingOrchestrator implements EpochProver {
|
|
27
|
-
private dbProvider;
|
|
28
|
-
private prover;
|
|
29
|
-
private readonly proverId;
|
|
30
|
-
private readonly cancelJobsOnStop;
|
|
31
|
-
private readonly enqueueConcurrency;
|
|
32
|
-
private provingState;
|
|
33
|
-
private pendingProvingJobs;
|
|
34
|
-
private provingPromise;
|
|
35
|
-
private metrics;
|
|
36
|
-
private dbs;
|
|
37
|
-
private logger;
|
|
38
|
-
private deferredJobQueue;
|
|
39
|
-
constructor(dbProvider: ReadonlyWorldStateAccess & ForkMerkleTreeOperations, prover: ServerCircuitProver, proverId: EthAddress, cancelJobsOnStop: boolean | undefined, enqueueConcurrency: number, telemetryClient?: TelemetryClient, bindings?: LoggerBindings);
|
|
40
|
-
get tracer(): Tracer;
|
|
41
|
-
getProverId(): EthAddress;
|
|
42
|
-
getNumActiveForks(): number;
|
|
43
|
-
stop(): Promise<void>;
|
|
44
|
-
startNewEpoch(epochNumber: EpochNumber, totalNumCheckpoints: number, finalBlobBatchingChallenges: FinalBlobBatchingChallenges): void;
|
|
45
|
-
/**
|
|
46
|
-
* Starts a new checkpoint.
|
|
47
|
-
* @param checkpointIndex - The index of the checkpoint in the epoch.
|
|
48
|
-
* @param constants - The constants for this checkpoint.
|
|
49
|
-
* @param l1ToL2Messages - The set of L1 to L2 messages to be inserted at the beginning of this checkpoint.
|
|
50
|
-
* @param totalNumBlocks - The total number of blocks expected in the checkpoint (must be at least one).
|
|
51
|
-
* @param headerOfLastBlockInPreviousCheckpoint - The header of the last block in the previous checkpoint.
|
|
52
|
-
*/
|
|
53
|
-
startNewCheckpoint(checkpointIndex: number, constants: CheckpointConstantData, l1ToL2Messages: Fr[], totalNumBlocks: number, headerOfLastBlockInPreviousCheckpoint: BlockHeader): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Starts off a new block
|
|
56
|
-
* @param blockNumber - The block number
|
|
57
|
-
* @param timestamp - The timestamp of the block. This is only required for constructing the private inputs for the
|
|
58
|
-
* block that doesn't have any txs.
|
|
59
|
-
* @param totalNumTxs - The total number of txs in the block
|
|
60
|
-
*/
|
|
61
|
-
startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* The interface to add simulated transactions to the scheduler. This can only be called once per block.
|
|
64
|
-
* @param txs - The transactions to be proven
|
|
65
|
-
*/
|
|
66
|
-
addTxs(txs: ProcessedTx[]): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Kickstarts chonk verifier circuits for the specified txs. These will be used during epoch proving.
|
|
69
|
-
* Note that if the chonk verifier circuits are not started this way, they will be started nontheless after processing.
|
|
70
|
-
*/
|
|
71
|
-
startChonkVerifierCircuits(txs: Tx[]): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Marks the block as completed.
|
|
74
|
-
* Computes the block header and updates the archive tree.
|
|
75
|
-
*/
|
|
76
|
-
setBlockCompleted(blockNumber: BlockNumber, expectedHeader?: BlockHeader): Promise<BlockHeader>;
|
|
77
|
-
protected verifyBuiltBlockAgainstSyncedState(provingState: BlockProvingState): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Cancel any further proving.
|
|
80
|
-
* If cancelJobsOnStop is true, aborts all pending jobs with the broker (which marks them as 'Aborted').
|
|
81
|
-
* If cancelJobsOnStop is false (default), jobs remain in the broker queue and can be reused on restart/reorg.
|
|
82
|
-
*/
|
|
83
|
-
cancel(): void;
|
|
84
|
-
private getDbForBlock;
|
|
85
|
-
/**
|
|
86
|
-
* Returns the proof for the current epoch.
|
|
87
|
-
*/
|
|
88
|
-
finalizeEpoch(): Promise<{
|
|
89
|
-
publicInputs: RootRollupPublicInputs;
|
|
90
|
-
proof: Proof;
|
|
91
|
-
batchedBlobInputs: BatchedBlob;
|
|
92
|
-
}>;
|
|
93
|
-
/**
|
|
94
|
-
* Enqueue a job to be scheduled
|
|
95
|
-
* @param provingState - The proving state object being operated on
|
|
96
|
-
* @param jobType - The type of job to be queued
|
|
97
|
-
* @param job - The actual job, returns a promise notifying of the job's completion
|
|
98
|
-
*/
|
|
99
|
-
private deferredProving;
|
|
100
|
-
private updateL1ToL2MessageTree;
|
|
101
|
-
private prepareBaseRollupInputs;
|
|
102
|
-
private enqueueBaseRollup;
|
|
103
|
-
private getOrEnqueueChonkVerifier;
|
|
104
|
-
private doEnqueueChonkVerifier;
|
|
105
|
-
private enqueueMergeRollup;
|
|
106
|
-
private enqueueBlockRootRollup;
|
|
107
|
-
private enqueueBaseParityCircuit;
|
|
108
|
-
private checkAndEnqueueRootParityCircuit;
|
|
109
|
-
private enqueueRootParityCircuit;
|
|
110
|
-
private enqueueBlockMergeRollup;
|
|
111
|
-
private enqueueCheckpointRootRollup;
|
|
112
|
-
private enqueueCheckpointMergeRollup;
|
|
113
|
-
private enqueueEpochPadding;
|
|
114
|
-
private enqueueRootRollup;
|
|
115
|
-
private checkAndEnqueueNextMergeRollup;
|
|
116
|
-
private checkAndEnqueueBlockRootRollup;
|
|
117
|
-
private checkAndEnqueueNextBlockMergeRollup;
|
|
118
|
-
private checkAndEnqueueCheckpointRootRollup;
|
|
119
|
-
private checkAndEnqueueNextCheckpointMergeRollup;
|
|
120
|
-
private checkAndEnqueueRootRollup;
|
|
121
|
-
/**
|
|
122
|
-
* Executes the VM circuit for a public function, will enqueue the corresponding kernel if the
|
|
123
|
-
* previous kernel is ready
|
|
124
|
-
* @param provingState - The proving state being operated on
|
|
125
|
-
* @param txIndex - The index of the transaction being proven
|
|
126
|
-
*/
|
|
127
|
-
private enqueueVM;
|
|
128
|
-
private checkAndEnqueueBaseRollup;
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JjaGVzdHJhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb3JjaGVzdHJhdG9yL29yY2hlc3RyYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLDJCQUEyQixFQUFjLE1BQU0sdUJBQXVCLENBQUM7QUFRN0YsT0FBTyxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUzRSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFcEQsT0FBTyxFQUFlLEtBQUssY0FBYyxFQUFnQixNQUFNLHVCQUF1QixDQUFDO0FBUXZGLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNqRCxPQUFPLEtBQUssRUFDVixXQUFXLEVBQ1gsd0JBQXdCLEVBR3hCLHdCQUF3QixFQUN4QixtQkFBbUIsRUFDcEIsTUFBTSxpQ0FBaUMsQ0FBQztBQUN6QyxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBTUwsc0JBQXNCLEVBS3RCL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a,IAAI,OAAO,CAAC;QACpC,YAAY,EAAE,sBAAsB,CAAC;QACrC,KAAK,EAAE,KAAK,CAAC;QACb,iBAAiB,EAAE,WAAW,CAAC;KAChC,CAAC,CAoBD;IAED;;;;;OAKG;IACH,OAAO,CAAC,eAAe;YA2DT,uBAAuB;YAmCvB,uBAAuB;IAkCrC,OAAO,CAAC,iBAAiB;IAqDzB,OAAO,CAAC,yBAAyB;IA+BjC,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,kBAAkB;IA+B1B,OAAO,CAAC,sBAAsB;IA0D9B,OAAO,CAAC,wBAAwB;IAkChC,OAAO,CAAC,gCAAgC;IAUxC,OAAO,CAAC,wBAAwB;IAgChC,OAAO,CAAC,uBAAuB;YA6BjB,2BAA2B;IA4DzC,OAAO,CAAC,4BAA4B;IA+BpC,OAAO,CAAC,mBAAmB;IAkC3B,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,8BAA8B;IAatC,OAAO,CAAC,8BAA8B;YASxB,mCAAmC;YAgBnC,mCAAmC;IAQjD,OAAO,CAAC,wCAAwC;IAahD,OAAO,CAAC,yBAAyB;IASjC;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IA2BjB,OAAO,CAAC,yBAAyB;CAWlC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import type { EthAddress } from '@aztec/stdlib/block';
|
|
5
|
-
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
6
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
7
|
-
import type { CheckpointConstantData, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
8
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
9
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
10
|
-
import type { ProvingOrchestrator } from '../orchestrator/orchestrator.js';
|
|
11
|
-
import type { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
12
|
-
/** Encapsulates the proving orchestrator and the broker facade */
|
|
13
|
-
export declare class ServerEpochProver implements EpochProver {
|
|
14
|
-
private facade;
|
|
15
|
-
private orchestrator;
|
|
16
|
-
constructor(facade: BrokerCircuitProverFacade, orchestrator: ProvingOrchestrator);
|
|
17
|
-
startNewEpoch(epochNumber: EpochNumber, totalNumCheckpoints: number, finalBlobBatchingChallenges: FinalBlobBatchingChallenges): void;
|
|
18
|
-
startNewCheckpoint(checkpointIndex: number, constants: CheckpointConstantData, l1ToL2Messages: Fr[], totalNumBlocks: number, headerOfLastBlockInPreviousCheckpoint: BlockHeader): Promise<void>;
|
|
19
|
-
startChonkVerifierCircuits(txs: Tx[]): Promise<void>;
|
|
20
|
-
setBlockCompleted(blockNumber: BlockNumber, expectedBlockHeader?: BlockHeader): Promise<BlockHeader>;
|
|
21
|
-
finalizeEpoch(): Promise<{
|
|
22
|
-
publicInputs: RootRollupPublicInputs;
|
|
23
|
-
proof: Proof;
|
|
24
|
-
batchedBlobInputs: BatchedBlob;
|
|
25
|
-
}>;
|
|
26
|
-
cancel(): void;
|
|
27
|
-
getProverId(): EthAddress;
|
|
28
|
-
stop(): Promise<void>;
|
|
29
|
-
startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number): Promise<void>;
|
|
30
|
-
addTxs(txs: ProcessedTx[]): Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLWVwb2NoLXByb3Zlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Byb3Zlci1jbGllbnQvc2VydmVyLWVwb2NoLXByb3Zlci50cyJdLCJuYW1lcyI6W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A0B,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnD;IACD,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,mBAAmB,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAEnG;IACD,aAAa,IAAI,OAAO,CAAC;QAAE,YAAY,EAAE,sBAAsB,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,iBAAiB,EAAE,WAAW,CAAA;KAAE,CAAC,CAE/G;IACD,MAAM,IAAI,IAAI,CAEb;IACD,WAAW,IAAI,UAAU,CAExB;IACK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAG1B;IACD,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F;IACD,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAExC;CACF"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** Encapsulates the proving orchestrator and the broker facade */ export class ServerEpochProver {
|
|
2
|
-
facade;
|
|
3
|
-
orchestrator;
|
|
4
|
-
constructor(facade, orchestrator){
|
|
5
|
-
this.facade = facade;
|
|
6
|
-
this.orchestrator = orchestrator;
|
|
7
|
-
}
|
|
8
|
-
startNewEpoch(epochNumber, totalNumCheckpoints, finalBlobBatchingChallenges) {
|
|
9
|
-
this.orchestrator.startNewEpoch(epochNumber, totalNumCheckpoints, finalBlobBatchingChallenges);
|
|
10
|
-
this.facade.start();
|
|
11
|
-
}
|
|
12
|
-
startNewCheckpoint(checkpointIndex, constants, l1ToL2Messages, totalNumBlocks, headerOfLastBlockInPreviousCheckpoint) {
|
|
13
|
-
return this.orchestrator.startNewCheckpoint(checkpointIndex, constants, l1ToL2Messages, totalNumBlocks, headerOfLastBlockInPreviousCheckpoint);
|
|
14
|
-
}
|
|
15
|
-
startChonkVerifierCircuits(txs) {
|
|
16
|
-
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
17
|
-
}
|
|
18
|
-
setBlockCompleted(blockNumber, expectedBlockHeader) {
|
|
19
|
-
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
20
|
-
}
|
|
21
|
-
finalizeEpoch() {
|
|
22
|
-
return this.orchestrator.finalizeEpoch();
|
|
23
|
-
}
|
|
24
|
-
cancel() {
|
|
25
|
-
this.orchestrator.cancel();
|
|
26
|
-
}
|
|
27
|
-
getProverId() {
|
|
28
|
-
return this.orchestrator.getProverId();
|
|
29
|
-
}
|
|
30
|
-
async stop() {
|
|
31
|
-
await this.facade.stop();
|
|
32
|
-
await this.orchestrator.stop();
|
|
33
|
-
}
|
|
34
|
-
startNewBlock(blockNumber, timestamp, totalNumTxs) {
|
|
35
|
-
return this.orchestrator.startNewBlock(blockNumber, timestamp, totalNumTxs);
|
|
36
|
-
}
|
|
37
|
-
addTxs(txs) {
|
|
38
|
-
return this.orchestrator.addTxs(txs);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import { BatchedBlob, BatchedBlobAccumulator, type FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
|
-
import {
|
|
3
|
-
type ARCHIVE_HEIGHT,
|
|
4
|
-
type L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
|
|
5
|
-
type NESTED_RECURSIVE_PROOF_LENGTH,
|
|
6
|
-
type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
7
|
-
OUT_HASH_TREE_HEIGHT,
|
|
8
|
-
} from '@aztec/constants';
|
|
9
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
10
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
11
|
-
import type { Tuple } from '@aztec/foundation/serialize';
|
|
12
|
-
import {
|
|
13
|
-
MerkleTreeCalculator,
|
|
14
|
-
type TreeNodeLocation,
|
|
15
|
-
UnbalancedTreeStore,
|
|
16
|
-
shaMerkleHash,
|
|
17
|
-
} from '@aztec/foundation/trees';
|
|
18
|
-
import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
19
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
20
|
-
import {
|
|
21
|
-
CheckpointConstantData,
|
|
22
|
-
CheckpointMergeRollupPrivateInputs,
|
|
23
|
-
CheckpointPaddingRollupPrivateInputs,
|
|
24
|
-
CheckpointRollupPublicInputs,
|
|
25
|
-
PublicChonkVerifierPublicInputs,
|
|
26
|
-
RootRollupPrivateInputs,
|
|
27
|
-
type RootRollupPublicInputs,
|
|
28
|
-
} from '@aztec/stdlib/rollup';
|
|
29
|
-
import { AppendOnlyTreeSnapshot, type MerkleTreeId } from '@aztec/stdlib/trees';
|
|
30
|
-
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
31
|
-
|
|
32
|
-
import { toProofData } from './block-building-helpers.js';
|
|
33
|
-
import type { ProofState } from './block-proving-state.js';
|
|
34
|
-
import { CheckpointProvingState } from './checkpoint-proving-state.js';
|
|
35
|
-
|
|
36
|
-
export type TreeSnapshots = Map<MerkleTreeId, AppendOnlyTreeSnapshot>;
|
|
37
|
-
|
|
38
|
-
enum PROVING_STATE_LIFECYCLE {
|
|
39
|
-
PROVING_STATE_CREATED,
|
|
40
|
-
PROVING_STATE_FULL,
|
|
41
|
-
PROVING_STATE_RESOLVED,
|
|
42
|
-
PROVING_STATE_REJECTED,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type ProvingResult = { status: 'success' } | { status: 'failure'; reason: string };
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The current state of the proving schedule for an epoch.
|
|
49
|
-
* Contains the raw inputs and intermediate state to generate every constituent proof in the tree.
|
|
50
|
-
* Carries an identifier so we can identify if the proving state is discarded and a new one started.
|
|
51
|
-
* Captures resolve and reject callbacks to provide a promise base interface to the consumer of our proving.
|
|
52
|
-
*/
|
|
53
|
-
export class EpochProvingState {
|
|
54
|
-
private checkpointProofs: UnbalancedTreeStore<
|
|
55
|
-
ProofState<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
56
|
-
>;
|
|
57
|
-
private checkpointPaddingProof:
|
|
58
|
-
| ProofState<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
59
|
-
| undefined;
|
|
60
|
-
private rootRollupProof: ProofState<RootRollupPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH> | undefined;
|
|
61
|
-
private checkpoints: (CheckpointProvingState | undefined)[] = [];
|
|
62
|
-
private startBlobAccumulator: BatchedBlobAccumulator;
|
|
63
|
-
private endBlobAccumulator: BatchedBlobAccumulator | undefined;
|
|
64
|
-
private finalBatchedBlob: BatchedBlob | undefined;
|
|
65
|
-
private provingStateLifecycle = PROVING_STATE_LIFECYCLE.PROVING_STATE_CREATED;
|
|
66
|
-
|
|
67
|
-
// Map from tx hash to chonk verifier proof promise. Used when kickstarting chonk verifier proofs before tx processing.
|
|
68
|
-
public readonly cachedChonkVerifierProofs = new Map<
|
|
69
|
-
string,
|
|
70
|
-
Promise<
|
|
71
|
-
PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
72
|
-
>
|
|
73
|
-
>();
|
|
74
|
-
|
|
75
|
-
constructor(
|
|
76
|
-
public readonly epochNumber: EpochNumber,
|
|
77
|
-
public readonly totalNumCheckpoints: number,
|
|
78
|
-
private readonly finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
79
|
-
private onCheckpointBlobAccumulatorSet: (checkpoint: CheckpointProvingState) => Promise<void>,
|
|
80
|
-
private completionCallback: (result: ProvingResult) => void,
|
|
81
|
-
private rejectionCallback: (reason: string) => void,
|
|
82
|
-
) {
|
|
83
|
-
this.checkpointProofs = new UnbalancedTreeStore(totalNumCheckpoints);
|
|
84
|
-
this.startBlobAccumulator = BatchedBlobAccumulator.newWithChallenges(finalBlobBatchingChallenges);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Adds a block to the proving state, returns its index
|
|
88
|
-
// Will update the proving life cycle if this is the last block
|
|
89
|
-
public startNewCheckpoint(
|
|
90
|
-
checkpointIndex: number,
|
|
91
|
-
constants: CheckpointConstantData,
|
|
92
|
-
totalNumBlocks: number,
|
|
93
|
-
previousBlockHeader: BlockHeader,
|
|
94
|
-
lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
|
|
95
|
-
l1ToL2Messages: Fr[],
|
|
96
|
-
lastL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot,
|
|
97
|
-
lastL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
98
|
-
newL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot,
|
|
99
|
-
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
100
|
-
): CheckpointProvingState {
|
|
101
|
-
if (checkpointIndex >= this.totalNumCheckpoints) {
|
|
102
|
-
throw new Error(
|
|
103
|
-
`Unable to start a new checkpoint at index ${checkpointIndex}. Expected at most ${this.totalNumCheckpoints} checkpoints.`,
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const checkpoint = new CheckpointProvingState(
|
|
108
|
-
checkpointIndex,
|
|
109
|
-
constants,
|
|
110
|
-
totalNumBlocks,
|
|
111
|
-
this.finalBlobBatchingChallenges,
|
|
112
|
-
previousBlockHeader,
|
|
113
|
-
lastArchiveSiblingPath,
|
|
114
|
-
l1ToL2Messages,
|
|
115
|
-
lastL1ToL2MessageTreeSnapshot,
|
|
116
|
-
lastL1ToL2MessageSubtreeRootSiblingPath,
|
|
117
|
-
newL1ToL2MessageTreeSnapshot,
|
|
118
|
-
newL1ToL2MessageSubtreeRootSiblingPath,
|
|
119
|
-
this,
|
|
120
|
-
this.onCheckpointBlobAccumulatorSet,
|
|
121
|
-
);
|
|
122
|
-
this.checkpoints[checkpointIndex] = checkpoint;
|
|
123
|
-
|
|
124
|
-
if (this.checkpoints.filter(c => !!c).length === this.totalNumCheckpoints) {
|
|
125
|
-
this.provingStateLifecycle = PROVING_STATE_LIFECYCLE.PROVING_STATE_FULL;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return checkpoint;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
public getCheckpointProvingState(index: number) {
|
|
132
|
-
return this.checkpoints[index];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
public getCheckpointProvingStateByBlockNumber(blockNumber: BlockNumber) {
|
|
136
|
-
return this.checkpoints.find(
|
|
137
|
-
c =>
|
|
138
|
-
c &&
|
|
139
|
-
Number(blockNumber) >= Number(c.firstBlockNumber) &&
|
|
140
|
-
Number(blockNumber) < Number(c.firstBlockNumber) + c.totalNumBlocks,
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
public getBlockProvingStateByBlockNumber(blockNumber: BlockNumber) {
|
|
145
|
-
return this.getCheckpointProvingStateByBlockNumber(blockNumber)?.getBlockProvingStateByBlockNumber(blockNumber);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Returns true if this proving state is still valid, false otherwise
|
|
149
|
-
public verifyState() {
|
|
150
|
-
return (
|
|
151
|
-
this.provingStateLifecycle === PROVING_STATE_LIFECYCLE.PROVING_STATE_CREATED ||
|
|
152
|
-
this.provingStateLifecycle === PROVING_STATE_LIFECYCLE.PROVING_STATE_FULL
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Returns true if we are still able to accept checkpoints, false otherwise.
|
|
157
|
-
public isAcceptingCheckpoints() {
|
|
158
|
-
return this.checkpoints.filter(c => !!c).length < this.totalNumCheckpoints;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
public setCheckpointRootRollupProof(
|
|
162
|
-
checkpointIndex: number,
|
|
163
|
-
provingOutput: PublicInputsAndRecursiveProof<
|
|
164
|
-
CheckpointRollupPublicInputs,
|
|
165
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
166
|
-
>,
|
|
167
|
-
): TreeNodeLocation {
|
|
168
|
-
return this.checkpointProofs.setLeaf(checkpointIndex, { provingOutput });
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
public tryStartProvingCheckpointMerge(location: TreeNodeLocation) {
|
|
172
|
-
if (this.checkpointProofs.getNode(location)?.isProving) {
|
|
173
|
-
return false;
|
|
174
|
-
} else {
|
|
175
|
-
this.checkpointProofs.setNode(location, { isProving: true });
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
public setCheckpointMergeRollupProof(
|
|
181
|
-
location: TreeNodeLocation,
|
|
182
|
-
provingOutput: PublicInputsAndRecursiveProof<
|
|
183
|
-
CheckpointRollupPublicInputs,
|
|
184
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
185
|
-
>,
|
|
186
|
-
) {
|
|
187
|
-
this.checkpointProofs.setNode(location, { provingOutput });
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
public tryStartProvingRootRollup() {
|
|
191
|
-
if (this.rootRollupProof?.isProving) {
|
|
192
|
-
return false;
|
|
193
|
-
} else {
|
|
194
|
-
this.rootRollupProof = { isProving: true };
|
|
195
|
-
return true;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
public setRootRollupProof(provingOutput: PublicInputsAndRecursiveProof<RootRollupPublicInputs>) {
|
|
200
|
-
this.rootRollupProof = { provingOutput };
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
public tryStartProvingPaddingCheckpoint() {
|
|
204
|
-
if (this.checkpointPaddingProof?.isProving) {
|
|
205
|
-
return false;
|
|
206
|
-
} else {
|
|
207
|
-
this.checkpointPaddingProof = { isProving: true };
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
public setCheckpointPaddingProof(
|
|
213
|
-
provingOutput: PublicInputsAndRecursiveProof<
|
|
214
|
-
CheckpointRollupPublicInputs,
|
|
215
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
216
|
-
>,
|
|
217
|
-
) {
|
|
218
|
-
this.checkpointPaddingProof = { provingOutput };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
public async accumulateCheckpointOutHashes() {
|
|
222
|
-
const treeCalculator = await MerkleTreeCalculator.create(OUT_HASH_TREE_HEIGHT, undefined, (left, right) =>
|
|
223
|
-
Promise.resolve(shaMerkleHash(left, right)),
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
const computeOutHashHint = async (leaves: Fr[]) => {
|
|
227
|
-
const tree = await treeCalculator.computeTree(leaves.map(l => l.toBuffer()));
|
|
228
|
-
const nextAvailableLeafIndex = leaves.length;
|
|
229
|
-
return {
|
|
230
|
-
treeSnapshot: new AppendOnlyTreeSnapshot(Fr.fromBuffer(tree.root), nextAvailableLeafIndex),
|
|
231
|
-
siblingPath: tree.getSiblingPath(nextAvailableLeafIndex).map(Fr.fromBuffer) as Tuple<
|
|
232
|
-
Fr,
|
|
233
|
-
typeof OUT_HASH_TREE_HEIGHT
|
|
234
|
-
>,
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
let hint = this.checkpoints[0]?.getOutHashHint();
|
|
239
|
-
const outHashes = [];
|
|
240
|
-
for (let i = 0; i < this.totalNumCheckpoints; i++) {
|
|
241
|
-
const checkpoint = this.checkpoints[i];
|
|
242
|
-
if (!checkpoint) {
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
// If hints are not set yet, it must be the first checkpoint. Compute the hints with an empty tree.
|
|
247
|
-
hint ??= await computeOutHashHint([]);
|
|
248
|
-
checkpoint.setOutHashHint(hint);
|
|
249
|
-
|
|
250
|
-
// Get the out hash for this checkpoint.
|
|
251
|
-
const outHash = checkpoint.accumulateBlockOutHashes();
|
|
252
|
-
if (!outHash) {
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
outHashes.push(outHash);
|
|
256
|
-
|
|
257
|
-
// If this is NOT the last checkpoint, get or create the hint for the next checkpoint.
|
|
258
|
-
if (i !== this.totalNumCheckpoints - 1) {
|
|
259
|
-
hint = checkpoint.getOutHashHintForNextCheckpoint() ?? (await computeOutHashHint(outHashes));
|
|
260
|
-
checkpoint.setOutHashHintForNextCheckpoint(hint);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
public async setBlobAccumulators() {
|
|
266
|
-
let previousAccumulator = this.startBlobAccumulator;
|
|
267
|
-
// Accumulate blobs as far as we can for this epoch.
|
|
268
|
-
for (let i = 0; i < this.totalNumCheckpoints; i++) {
|
|
269
|
-
const checkpoint = this.checkpoints[i];
|
|
270
|
-
if (!checkpoint) {
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const endAccumulator =
|
|
275
|
-
checkpoint.getEndBlobAccumulator() || (await checkpoint.accumulateBlobs(previousAccumulator));
|
|
276
|
-
if (!endAccumulator) {
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
previousAccumulator = endAccumulator;
|
|
281
|
-
|
|
282
|
-
// If this is the last checkpoint, set the end blob accumulator.
|
|
283
|
-
if (i === this.totalNumCheckpoints - 1) {
|
|
284
|
-
this.endBlobAccumulator = endAccumulator;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
public async finalizeBatchedBlob() {
|
|
290
|
-
if (!this.endBlobAccumulator) {
|
|
291
|
-
throw new Error('End blob accumulator not ready.');
|
|
292
|
-
}
|
|
293
|
-
this.finalBatchedBlob = await this.endBlobAccumulator.finalize(true /* verifyProof */);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
public getParentLocation(location: TreeNodeLocation) {
|
|
297
|
-
return this.checkpointProofs.getParentLocation(location);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
public getCheckpointMergeRollupInputs(mergeLocation: TreeNodeLocation) {
|
|
301
|
-
const [left, right] = this.checkpointProofs.getChildren(mergeLocation).map(c => c?.provingOutput);
|
|
302
|
-
if (!left || !right) {
|
|
303
|
-
throw new Error('At least one child is not ready for the checkpoint merge rollup.');
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
return new CheckpointMergeRollupPrivateInputs([toProofData(left), toProofData(right)]);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
public getRootRollupInputs() {
|
|
310
|
-
const [left, right] = this.#getChildProofsForRoot();
|
|
311
|
-
if (!left || !right) {
|
|
312
|
-
throw new Error('At least one child is not ready for the root rollup.');
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
return RootRollupPrivateInputs.from({
|
|
316
|
-
previousRollups: [toProofData(left), toProofData(right)],
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
public getPaddingCheckpointInputs() {
|
|
321
|
-
return new CheckpointPaddingRollupPrivateInputs();
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
public getEpochProofResult(): { proof: Proof; publicInputs: RootRollupPublicInputs; batchedBlobInputs: BatchedBlob } {
|
|
325
|
-
const provingOutput = this.rootRollupProof?.provingOutput;
|
|
326
|
-
|
|
327
|
-
if (!provingOutput || !this.finalBatchedBlob) {
|
|
328
|
-
throw new Error('Unable to get epoch proof result. Root rollup is not ready.');
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
return {
|
|
332
|
-
proof: provingOutput.proof.binaryProof,
|
|
333
|
-
publicInputs: provingOutput.inputs,
|
|
334
|
-
batchedBlobInputs: this.finalBatchedBlob,
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
public isReadyForCheckpointMerge(location: TreeNodeLocation) {
|
|
339
|
-
return !!this.checkpointProofs.getSibling(location)?.provingOutput;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// Returns true if we have sufficient inputs to execute the block root rollup
|
|
343
|
-
public isReadyForRootRollup() {
|
|
344
|
-
const childProofs = this.#getChildProofsForRoot();
|
|
345
|
-
return childProofs.every(p => !!p);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Attempts to reject the proving state promise with a reason of 'cancelled'
|
|
349
|
-
public cancel() {
|
|
350
|
-
this.reject('Proving cancelled');
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Attempts to reject the proving state promise with the given reason
|
|
354
|
-
// Does nothing if not in a valid state
|
|
355
|
-
public reject(reason: string) {
|
|
356
|
-
if (!this.verifyState()) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
this.provingStateLifecycle = PROVING_STATE_LIFECYCLE.PROVING_STATE_REJECTED;
|
|
360
|
-
this.rejectionCallback(reason);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
// Attempts to resolve the proving state promise with the given result
|
|
364
|
-
// Does nothing if not in a valid state
|
|
365
|
-
public resolve(result: ProvingResult) {
|
|
366
|
-
if (!this.verifyState()) {
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
this.provingStateLifecycle = PROVING_STATE_LIFECYCLE.PROVING_STATE_RESOLVED;
|
|
370
|
-
this.completionCallback(result);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
#getChildProofsForRoot() {
|
|
374
|
-
const rootLocation = { level: 0, index: 0 };
|
|
375
|
-
// If there's only 1 block, its block root proof will be stored at the root.
|
|
376
|
-
return this.totalNumCheckpoints === 1
|
|
377
|
-
? [this.checkpointProofs.getNode(rootLocation)?.provingOutput, this.checkpointPaddingProof?.provingOutput]
|
|
378
|
-
: this.checkpointProofs.getChildren(rootLocation).map(c => c?.provingOutput);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import type { EthAddress } from '@aztec/stdlib/block';
|
|
5
|
-
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
6
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
7
|
-
import type { CheckpointConstantData, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
8
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
9
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
10
|
-
|
|
11
|
-
import type { ProvingOrchestrator } from '../orchestrator/orchestrator.js';
|
|
12
|
-
import type { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
13
|
-
|
|
14
|
-
/** Encapsulates the proving orchestrator and the broker facade */
|
|
15
|
-
export class ServerEpochProver implements EpochProver {
|
|
16
|
-
constructor(
|
|
17
|
-
private facade: BrokerCircuitProverFacade,
|
|
18
|
-
private orchestrator: ProvingOrchestrator,
|
|
19
|
-
) {}
|
|
20
|
-
|
|
21
|
-
startNewEpoch(
|
|
22
|
-
epochNumber: EpochNumber,
|
|
23
|
-
totalNumCheckpoints: number,
|
|
24
|
-
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
25
|
-
): void {
|
|
26
|
-
this.orchestrator.startNewEpoch(epochNumber, totalNumCheckpoints, finalBlobBatchingChallenges);
|
|
27
|
-
this.facade.start();
|
|
28
|
-
}
|
|
29
|
-
startNewCheckpoint(
|
|
30
|
-
checkpointIndex: number,
|
|
31
|
-
constants: CheckpointConstantData,
|
|
32
|
-
l1ToL2Messages: Fr[],
|
|
33
|
-
totalNumBlocks: number,
|
|
34
|
-
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
35
|
-
): Promise<void> {
|
|
36
|
-
return this.orchestrator.startNewCheckpoint(
|
|
37
|
-
checkpointIndex,
|
|
38
|
-
constants,
|
|
39
|
-
l1ToL2Messages,
|
|
40
|
-
totalNumBlocks,
|
|
41
|
-
headerOfLastBlockInPreviousCheckpoint,
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
startChonkVerifierCircuits(txs: Tx[]): Promise<void> {
|
|
45
|
-
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
46
|
-
}
|
|
47
|
-
setBlockCompleted(blockNumber: BlockNumber, expectedBlockHeader?: BlockHeader): Promise<BlockHeader> {
|
|
48
|
-
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
49
|
-
}
|
|
50
|
-
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
51
|
-
return this.orchestrator.finalizeEpoch();
|
|
52
|
-
}
|
|
53
|
-
cancel(): void {
|
|
54
|
-
this.orchestrator.cancel();
|
|
55
|
-
}
|
|
56
|
-
getProverId(): EthAddress {
|
|
57
|
-
return this.orchestrator.getProverId();
|
|
58
|
-
}
|
|
59
|
-
async stop(): Promise<void> {
|
|
60
|
-
await this.facade.stop();
|
|
61
|
-
await this.orchestrator.stop();
|
|
62
|
-
}
|
|
63
|
-
startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number): Promise<void> {
|
|
64
|
-
return this.orchestrator.startNewBlock(blockNumber, timestamp, totalNumTxs);
|
|
65
|
-
}
|
|
66
|
-
addTxs(txs: ProcessedTx[]): Promise<void> {
|
|
67
|
-
return this.orchestrator.addTxs(txs);
|
|
68
|
-
}
|
|
69
|
-
}
|