@aztec/prover-client 0.0.1-fake-c83136db25 → 0.0.1-fake-ceab37513c
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/bin/get-proof-inputs.d.ts +2 -0
- package/dest/bin/get-proof-inputs.d.ts.map +1 -0
- package/dest/bin/get-proof-inputs.js +51 -0
- package/dest/block-factory/light.d.ts +3 -5
- package/dest/block-factory/light.d.ts.map +1 -1
- package/dest/block-factory/light.js +9 -16
- package/dest/config.js +1 -1
- package/dest/mocks/fixtures.d.ts +1 -4
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +3 -31
- package/dest/mocks/test_context.d.ts +9 -32
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +22 -78
- package/dest/orchestrator/block-building-helpers.d.ts +31 -33
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +137 -126
- package/dest/orchestrator/block-proving-state.d.ts +53 -60
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +187 -214
- package/dest/orchestrator/epoch-proving-state.d.ts +28 -34
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +84 -128
- package/dest/orchestrator/orchestrator.d.ts +30 -31
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +236 -368
- package/dest/orchestrator/tx-proving-state.d.ts +9 -11
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +23 -26
- package/dest/prover-client/server-epoch-prover.d.ts +8 -9
- package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
- package/dest/prover-client/server-epoch-prover.js +9 -9
- package/dest/proving_broker/broker_prover_facade.d.ts +15 -20
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +21 -36
- package/dest/proving_broker/fixtures.js +1 -1
- package/dest/proving_broker/proof_store/index.d.ts +0 -1
- package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/index.js +0 -1
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +18 -29
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +18 -38
- package/dest/test/mock_prover.d.ts +17 -22
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +20 -35
- package/package.json +17 -16
- package/src/bin/get-proof-inputs.ts +59 -0
- package/src/block-factory/light.ts +9 -35
- package/src/config.ts +1 -1
- package/src/mocks/fixtures.ts +11 -39
- package/src/mocks/test_context.ts +31 -137
- package/src/orchestrator/block-building-helpers.ts +211 -211
- package/src/orchestrator/block-proving-state.ts +245 -235
- package/src/orchestrator/epoch-proving-state.ts +127 -172
- package/src/orchestrator/orchestrator.ts +303 -545
- package/src/orchestrator/tx-proving-state.ts +43 -49
- package/src/prover-client/server-epoch-prover.ts +18 -28
- package/src/proving_broker/broker_prover_facade.ts +86 -157
- package/src/proving_broker/fixtures.ts +1 -1
- package/src/proving_broker/proof_store/index.ts +0 -1
- package/src/proving_broker/proving_broker.ts +18 -36
- package/src/proving_broker/proving_job_controller.ts +18 -38
- package/src/test/mock_prover.ts +60 -142
- package/dest/orchestrator/checkpoint-proving-state.d.ts +0 -63
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +0 -1
- package/dest/orchestrator/checkpoint-proving-state.js +0 -211
- package/src/orchestrator/checkpoint-proving-state.ts +0 -299
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BatchedBlobAccumulator } from '@aztec/blob-lib';
|
|
2
1
|
import { UnbalancedTreeStore } from '@aztec/foundation/trees';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { getVKIndex, getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
3
|
+
import { BlockMergeRollupInputs, PreviousRollupBlockData, RootRollupInputs } from '@aztec/stdlib/rollup';
|
|
4
|
+
import { VkData } from '@aztec/stdlib/vks';
|
|
5
|
+
import { BlockProvingState } from './block-proving-state.js';
|
|
6
6
|
var PROVING_STATE_LIFECYCLE = /*#__PURE__*/ function(PROVING_STATE_LIFECYCLE) {
|
|
7
7
|
PROVING_STATE_LIFECYCLE[PROVING_STATE_LIFECYCLE["PROVING_STATE_CREATED"] = 0] = "PROVING_STATE_CREATED";
|
|
8
8
|
PROVING_STATE_LIFECYCLE[PROVING_STATE_LIFECYCLE["PROVING_STATE_FULL"] = 1] = "PROVING_STATE_FULL";
|
|
@@ -17,180 +17,131 @@ var PROVING_STATE_LIFECYCLE = /*#__PURE__*/ function(PROVING_STATE_LIFECYCLE) {
|
|
|
17
17
|
* Captures resolve and reject callbacks to provide a promise base interface to the consumer of our proving.
|
|
18
18
|
*/ export class EpochProvingState {
|
|
19
19
|
epochNumber;
|
|
20
|
-
|
|
20
|
+
firstBlockNumber;
|
|
21
|
+
totalNumBlocks;
|
|
21
22
|
finalBlobBatchingChallenges;
|
|
22
|
-
onCheckpointBlobAccumulatorSet;
|
|
23
23
|
completionCallback;
|
|
24
24
|
rejectionCallback;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
checkpoints;
|
|
29
|
-
startBlobAccumulator;
|
|
30
|
-
endBlobAccumulator;
|
|
25
|
+
blockRootOrMergeProvingOutputs;
|
|
26
|
+
paddingBlockRootProvingOutput;
|
|
27
|
+
rootRollupProvingOutput;
|
|
31
28
|
finalBatchedBlob;
|
|
32
29
|
provingStateLifecycle;
|
|
33
|
-
// Map from tx hash to
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
// Map from tx hash to tube proof promise. Used when kickstarting tube proofs before tx processing.
|
|
31
|
+
cachedTubeProofs;
|
|
32
|
+
blocks;
|
|
33
|
+
constructor(epochNumber, firstBlockNumber, totalNumBlocks, finalBlobBatchingChallenges, completionCallback, rejectionCallback){
|
|
36
34
|
this.epochNumber = epochNumber;
|
|
37
|
-
this.
|
|
35
|
+
this.firstBlockNumber = firstBlockNumber;
|
|
36
|
+
this.totalNumBlocks = totalNumBlocks;
|
|
38
37
|
this.finalBlobBatchingChallenges = finalBlobBatchingChallenges;
|
|
39
|
-
this.onCheckpointBlobAccumulatorSet = onCheckpointBlobAccumulatorSet;
|
|
40
38
|
this.completionCallback = completionCallback;
|
|
41
39
|
this.rejectionCallback = rejectionCallback;
|
|
42
|
-
this.checkpoints = [];
|
|
43
40
|
this.provingStateLifecycle = 0;
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
41
|
+
this.cachedTubeProofs = new Map();
|
|
42
|
+
this.blocks = [];
|
|
43
|
+
this.blockRootOrMergeProvingOutputs = new UnbalancedTreeStore(totalNumBlocks);
|
|
47
44
|
}
|
|
48
45
|
// Adds a block to the proving state, returns its index
|
|
49
46
|
// Will update the proving life cycle if this is the last block
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.checkpoints[checkpointIndex] = checkpoint;
|
|
56
|
-
if (this.checkpoints.filter((c)=>!!c).length === this.totalNumCheckpoints) {
|
|
47
|
+
startNewBlock(globalVariables, l1ToL2Messages, l1ToL2MessageTreeSnapshot, l1ToL2MessageSubtreeSiblingPath, l1ToL2MessageTreeSnapshotAfterInsertion, lastArchiveSnapshot, lastArchiveSiblingPath, newArchiveSiblingPath, previousBlockHeader, proverId) {
|
|
48
|
+
const index = globalVariables.blockNumber - this.firstBlockNumber;
|
|
49
|
+
const block = new BlockProvingState(index, globalVariables, l1ToL2Messages, l1ToL2MessageTreeSnapshot, l1ToL2MessageSubtreeSiblingPath, l1ToL2MessageTreeSnapshotAfterInsertion, lastArchiveSnapshot, lastArchiveSiblingPath, newArchiveSiblingPath, previousBlockHeader, proverId, this);
|
|
50
|
+
this.blocks[index] = block;
|
|
51
|
+
if (this.blocks.filter((b)=>!!b).length === this.totalNumBlocks) {
|
|
57
52
|
this.provingStateLifecycle = 1;
|
|
58
53
|
}
|
|
59
|
-
return
|
|
60
|
-
}
|
|
61
|
-
getCheckpointProvingState(index) {
|
|
62
|
-
return this.checkpoints[index];
|
|
63
|
-
}
|
|
64
|
-
getCheckpointProvingStateByBlockNumber(blockNumber) {
|
|
65
|
-
return this.checkpoints.find((c)=>c && blockNumber >= c.firstBlockNumber && blockNumber < c.firstBlockNumber + c.totalNumBlocks);
|
|
66
|
-
}
|
|
67
|
-
getBlockProvingStateByBlockNumber(blockNumber) {
|
|
68
|
-
return this.getCheckpointProvingStateByBlockNumber(blockNumber)?.getBlockProvingStateByBlockNumber(blockNumber);
|
|
54
|
+
return block;
|
|
69
55
|
}
|
|
70
56
|
// Returns true if this proving state is still valid, false otherwise
|
|
71
57
|
verifyState() {
|
|
72
58
|
return this.provingStateLifecycle === 0 || this.provingStateLifecycle === 1;
|
|
73
59
|
}
|
|
74
|
-
// Returns true if we are still able to accept
|
|
75
|
-
|
|
76
|
-
return this.
|
|
60
|
+
// Returns true if we are still able to accept blocks, false otherwise
|
|
61
|
+
isAcceptingBlocks() {
|
|
62
|
+
return this.provingStateLifecycle === 0;
|
|
77
63
|
}
|
|
78
|
-
|
|
79
|
-
return this.
|
|
80
|
-
provingOutput
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
tryStartProvingCheckpointMerge(location) {
|
|
84
|
-
if (this.checkpointProofs.getNode(location)?.isProving) {
|
|
85
|
-
return false;
|
|
86
|
-
} else {
|
|
87
|
-
this.checkpointProofs.setNode(location, {
|
|
88
|
-
isProving: true
|
|
89
|
-
});
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
setCheckpointMergeRollupProof(location, provingOutput) {
|
|
94
|
-
this.checkpointProofs.setNode(location, {
|
|
95
|
-
provingOutput
|
|
96
|
-
});
|
|
64
|
+
setBlockRootRollupProof(blockIndex, proof) {
|
|
65
|
+
return this.blockRootOrMergeProvingOutputs.setLeaf(blockIndex, proof);
|
|
97
66
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return false;
|
|
101
|
-
} else {
|
|
102
|
-
this.rootRollupProof = {
|
|
103
|
-
isProving: true
|
|
104
|
-
};
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
67
|
+
setBlockMergeRollupProof(location, proof) {
|
|
68
|
+
this.blockRootOrMergeProvingOutputs.setNode(location, proof);
|
|
107
69
|
}
|
|
108
|
-
setRootRollupProof(
|
|
109
|
-
this.
|
|
110
|
-
provingOutput
|
|
111
|
-
};
|
|
70
|
+
setRootRollupProof(proof) {
|
|
71
|
+
this.rootRollupProvingOutput = proof;
|
|
112
72
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return false;
|
|
116
|
-
} else {
|
|
117
|
-
this.checkpointPaddingProof = {
|
|
118
|
-
isProving: true
|
|
119
|
-
};
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
73
|
+
setPaddingBlockRootProof(proof) {
|
|
74
|
+
this.paddingBlockRootProvingOutput = proof;
|
|
122
75
|
}
|
|
123
|
-
|
|
124
|
-
this.
|
|
125
|
-
provingOutput
|
|
126
|
-
};
|
|
76
|
+
setFinalBatchedBlob(batchedBlob) {
|
|
77
|
+
this.finalBatchedBlob = batchedBlob;
|
|
127
78
|
}
|
|
128
|
-
async setBlobAccumulators() {
|
|
129
|
-
let previousAccumulator
|
|
79
|
+
async setBlobAccumulators(toBlock) {
|
|
80
|
+
let previousAccumulator;
|
|
81
|
+
const end = toBlock ? toBlock - this.firstBlockNumber : this.blocks.length;
|
|
130
82
|
// Accumulate blobs as far as we can for this epoch.
|
|
131
|
-
for(let i = 0; i
|
|
132
|
-
const
|
|
133
|
-
if (!
|
|
83
|
+
for(let i = 0; i <= end; i++){
|
|
84
|
+
const block = this.blocks[i];
|
|
85
|
+
if (!block || !block.block) {
|
|
134
86
|
break;
|
|
135
87
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
88
|
+
if (!block.startBlobAccumulator) {
|
|
89
|
+
// startBlobAccumulator always exists for firstBlockNumber, so the below should never assign an undefined:
|
|
90
|
+
block.setStartBlobAccumulator(previousAccumulator);
|
|
139
91
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (i === this.totalNumCheckpoints - 1) {
|
|
143
|
-
this.endBlobAccumulator = endAccumulator;
|
|
92
|
+
if (block.startBlobAccumulator && !block.endBlobAccumulator) {
|
|
93
|
+
await block.accumulateBlobs();
|
|
144
94
|
}
|
|
95
|
+
previousAccumulator = block.endBlobAccumulator;
|
|
145
96
|
}
|
|
146
97
|
}
|
|
147
|
-
async finalizeBatchedBlob() {
|
|
148
|
-
if (!this.endBlobAccumulator) {
|
|
149
|
-
throw new Error('End blob accumulator not ready.');
|
|
150
|
-
}
|
|
151
|
-
this.finalBatchedBlob = await this.endBlobAccumulator.finalize(true);
|
|
152
|
-
}
|
|
153
98
|
getParentLocation(location) {
|
|
154
|
-
return this.
|
|
99
|
+
return this.blockRootOrMergeProvingOutputs.getParentLocation(location);
|
|
155
100
|
}
|
|
156
|
-
|
|
157
|
-
const [left, right] = this.
|
|
101
|
+
getBlockMergeRollupInputs(mergeLocation) {
|
|
102
|
+
const [left, right] = this.blockRootOrMergeProvingOutputs.getChildren(mergeLocation);
|
|
158
103
|
if (!left || !right) {
|
|
159
|
-
throw new Error('At
|
|
104
|
+
throw new Error('At lease one child is not ready.');
|
|
160
105
|
}
|
|
161
|
-
return new
|
|
162
|
-
|
|
163
|
-
|
|
106
|
+
return new BlockMergeRollupInputs([
|
|
107
|
+
this.#getPreviousRollupData(left),
|
|
108
|
+
this.#getPreviousRollupData(right)
|
|
164
109
|
]);
|
|
165
110
|
}
|
|
166
111
|
getRootRollupInputs() {
|
|
167
112
|
const [left, right] = this.#getChildProofsForRoot();
|
|
168
113
|
if (!left || !right) {
|
|
169
|
-
throw new Error('At
|
|
114
|
+
throw new Error('At lease one child is not ready.');
|
|
170
115
|
}
|
|
171
|
-
return
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
116
|
+
return RootRollupInputs.from({
|
|
117
|
+
previousRollupData: [
|
|
118
|
+
this.#getPreviousRollupData(left),
|
|
119
|
+
this.#getPreviousRollupData(right)
|
|
175
120
|
]
|
|
176
121
|
});
|
|
177
122
|
}
|
|
178
|
-
|
|
179
|
-
|
|
123
|
+
getPaddingBlockRootInputs() {
|
|
124
|
+
if (!this.blocks[0]?.isComplete()) {
|
|
125
|
+
throw new Error('Epoch needs one completed block in order to be padded.');
|
|
126
|
+
}
|
|
127
|
+
return this.blocks[0].getPaddingBlockRootInputs();
|
|
128
|
+
}
|
|
129
|
+
// Returns a specific transaction proving state
|
|
130
|
+
getBlockProvingStateByBlockNumber(blockNumber) {
|
|
131
|
+
return this.blocks.find((block)=>block?.blockNumber === blockNumber);
|
|
180
132
|
}
|
|
181
133
|
getEpochProofResult() {
|
|
182
|
-
|
|
183
|
-
if (!provingOutput || !this.finalBatchedBlob) {
|
|
134
|
+
if (!this.rootRollupProvingOutput || !this.finalBatchedBlob) {
|
|
184
135
|
throw new Error('Unable to get epoch proof result. Root rollup is not ready.');
|
|
185
136
|
}
|
|
186
137
|
return {
|
|
187
|
-
proof:
|
|
188
|
-
publicInputs:
|
|
138
|
+
proof: this.rootRollupProvingOutput.proof.binaryProof,
|
|
139
|
+
publicInputs: this.rootRollupProvingOutput.inputs,
|
|
189
140
|
batchedBlobInputs: this.finalBatchedBlob
|
|
190
141
|
};
|
|
191
142
|
}
|
|
192
|
-
|
|
193
|
-
return
|
|
143
|
+
isReadyForBlockMerge(location) {
|
|
144
|
+
return this.blockRootOrMergeProvingOutputs.getSibling(location) !== undefined;
|
|
194
145
|
}
|
|
195
146
|
// Returns true if we have sufficient inputs to execute the block root rollup
|
|
196
147
|
isReadyForRootRollup() {
|
|
@@ -225,9 +176,14 @@ var PROVING_STATE_LIFECYCLE = /*#__PURE__*/ function(PROVING_STATE_LIFECYCLE) {
|
|
|
225
176
|
index: 0
|
|
226
177
|
};
|
|
227
178
|
// If there's only 1 block, its block root proof will be stored at the root.
|
|
228
|
-
return this.
|
|
229
|
-
this.
|
|
230
|
-
this.
|
|
231
|
-
] : this.
|
|
179
|
+
return this.totalNumBlocks === 1 ? [
|
|
180
|
+
this.blockRootOrMergeProvingOutputs.getNode(rootLocation),
|
|
181
|
+
this.paddingBlockRootProvingOutput
|
|
182
|
+
] : this.blockRootOrMergeProvingOutputs.getChildren(rootLocation);
|
|
183
|
+
}
|
|
184
|
+
#getPreviousRollupData({ inputs, proof, verificationKey }) {
|
|
185
|
+
const leafIndex = getVKIndex(verificationKey.keyAsFields);
|
|
186
|
+
const vkData = new VkData(verificationKey, leafIndex, getVKSiblingPath(leafIndex));
|
|
187
|
+
return new PreviousRollupBlockData(inputs, proof, vkData);
|
|
232
188
|
}
|
|
233
189
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { EthAddress } from '@aztec/stdlib/block';
|
|
3
|
+
import { EthAddress, L2Block } from '@aztec/stdlib/block';
|
|
4
4
|
import type { EpochProver, ForkMerkleTreeOperations, ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
5
|
-
import type
|
|
6
|
-
import {
|
|
7
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
8
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
5
|
+
import { type AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
|
|
6
|
+
import { type BlockHeader, type GlobalVariables, type ProcessedTx, type Tx } from '@aztec/stdlib/tx';
|
|
9
7
|
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
10
|
-
import type { BlockProvingState } from './block-proving-state.js';
|
|
11
8
|
/**
|
|
12
9
|
* Implements an event driven proving scheduler to build the recursive proof tree. The idea being:
|
|
13
10
|
* 1. Transactions are provided to the scheduler post simulation.
|
|
@@ -34,33 +31,33 @@ export declare class ProvingOrchestrator implements EpochProver {
|
|
|
34
31
|
get tracer(): Tracer;
|
|
35
32
|
getProverId(): EthAddress;
|
|
36
33
|
stop(): Promise<void>;
|
|
37
|
-
startNewEpoch(epochNumber: number,
|
|
38
|
-
startNewCheckpoint(checkpointIndex: number, constants: CheckpointConstantData, l1ToL2Messages: Fr[], totalNumBlocks: number, totalNumBlobFields: number, headerOfLastBlockInPreviousCheckpoint: BlockHeader): Promise<void>;
|
|
34
|
+
startNewEpoch(epochNumber: number, firstBlockNumber: number, totalNumBlocks: number, finalBlobBatchingChallenges: FinalBlobBatchingChallenges): void;
|
|
39
35
|
/**
|
|
40
36
|
* Starts off a new block
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
*
|
|
44
|
-
* @param totalNumTxs - The total number of txs in the block
|
|
37
|
+
* @param globalVariables - The global variables for the block
|
|
38
|
+
* @param l1ToL2Messages - The l1 to l2 messages for the block
|
|
39
|
+
* @returns A proving ticket, containing a promise notifying of proving completion
|
|
45
40
|
*/
|
|
46
|
-
startNewBlock(
|
|
41
|
+
startNewBlock(globalVariables: GlobalVariables, l1ToL2Messages: Fr[], previousBlockHeader: BlockHeader): Promise<void>;
|
|
47
42
|
/**
|
|
48
43
|
* The interface to add simulated transactions to the scheduler. This can only be called once per block.
|
|
49
44
|
* @param txs - The transactions to be proven
|
|
50
45
|
*/
|
|
51
46
|
addTxs(txs: ProcessedTx[]): Promise<void>;
|
|
52
47
|
/**
|
|
53
|
-
* Kickstarts
|
|
54
|
-
* Note that if the
|
|
48
|
+
* Kickstarts tube circuits for the specified txs. These will be used during epoch proving.
|
|
49
|
+
* Note that if the tube circuits are not started this way, they will be started nontheless after processing.
|
|
55
50
|
*/
|
|
56
|
-
|
|
51
|
+
startTubeCircuits(txs: Tx[]): Promise<void>;
|
|
57
52
|
/**
|
|
58
53
|
* Marks the block as completed.
|
|
59
54
|
* Computes the block header and updates the archive tree.
|
|
60
55
|
*/
|
|
61
|
-
setBlockCompleted(blockNumber: number, expectedHeader?: BlockHeader): Promise<
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
setBlockCompleted(blockNumber: number, expectedHeader?: BlockHeader): Promise<L2Block>;
|
|
57
|
+
/** Returns the block as built for a given index. */
|
|
58
|
+
getBlock(index: number): L2Block;
|
|
59
|
+
private buildBlock;
|
|
60
|
+
protected verifyBuiltBlockAgainstSyncedState(l2Block: L2Block, newArchive: AppendOnlyTreeSnapshot): Promise<void>;
|
|
64
61
|
/**
|
|
65
62
|
* Cancel any further proving
|
|
66
63
|
*/
|
|
@@ -69,10 +66,16 @@ export declare class ProvingOrchestrator implements EpochProver {
|
|
|
69
66
|
* Returns the proof for the current epoch.
|
|
70
67
|
*/
|
|
71
68
|
finalizeEpoch(): Promise<{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
batchedBlobInputs: BatchedBlob;
|
|
69
|
+
proof: import("@aztec/stdlib/proofs").Proof;
|
|
70
|
+
publicInputs: import("@aztec/stdlib/rollup").RootRollupPublicInputs;
|
|
71
|
+
batchedBlobInputs: import("@aztec/blob-lib").BatchedBlob;
|
|
75
72
|
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Starts the proving process for the given transaction and adds it to our state
|
|
75
|
+
* @param tx - The transaction whose proving we wish to commence
|
|
76
|
+
* @param provingState - The proving state being worked on
|
|
77
|
+
*/
|
|
78
|
+
private prepareTransaction;
|
|
76
79
|
/**
|
|
77
80
|
* Enqueue a job to be scheduled
|
|
78
81
|
* @param provingState - The proving state object being operated on
|
|
@@ -80,26 +83,22 @@ export declare class ProvingOrchestrator implements EpochProver {
|
|
|
80
83
|
* @param job - The actual job, returns a promise notifying of the job's completion
|
|
81
84
|
*/
|
|
82
85
|
private deferredProving;
|
|
83
|
-
private
|
|
86
|
+
private prepareBaseParityInputs;
|
|
84
87
|
private prepareBaseRollupInputs;
|
|
85
88
|
private enqueueBaseRollup;
|
|
86
|
-
private
|
|
87
|
-
private
|
|
89
|
+
private getOrEnqueueTube;
|
|
90
|
+
private doEnqueueTube;
|
|
88
91
|
private enqueueMergeRollup;
|
|
89
92
|
private enqueueBlockRootRollup;
|
|
90
93
|
private enqueueBaseParityCircuit;
|
|
91
94
|
private checkAndEnqueueRootParityCircuit;
|
|
92
95
|
private enqueueRootParityCircuit;
|
|
93
96
|
private enqueueBlockMergeRollup;
|
|
94
|
-
private enqueueCheckpointRootRollup;
|
|
95
|
-
private enqueueCheckpointMergeRollup;
|
|
96
97
|
private enqueueEpochPadding;
|
|
97
98
|
private enqueueRootRollup;
|
|
98
99
|
private checkAndEnqueueNextMergeRollup;
|
|
99
100
|
private checkAndEnqueueBlockRootRollup;
|
|
100
101
|
private checkAndEnqueueNextBlockMergeRollup;
|
|
101
|
-
private checkAndEnqueueCheckpointRootRollup;
|
|
102
|
-
private checkAndEnqueueNextCheckpointMergeRollup;
|
|
103
102
|
private checkAndEnqueueRootRollup;
|
|
104
103
|
/**
|
|
105
104
|
* Executes the VM circuit for a public function, will enqueue the corresponding kernel if the
|
|
@@ -108,6 +107,6 @@ export declare class ProvingOrchestrator implements EpochProver {
|
|
|
108
107
|
* @param txIndex - The index of the transaction being proven
|
|
109
108
|
*/
|
|
110
109
|
private enqueueVM;
|
|
111
|
-
private
|
|
110
|
+
private checkAndEnqueueNextTxCircuit;
|
|
112
111
|
}
|
|
113
112
|
//# sourceMappingURL=orchestrator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,2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