@aztec/prover-client 0.0.1-commit.b655e406 → 0.0.1-commit.c7c42ec
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/index.d.ts +1 -1
- package/dest/block-factory/light.d.ts +8 -8
- package/dest/block-factory/light.d.ts.map +1 -1
- package/dest/block-factory/light.js +37 -23
- package/dest/config.d.ts +2 -2
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +1 -1
- package/dest/index.d.ts +1 -1
- package/dest/light/index.d.ts +2 -0
- package/dest/light/index.d.ts.map +1 -0
- package/dest/light/index.js +1 -0
- package/dest/light/lightweight_checkpoint_builder.d.ts +36 -0
- package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -0
- package/dest/light/lightweight_checkpoint_builder.js +147 -0
- package/dest/mocks/fixtures.d.ts +1 -4
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +7 -17
- package/dest/mocks/test_context.d.ts +27 -46
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +105 -116
- package/dest/orchestrator/block-building-helpers.d.ts +17 -19
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +86 -111
- package/dest/orchestrator/block-proving-state.d.ts +17 -11
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +81 -20
- package/dest/orchestrator/checkpoint-proving-state.d.ts +8 -8
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +15 -16
- package/dest/orchestrator/epoch-proving-state.d.ts +9 -8
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +3 -3
- package/dest/orchestrator/index.d.ts +1 -1
- package/dest/orchestrator/orchestrator.d.ts +10 -10
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +27 -56
- package/dest/orchestrator/orchestrator_metrics.d.ts +1 -3
- package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator_metrics.js +0 -9
- package/dest/orchestrator/tx-proving-state.d.ts +2 -2
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +2 -11
- package/dest/prover-client/factory.d.ts +3 -3
- package/dest/prover-client/factory.d.ts.map +1 -1
- package/dest/prover-client/index.d.ts +1 -1
- 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/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 +2 -2
- package/dest/proving_broker/broker_prover_facade.d.ts +20 -20
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +6 -12
- package/dest/proving_broker/config.d.ts +12 -8
- package/dest/proving_broker/config.d.ts.map +1 -1
- package/dest/proving_broker/config.js +8 -2
- package/dest/proving_broker/factory.d.ts +1 -1
- package/dest/proving_broker/fixtures.d.ts +3 -2
- package/dest/proving_broker/fixtures.d.ts.map +1 -1
- package/dest/proving_broker/fixtures.js +3 -2
- package/dest/proving_broker/index.d.ts +1 -1
- package/dest/proving_broker/proof_store/factory.d.ts +2 -2
- package/dest/proving_broker/proof_store/gcs_proof_store.d.ts +1 -1
- package/dest/proving_broker/proof_store/gcs_proof_store.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/index.d.ts +1 -1
- package/dest/proving_broker/proof_store/inline_proof_store.d.ts +1 -1
- package/dest/proving_broker/proof_store/inline_proof_store.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/proof_store.d.ts +1 -1
- package/dest/proving_broker/proving_agent.d.ts +1 -1
- package/dest/proving_broker/proving_agent.d.ts.map +1 -1
- package/dest/proving_broker/proving_agent_instrumentation.d.ts +1 -1
- package/dest/proving_broker/proving_agent_instrumentation.d.ts.map +1 -1
- 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 +5 -1
- package/dest/proving_broker/proving_broker_database/memory.d.ts +3 -2
- package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/persisted.d.ts +3 -2
- package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/persisted.js +3 -2
- package/dest/proving_broker/proving_broker_database.d.ts +3 -2
- package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_instrumentation.d.ts +1 -1
- package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.d.ts +3 -2
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +2 -3
- package/dest/proving_broker/rpc.d.ts +4 -4
- package/dest/test/mock_proof_store.d.ts +3 -3
- package/dest/test/mock_proof_store.d.ts.map +1 -1
- package/dest/test/mock_prover.d.ts +3 -4
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +1 -1
- package/package.json +20 -17
- package/src/block-factory/light.ts +40 -43
- package/src/config.ts +1 -1
- package/src/light/index.ts +1 -0
- package/src/light/lightweight_checkpoint_builder.ts +198 -0
- package/src/mocks/fixtures.ts +7 -30
- package/src/mocks/test_context.ts +148 -177
- package/src/orchestrator/block-building-helpers.ts +125 -205
- package/src/orchestrator/block-proving-state.ts +103 -25
- package/src/orchestrator/checkpoint-proving-state.ts +24 -20
- package/src/orchestrator/epoch-proving-state.ts +9 -7
- package/src/orchestrator/orchestrator.ts +36 -68
- package/src/orchestrator/orchestrator_metrics.ts +1 -20
- package/src/orchestrator/tx-proving-state.ts +4 -18
- package/src/prover-client/factory.ts +6 -2
- package/src/prover-client/prover-client.ts +3 -2
- package/src/prover-client/server-epoch-prover.ts +6 -7
- package/src/proving_broker/broker_prover_facade.ts +23 -31
- package/src/proving_broker/config.ts +8 -1
- package/src/proving_broker/fixtures.ts +8 -3
- package/src/proving_broker/proving_broker.ts +5 -1
- package/src/proving_broker/proving_broker_database/memory.ts +2 -1
- package/src/proving_broker/proving_broker_database/persisted.ts +5 -4
- package/src/proving_broker/proving_broker_database.ts +2 -1
- package/src/proving_broker/proving_job_controller.ts +4 -4
- package/src/test/mock_prover.ts +1 -6
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BatchedBlobAccumulator,
|
|
3
|
+
type FinalBlobBatchingChallenges,
|
|
4
|
+
SpongeBlob,
|
|
5
|
+
encodeCheckpointBlobDataFromBlocks,
|
|
6
|
+
} from '@aztec/blob-lib';
|
|
2
7
|
import {
|
|
3
8
|
type ARCHIVE_HEIGHT,
|
|
4
|
-
|
|
9
|
+
BLOBS_PER_CHECKPOINT,
|
|
5
10
|
FIELDS_PER_BLOB,
|
|
6
11
|
type L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
|
|
7
12
|
type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
8
13
|
NUM_MSGS_PER_BASE_PARITY,
|
|
9
14
|
} from '@aztec/constants';
|
|
15
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
10
16
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
11
|
-
import { BLS12Point
|
|
17
|
+
import { BLS12Point } from '@aztec/foundation/curves/bls12';
|
|
18
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
12
19
|
import type { Tuple } from '@aztec/foundation/serialize';
|
|
13
20
|
import { type TreeNodeLocation, UnbalancedTreeStore } from '@aztec/foundation/trees';
|
|
14
|
-
import { getCheckpointBlobFields } from '@aztec/stdlib/checkpoint';
|
|
15
21
|
import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
16
22
|
import { ParityBasePrivateInputs } from '@aztec/stdlib/parity';
|
|
17
23
|
import {
|
|
@@ -44,13 +50,12 @@ export class CheckpointProvingState {
|
|
|
44
50
|
private endBlobAccumulator: BatchedBlobAccumulator | undefined;
|
|
45
51
|
private blobFields: Fr[] | undefined;
|
|
46
52
|
private error: string | undefined;
|
|
47
|
-
public readonly firstBlockNumber:
|
|
53
|
+
public readonly firstBlockNumber: BlockNumber;
|
|
48
54
|
|
|
49
55
|
constructor(
|
|
50
56
|
public readonly index: number,
|
|
51
57
|
public readonly constants: CheckpointConstantData,
|
|
52
58
|
public readonly totalNumBlocks: number,
|
|
53
|
-
private readonly totalNumBlobFields: number,
|
|
54
59
|
private readonly finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
55
60
|
private readonly headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
56
61
|
private readonly lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
|
|
@@ -71,21 +76,21 @@ export class CheckpointProvingState {
|
|
|
71
76
|
private onBlobAccumulatorSet: (checkpoint: CheckpointProvingState) => void,
|
|
72
77
|
) {
|
|
73
78
|
this.blockProofs = new UnbalancedTreeStore(totalNumBlocks);
|
|
74
|
-
this.firstBlockNumber = headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber + 1;
|
|
79
|
+
this.firstBlockNumber = BlockNumber(headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber + 1);
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
public get epochNumber(): number {
|
|
78
83
|
return this.parentEpoch.epochNumber;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
|
-
public
|
|
82
|
-
blockNumber:
|
|
86
|
+
public startNewBlock(
|
|
87
|
+
blockNumber: BlockNumber,
|
|
83
88
|
timestamp: UInt64,
|
|
84
89
|
totalNumTxs: number,
|
|
85
90
|
lastArchiveTreeSnapshot: AppendOnlyTreeSnapshot,
|
|
86
91
|
lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
|
|
87
|
-
):
|
|
88
|
-
const index = blockNumber - this.firstBlockNumber;
|
|
92
|
+
): BlockProvingState {
|
|
93
|
+
const index = Number(blockNumber) - Number(this.firstBlockNumber);
|
|
89
94
|
if (index >= this.totalNumBlocks) {
|
|
90
95
|
throw new Error(`Unable to start a new block at index ${index}. Expected at most ${this.totalNumBlocks} blocks.`);
|
|
91
96
|
}
|
|
@@ -98,8 +103,7 @@ export class CheckpointProvingState {
|
|
|
98
103
|
const lastL1ToL2MessageSubtreeRootSiblingPath =
|
|
99
104
|
index === 0 ? this.lastL1ToL2MessageSubtreeRootSiblingPath : this.newL1ToL2MessageSubtreeRootSiblingPath;
|
|
100
105
|
|
|
101
|
-
const startSpongeBlob =
|
|
102
|
-
index === 0 ? await SpongeBlob.init(this.totalNumBlobFields) : this.blocks[index - 1]?.getEndSpongeBlob();
|
|
106
|
+
const startSpongeBlob = index === 0 ? SpongeBlob.init() : this.blocks[index - 1]?.getEndSpongeBlob();
|
|
103
107
|
if (!startSpongeBlob) {
|
|
104
108
|
throw new Error(
|
|
105
109
|
'Cannot start a new block before the trees have progressed from the tx effects in the previous block.',
|
|
@@ -192,12 +196,12 @@ export class CheckpointProvingState {
|
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
public async accumulateBlobs(startBlobAccumulator: BatchedBlobAccumulator) {
|
|
195
|
-
if (this.isAcceptingBlocks() || this.blocks.some(b => b
|
|
199
|
+
if (this.isAcceptingBlocks() || this.blocks.some(b => !b?.hasEndState())) {
|
|
196
200
|
return;
|
|
197
201
|
}
|
|
198
202
|
|
|
199
|
-
this.blobFields =
|
|
200
|
-
this.endBlobAccumulator = await accumulateBlobs(this.blobFields
|
|
203
|
+
this.blobFields = encodeCheckpointBlobDataFromBlocks(this.blocks.map(b => b!.getBlockBlobData()));
|
|
204
|
+
this.endBlobAccumulator = await accumulateBlobs(this.blobFields!, startBlobAccumulator);
|
|
201
205
|
this.startBlobAccumulator = startBlobAccumulator;
|
|
202
206
|
|
|
203
207
|
this.onBlobAccumulatorSet(this);
|
|
@@ -246,8 +250,8 @@ export class CheckpointProvingState {
|
|
|
246
250
|
previousArchiveSiblingPath: this.lastArchiveSiblingPath,
|
|
247
251
|
startBlobAccumulator: this.startBlobAccumulator.toBlobAccumulator(),
|
|
248
252
|
finalBlobChallenges: this.finalBlobBatchingChallenges,
|
|
249
|
-
blobFields: padArrayEnd(blobFields, Fr.ZERO, FIELDS_PER_BLOB *
|
|
250
|
-
blobCommitments: padArrayEnd(blobCommitments, BLS12Point.ZERO,
|
|
253
|
+
blobFields: padArrayEnd(blobFields, Fr.ZERO, FIELDS_PER_BLOB * BLOBS_PER_CHECKPOINT),
|
|
254
|
+
blobCommitments: padArrayEnd(blobCommitments, BLS12Point.ZERO, BLOBS_PER_CHECKPOINT),
|
|
251
255
|
blobsHash,
|
|
252
256
|
});
|
|
253
257
|
|
|
@@ -258,8 +262,8 @@ export class CheckpointProvingState {
|
|
|
258
262
|
: new CheckpointRootRollupPrivateInputs([left, right], hints);
|
|
259
263
|
}
|
|
260
264
|
|
|
261
|
-
public getBlockProvingStateByBlockNumber(blockNumber:
|
|
262
|
-
const index = blockNumber - this.firstBlockNumber;
|
|
265
|
+
public getBlockProvingStateByBlockNumber(blockNumber: BlockNumber) {
|
|
266
|
+
const index = Number(blockNumber) - Number(this.firstBlockNumber);
|
|
263
267
|
return this.blocks[index];
|
|
264
268
|
}
|
|
265
269
|
|
|
@@ -5,7 +5,8 @@ import type {
|
|
|
5
5
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
6
6
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
7
7
|
} from '@aztec/constants';
|
|
8
|
-
import
|
|
8
|
+
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
9
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
9
10
|
import type { Tuple } from '@aztec/foundation/serialize';
|
|
10
11
|
import { type TreeNodeLocation, UnbalancedTreeStore } from '@aztec/foundation/trees';
|
|
11
12
|
import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
@@ -66,7 +67,7 @@ export class EpochProvingState {
|
|
|
66
67
|
>();
|
|
67
68
|
|
|
68
69
|
constructor(
|
|
69
|
-
public readonly epochNumber:
|
|
70
|
+
public readonly epochNumber: EpochNumber,
|
|
70
71
|
public readonly totalNumCheckpoints: number,
|
|
71
72
|
private readonly finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
72
73
|
private onCheckpointBlobAccumulatorSet: (checkpoint: CheckpointProvingState) => void,
|
|
@@ -83,7 +84,6 @@ export class EpochProvingState {
|
|
|
83
84
|
checkpointIndex: number,
|
|
84
85
|
constants: CheckpointConstantData,
|
|
85
86
|
totalNumBlocks: number,
|
|
86
|
-
totalNumBlobFields: number,
|
|
87
87
|
previousBlockHeader: BlockHeader,
|
|
88
88
|
lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
|
|
89
89
|
l1ToL2Messages: Fr[],
|
|
@@ -102,7 +102,6 @@ export class EpochProvingState {
|
|
|
102
102
|
checkpointIndex,
|
|
103
103
|
constants,
|
|
104
104
|
totalNumBlocks,
|
|
105
|
-
totalNumBlobFields,
|
|
106
105
|
this.finalBlobBatchingChallenges,
|
|
107
106
|
previousBlockHeader,
|
|
108
107
|
lastArchiveSiblingPath,
|
|
@@ -127,13 +126,16 @@ export class EpochProvingState {
|
|
|
127
126
|
return this.checkpoints[index];
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
public getCheckpointProvingStateByBlockNumber(blockNumber:
|
|
129
|
+
public getCheckpointProvingStateByBlockNumber(blockNumber: BlockNumber) {
|
|
131
130
|
return this.checkpoints.find(
|
|
132
|
-
c =>
|
|
131
|
+
c =>
|
|
132
|
+
c &&
|
|
133
|
+
Number(blockNumber) >= Number(c.firstBlockNumber) &&
|
|
134
|
+
Number(blockNumber) < Number(c.firstBlockNumber) + c.totalNumBlocks,
|
|
133
135
|
);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
public getBlockProvingStateByBlockNumber(blockNumber:
|
|
138
|
+
public getBlockProvingStateByBlockNumber(blockNumber: BlockNumber) {
|
|
137
139
|
return this.getCheckpointProvingStateByBlockNumber(blockNumber)?.getBlockProvingStateByBlockNumber(blockNumber);
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchedBlob, FinalBlobBatchingChallenges, SpongeBlob } from '@aztec/blob-lib';
|
|
1
|
+
import { BatchedBlob, FinalBlobBatchingChallenges, SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
2
|
import {
|
|
3
3
|
L1_TO_L2_MSG_SUBTREE_HEIGHT,
|
|
4
4
|
L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
|
|
@@ -6,22 +6,23 @@ import {
|
|
|
6
6
|
NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
|
|
7
7
|
NUM_BASE_PARITY_PER_ROOT_PARITY,
|
|
8
8
|
} from '@aztec/constants';
|
|
9
|
+
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
9
10
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
11
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
10
12
|
import { AbortError } from '@aztec/foundation/error';
|
|
11
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
12
13
|
import { createLogger } from '@aztec/foundation/log';
|
|
13
14
|
import { promiseWithResolvers } from '@aztec/foundation/promise';
|
|
14
15
|
import { assertLength } from '@aztec/foundation/serialize';
|
|
15
16
|
import { pushTestData } from '@aztec/foundation/testing';
|
|
16
17
|
import { elapsed } from '@aztec/foundation/timer';
|
|
17
18
|
import type { TreeNodeLocation } from '@aztec/foundation/trees';
|
|
18
|
-
import {
|
|
19
|
-
import { EthAddress, createBlockEndMarker } from '@aztec/stdlib/block';
|
|
19
|
+
import { EthAddress } from '@aztec/stdlib/block';
|
|
20
20
|
import type {
|
|
21
21
|
EpochProver,
|
|
22
22
|
ForkMerkleTreeOperations,
|
|
23
23
|
MerkleTreeWriteOperations,
|
|
24
24
|
PublicInputsAndRecursiveProof,
|
|
25
|
+
ReadonlyWorldStateAccess,
|
|
25
26
|
ServerCircuitProver,
|
|
26
27
|
} from '@aztec/stdlib/interfaces/server';
|
|
27
28
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
@@ -54,7 +55,6 @@ import {
|
|
|
54
55
|
import { inspect } from 'util';
|
|
55
56
|
|
|
56
57
|
import {
|
|
57
|
-
buildBlockHeaderFromTxs,
|
|
58
58
|
buildHeaderFromCircuitOutputs,
|
|
59
59
|
getLastSiblingPath,
|
|
60
60
|
getPublicChonkVerifierPrivateInputsFromTx,
|
|
@@ -93,10 +93,11 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
93
93
|
|
|
94
94
|
private provingPromise: Promise<ProvingResult> | undefined = undefined;
|
|
95
95
|
private metrics: ProvingOrchestratorMetrics;
|
|
96
|
-
|
|
96
|
+
// eslint-disable-next-line aztec-custom/no-non-primitive-in-collections
|
|
97
|
+
private dbs: Map<BlockNumber, MerkleTreeWriteOperations> = new Map();
|
|
97
98
|
|
|
98
99
|
constructor(
|
|
99
|
-
private dbProvider: ForkMerkleTreeOperations,
|
|
100
|
+
private dbProvider: ReadonlyWorldStateAccess & ForkMerkleTreeOperations,
|
|
100
101
|
private prover: ServerCircuitProver,
|
|
101
102
|
private readonly proverId: EthAddress,
|
|
102
103
|
telemetryClient: TelemetryClient = getTelemetryClient(),
|
|
@@ -118,7 +119,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
public startNewEpoch(
|
|
121
|
-
epochNumber:
|
|
122
|
+
epochNumber: EpochNumber,
|
|
122
123
|
totalNumCheckpoints: number,
|
|
123
124
|
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
124
125
|
) {
|
|
@@ -147,7 +148,6 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
147
148
|
constants: CheckpointConstantData,
|
|
148
149
|
l1ToL2Messages: Fr[],
|
|
149
150
|
totalNumBlocks: number,
|
|
150
|
-
totalNumBlobFields: number,
|
|
151
151
|
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
152
152
|
) {
|
|
153
153
|
if (!this.provingState) {
|
|
@@ -162,7 +162,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
162
162
|
const lastBlockNumber = headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber;
|
|
163
163
|
const db = await this.dbProvider.fork(lastBlockNumber);
|
|
164
164
|
|
|
165
|
-
const firstBlockNumber = lastBlockNumber + 1;
|
|
165
|
+
const firstBlockNumber = BlockNumber(lastBlockNumber + 1);
|
|
166
166
|
this.dbs.set(firstBlockNumber, db);
|
|
167
167
|
|
|
168
168
|
// Get archive sibling path before any block in this checkpoint lands.
|
|
@@ -180,7 +180,6 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
180
180
|
checkpointIndex,
|
|
181
181
|
constants,
|
|
182
182
|
totalNumBlocks,
|
|
183
|
-
totalNumBlobFields,
|
|
184
183
|
headerOfLastBlockInPreviousCheckpoint,
|
|
185
184
|
lastArchiveSiblingPath,
|
|
186
185
|
l1ToL2Messages,
|
|
@@ -201,7 +200,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
201
200
|
@trackSpan('ProvingOrchestrator.startNewBlock', blockNumber => ({
|
|
202
201
|
[Attributes.BLOCK_NUMBER]: blockNumber,
|
|
203
202
|
}))
|
|
204
|
-
public async startNewBlock(blockNumber:
|
|
203
|
+
public async startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number) {
|
|
205
204
|
if (!this.provingState) {
|
|
206
205
|
throw new Error('Empty epoch proving state. Call startNewEpoch before starting a block.');
|
|
207
206
|
}
|
|
@@ -216,12 +215,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
216
215
|
}
|
|
217
216
|
|
|
218
217
|
const constants = checkpointProvingState.constants;
|
|
219
|
-
logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber
|
|
218
|
+
logger.info(`Starting block ${blockNumber} for slot ${constants.slotNumber}.`);
|
|
220
219
|
|
|
221
220
|
// Fork the db only when it's not already set. The db for the first block is set in `startNewCheckpoint`.
|
|
222
221
|
if (!this.dbs.has(blockNumber)) {
|
|
223
222
|
// Fork world state at the end of the immediately previous block
|
|
224
|
-
const db = await this.dbProvider.fork(blockNumber - 1);
|
|
223
|
+
const db = await this.dbProvider.fork(BlockNumber(blockNumber - 1));
|
|
225
224
|
this.dbs.set(blockNumber, db);
|
|
226
225
|
}
|
|
227
226
|
const db = this.dbs.get(blockNumber)!;
|
|
@@ -230,7 +229,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
230
229
|
const lastArchiveTreeSnapshot = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
231
230
|
const lastArchiveSiblingPath = await getRootTreeSiblingPath(MerkleTreeId.ARCHIVE, db);
|
|
232
231
|
|
|
233
|
-
const blockProvingState =
|
|
232
|
+
const blockProvingState = checkpointProvingState.startNewBlock(
|
|
234
233
|
blockNumber,
|
|
235
234
|
timestamp,
|
|
236
235
|
totalNumTxs,
|
|
@@ -248,8 +247,12 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
248
247
|
// Because `addTxs` won't be called for a block without txs, and that's where the sponge blob state is computed.
|
|
249
248
|
// We need to set its end sponge blob here, which will become the start sponge blob for the next block.
|
|
250
249
|
if (totalNumTxs === 0) {
|
|
250
|
+
const endState = await db.getStateReference();
|
|
251
|
+
blockProvingState.setEndState(endState);
|
|
252
|
+
|
|
251
253
|
const endSpongeBlob = blockProvingState.getStartSpongeBlob().clone();
|
|
252
|
-
|
|
254
|
+
const blockEndBlobFields = blockProvingState.getBlockEndBlobFields();
|
|
255
|
+
await endSpongeBlob.absorb(blockEndBlobFields);
|
|
253
256
|
blockProvingState.setEndSpongeBlob(endSpongeBlob);
|
|
254
257
|
|
|
255
258
|
// And also try to accumulate the blobs as far as we can:
|
|
@@ -276,7 +279,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
276
279
|
return;
|
|
277
280
|
}
|
|
278
281
|
|
|
279
|
-
const blockNumber = txs[0].globalVariables.blockNumber;
|
|
282
|
+
const blockNumber = BlockNumber(txs[0].globalVariables.blockNumber);
|
|
280
283
|
const provingState = this.provingState.getBlockProvingStateByBlockNumber(blockNumber!);
|
|
281
284
|
if (!provingState) {
|
|
282
285
|
throw new Error(`Proving state for block ${blockNumber} not found. Call startNewBlock first.`);
|
|
@@ -307,7 +310,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
307
310
|
|
|
308
311
|
validateTx(tx);
|
|
309
312
|
|
|
310
|
-
logger.
|
|
313
|
+
logger.debug(`Received transaction: ${tx.hash}`);
|
|
311
314
|
|
|
312
315
|
const startSpongeBlob = spongeBlobState.clone();
|
|
313
316
|
const [hints, treeSnapshots] = await this.prepareBaseRollupInputs(
|
|
@@ -341,7 +344,11 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
341
344
|
}
|
|
342
345
|
}
|
|
343
346
|
|
|
344
|
-
await
|
|
347
|
+
const endState = await db.getStateReference();
|
|
348
|
+
provingState.setEndState(endState);
|
|
349
|
+
|
|
350
|
+
const blockEndBlobFields = provingState.getBlockEndBlobFields();
|
|
351
|
+
await spongeBlobState.absorb(blockEndBlobFields);
|
|
345
352
|
|
|
346
353
|
provingState.setEndSpongeBlob(spongeBlobState);
|
|
347
354
|
|
|
@@ -382,10 +389,10 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
382
389
|
* Marks the block as completed.
|
|
383
390
|
* Computes the block header and updates the archive tree.
|
|
384
391
|
*/
|
|
385
|
-
@trackSpan('ProvingOrchestrator.setBlockCompleted', (blockNumber:
|
|
392
|
+
@trackSpan('ProvingOrchestrator.setBlockCompleted', (blockNumber: BlockNumber) => ({
|
|
386
393
|
[Attributes.BLOCK_NUMBER]: blockNumber,
|
|
387
394
|
}))
|
|
388
|
-
public async setBlockCompleted(blockNumber:
|
|
395
|
+
public async setBlockCompleted(blockNumber: BlockNumber, expectedHeader?: BlockHeader): Promise<BlockHeader> {
|
|
389
396
|
const provingState = this.provingState?.getBlockProvingStateByBlockNumber(blockNumber);
|
|
390
397
|
if (!provingState) {
|
|
391
398
|
throw new Error(`Block proving state for ${blockNumber} not found`);
|
|
@@ -408,39 +415,25 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
408
415
|
);
|
|
409
416
|
}
|
|
410
417
|
|
|
411
|
-
//
|
|
418
|
+
// Given we've applied every change from this block, now assemble the block header:
|
|
412
419
|
logger.verbose(`Block ${blockNumber} completed. Assembling header.`);
|
|
413
|
-
const header = await
|
|
414
|
-
|
|
415
|
-
await this.verifyBuiltBlockAgainstSyncedState(provingState);
|
|
416
|
-
|
|
417
|
-
return header;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
private async buildL2BlockHeader(provingState: BlockProvingState, expectedHeader?: BlockHeader) {
|
|
421
|
-
// Collect all txs in this block to build the header. The function calling this has made sure that all txs have been added.
|
|
422
|
-
const txs = provingState.getProcessedTxs();
|
|
423
|
-
|
|
424
|
-
const startSpongeBlob = provingState.getStartSpongeBlob();
|
|
425
|
-
|
|
426
|
-
// Get db for this block
|
|
427
|
-
const db = this.dbs.get(provingState.blockNumber)!;
|
|
428
|
-
|
|
429
|
-
// Given we've applied every change from this block, now assemble the block header
|
|
430
|
-
// and update the archive tree, so we're ready to start processing the next block
|
|
431
|
-
const header = await buildBlockHeaderFromTxs(txs, provingState.getGlobalVariables(), startSpongeBlob, db);
|
|
420
|
+
const header = await provingState.buildBlockHeader();
|
|
432
421
|
|
|
433
422
|
if (expectedHeader && !header.equals(expectedHeader)) {
|
|
434
423
|
logger.error(`Block header mismatch: header=${header} expectedHeader=${expectedHeader}`);
|
|
435
424
|
throw new Error('Block header mismatch');
|
|
436
425
|
}
|
|
437
426
|
|
|
427
|
+
// Get db for this block
|
|
428
|
+
const db = this.dbs.get(provingState.blockNumber)!;
|
|
429
|
+
|
|
430
|
+
// Update the archive tree, so we're ready to start processing the next block:
|
|
438
431
|
logger.verbose(
|
|
439
432
|
`Updating archive tree with block ${provingState.blockNumber} header ${(await header.hash()).toString()}`,
|
|
440
433
|
);
|
|
441
434
|
await db.updateArchive(header);
|
|
442
435
|
|
|
443
|
-
|
|
436
|
+
await this.verifyBuiltBlockAgainstSyncedState(provingState);
|
|
444
437
|
|
|
445
438
|
return header;
|
|
446
439
|
}
|
|
@@ -1214,8 +1207,6 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1214
1207
|
|
|
1215
1208
|
const txProvingState = provingState.getTxProvingState(txIndex);
|
|
1216
1209
|
|
|
1217
|
-
// This function tries to do AVM proving. If there is a failure, it fakes the proof unless AVM_PROVING_STRICT is defined.
|
|
1218
|
-
// Nothing downstream depends on the AVM proof yet. So having this mode lets us incrementally build the AVM circuit.
|
|
1219
1210
|
const doAvmProving = wrapCallbackInSpan(
|
|
1220
1211
|
this.tracer,
|
|
1221
1212
|
'ProvingOrchestrator.prover.getAvmProof',
|
|
@@ -1224,30 +1215,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
1224
1215
|
},
|
|
1225
1216
|
async (signal: AbortSignal) => {
|
|
1226
1217
|
const inputs = txProvingState.getAvmInputs();
|
|
1227
|
-
|
|
1228
|
-
// TODO(#14234)[Unconditional PIs validation]: Remove the whole try-catch logic and
|
|
1229
|
-
// just keep the next line but removing the second argument (false).
|
|
1230
|
-
return await this.prover.getAvmProof(inputs, false, signal, provingState.epochNumber);
|
|
1231
|
-
} catch (err) {
|
|
1232
|
-
if (process.env.AVM_PROVING_STRICT) {
|
|
1233
|
-
logger.error(`Error thrown when proving AVM circuit with AVM_PROVING_STRICT on`, err);
|
|
1234
|
-
throw err;
|
|
1235
|
-
} else {
|
|
1236
|
-
logger.warn(
|
|
1237
|
-
`Error thrown when proving AVM circuit but AVM_PROVING_STRICT is off. Use snapshotted
|
|
1238
|
-
AVM inputs and carrying on. ${inspect(err)}.`,
|
|
1239
|
-
);
|
|
1240
|
-
|
|
1241
|
-
try {
|
|
1242
|
-
this.metrics.incAvmFallback();
|
|
1243
|
-
const snapshotAvmPrivateInputs = readAvmMinimalPublicTxInputsFromFile();
|
|
1244
|
-
return await this.prover.getAvmProof(snapshotAvmPrivateInputs, true, signal, provingState.epochNumber);
|
|
1245
|
-
} catch (err) {
|
|
1246
|
-
logger.error(`Error thrown when proving snapshotted AVM inputs.`, err);
|
|
1247
|
-
throw err;
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1218
|
+
return await this.prover.getAvmProof(inputs, signal, provingState.epochNumber);
|
|
1251
1219
|
},
|
|
1252
1220
|
);
|
|
1253
1221
|
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Histogram,
|
|
3
|
-
Metrics,
|
|
4
|
-
type TelemetryClient,
|
|
5
|
-
type Tracer,
|
|
6
|
-
type UpDownCounter,
|
|
7
|
-
ValueType,
|
|
8
|
-
} from '@aztec/telemetry-client';
|
|
1
|
+
import { type Histogram, Metrics, type TelemetryClient, type Tracer, ValueType } from '@aztec/telemetry-client';
|
|
9
2
|
|
|
10
3
|
export class ProvingOrchestratorMetrics {
|
|
11
4
|
public readonly tracer: Tracer;
|
|
12
5
|
|
|
13
6
|
private baseRollupInputsDuration: Histogram;
|
|
14
|
-
private avmFallbackCount: UpDownCounter;
|
|
15
7
|
|
|
16
8
|
constructor(client: TelemetryClient, name = 'ProvingOrchestrator') {
|
|
17
9
|
this.tracer = client.getTracer(name);
|
|
@@ -22,20 +14,9 @@ export class ProvingOrchestratorMetrics {
|
|
|
22
14
|
description: 'Duration to build base rollup inputs',
|
|
23
15
|
valueType: ValueType.INT,
|
|
24
16
|
});
|
|
25
|
-
|
|
26
|
-
this.avmFallbackCount = meter.createUpDownCounter(Metrics.PROVING_ORCHESTRATOR_AVM_FALLBACK_COUNT, {
|
|
27
|
-
description: 'How many times the AVM fallback was used',
|
|
28
|
-
valueType: ValueType.INT,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
this.avmFallbackCount.add(0);
|
|
32
17
|
}
|
|
33
18
|
|
|
34
19
|
recordBaseRollupInputs(durationMs: number) {
|
|
35
20
|
this.baseRollupInputsDuration.record(Math.ceil(durationMs));
|
|
36
21
|
}
|
|
37
|
-
|
|
38
|
-
incAvmFallback() {
|
|
39
|
-
this.avmFallbackCount.add(1);
|
|
40
|
-
}
|
|
41
22
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
AVM_VK_INDEX,
|
|
4
|
-
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
5
|
-
} from '@aztec/constants';
|
|
6
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
1
|
+
import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
7
3
|
import { getVkData } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
8
|
-
import { getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
9
4
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
10
5
|
import type { ProofAndVerificationKey, PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
11
|
-
import { ProofData } from '@aztec/stdlib/proofs';
|
|
6
|
+
import { ProofData, ProofDataForFixedVk } from '@aztec/stdlib/proofs';
|
|
12
7
|
import {
|
|
13
8
|
type BaseRollupHints,
|
|
14
9
|
PrivateBaseRollupHints,
|
|
@@ -20,7 +15,6 @@ import {
|
|
|
20
15
|
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
21
16
|
import type { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
|
|
22
17
|
import type { ProcessedTx } from '@aztec/stdlib/tx';
|
|
23
|
-
import { VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
24
18
|
|
|
25
19
|
import {
|
|
26
20
|
getChonkProofFromTx,
|
|
@@ -120,19 +114,11 @@ export class TxProvingState {
|
|
|
120
114
|
|
|
121
115
|
const publicChonkVerifierProofData = toProofData(this.publicChonkVerifier);
|
|
122
116
|
|
|
123
|
-
const avmProofData = new
|
|
117
|
+
const avmProofData = new ProofDataForFixedVk(
|
|
124
118
|
this.processedTx.avmProvingRequest.inputs.publicInputs,
|
|
125
119
|
this.avm.proof,
|
|
126
|
-
this.#getVkData(this.avm!.verificationKey, AVM_VK_INDEX),
|
|
127
120
|
);
|
|
128
121
|
|
|
129
122
|
return new PublicTxBaseRollupPrivateInputs(publicChonkVerifierProofData, avmProofData, this.baseRollupHints);
|
|
130
123
|
}
|
|
131
|
-
|
|
132
|
-
#getVkData(verificationKey: VerificationKeyData, vkIndex: number) {
|
|
133
|
-
// TODO(#17162): Add avm vk hash to the tree and call `getVkData('AVM')` instead.
|
|
134
|
-
// Below will return a path to an empty leaf.
|
|
135
|
-
const vkPath = getVKSiblingPath(vkIndex);
|
|
136
|
-
return new VkData(verificationKey, vkIndex, vkPath);
|
|
137
|
-
}
|
|
138
124
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ForkMerkleTreeOperations,
|
|
3
|
+
ProvingJobBroker,
|
|
4
|
+
ReadonlyWorldStateAccess,
|
|
5
|
+
} from '@aztec/stdlib/interfaces/server';
|
|
2
6
|
import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client';
|
|
3
7
|
|
|
4
8
|
import type { ProverClientConfig } from '../config.js';
|
|
@@ -6,7 +10,7 @@ import { ProverClient } from './prover-client.js';
|
|
|
6
10
|
|
|
7
11
|
export function createProverClient(
|
|
8
12
|
config: ProverClientConfig,
|
|
9
|
-
worldState: ForkMerkleTreeOperations,
|
|
13
|
+
worldState: ForkMerkleTreeOperations & ReadonlyWorldStateAccess,
|
|
10
14
|
broker: ProvingJobBroker,
|
|
11
15
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
12
16
|
) {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
type ProvingJobBroker,
|
|
12
12
|
type ProvingJobConsumer,
|
|
13
13
|
type ProvingJobProducer,
|
|
14
|
+
type ReadonlyWorldStateAccess,
|
|
14
15
|
type ServerCircuitProver,
|
|
15
16
|
tryStop,
|
|
16
17
|
} from '@aztec/stdlib/interfaces/server';
|
|
@@ -33,7 +34,7 @@ export class ProverClient implements EpochProverManager {
|
|
|
33
34
|
|
|
34
35
|
private constructor(
|
|
35
36
|
private config: ProverClientConfig,
|
|
36
|
-
private worldState: ForkMerkleTreeOperations,
|
|
37
|
+
private worldState: ForkMerkleTreeOperations & ReadonlyWorldStateAccess,
|
|
37
38
|
private orchestratorClient: ProvingJobProducer,
|
|
38
39
|
private agentClient?: ProvingJobConsumer,
|
|
39
40
|
private telemetry: TelemetryClient = getTelemetryClient(),
|
|
@@ -99,7 +100,7 @@ export class ProverClient implements EpochProverManager {
|
|
|
99
100
|
*/
|
|
100
101
|
public static async new(
|
|
101
102
|
config: ProverClientConfig,
|
|
102
|
-
worldState: ForkMerkleTreeOperations,
|
|
103
|
+
worldState: ForkMerkleTreeOperations & ReadonlyWorldStateAccess,
|
|
103
104
|
broker: ProvingJobBroker,
|
|
104
105
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
105
106
|
) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
|
-
import
|
|
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';
|
|
3
4
|
import type { EthAddress } from '@aztec/stdlib/block';
|
|
4
5
|
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
5
6
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
@@ -18,7 +19,7 @@ export class ServerEpochProver implements EpochProver {
|
|
|
18
19
|
) {}
|
|
19
20
|
|
|
20
21
|
startNewEpoch(
|
|
21
|
-
epochNumber:
|
|
22
|
+
epochNumber: EpochNumber,
|
|
22
23
|
totalNumCheckpoints: number,
|
|
23
24
|
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
24
25
|
): void {
|
|
@@ -30,7 +31,6 @@ export class ServerEpochProver implements EpochProver {
|
|
|
30
31
|
constants: CheckpointConstantData,
|
|
31
32
|
l1ToL2Messages: Fr[],
|
|
32
33
|
totalNumBlocks: number,
|
|
33
|
-
totalNumBlobFields: number,
|
|
34
34
|
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
35
35
|
): Promise<void> {
|
|
36
36
|
return this.orchestrator.startNewCheckpoint(
|
|
@@ -38,14 +38,13 @@ export class ServerEpochProver implements EpochProver {
|
|
|
38
38
|
constants,
|
|
39
39
|
l1ToL2Messages,
|
|
40
40
|
totalNumBlocks,
|
|
41
|
-
totalNumBlobFields,
|
|
42
41
|
headerOfLastBlockInPreviousCheckpoint,
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
44
|
startChonkVerifierCircuits(txs: Tx[]): Promise<void> {
|
|
46
45
|
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
47
46
|
}
|
|
48
|
-
setBlockCompleted(blockNumber:
|
|
47
|
+
setBlockCompleted(blockNumber: BlockNumber, expectedBlockHeader?: BlockHeader): Promise<BlockHeader> {
|
|
49
48
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
50
49
|
}
|
|
51
50
|
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
@@ -61,7 +60,7 @@ export class ServerEpochProver implements EpochProver {
|
|
|
61
60
|
await this.facade.stop();
|
|
62
61
|
await this.orchestrator.stop();
|
|
63
62
|
}
|
|
64
|
-
startNewBlock(blockNumber:
|
|
63
|
+
startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number): Promise<void> {
|
|
65
64
|
return this.orchestrator.startNewBlock(blockNumber, timestamp, totalNumTxs);
|
|
66
65
|
}
|
|
67
66
|
addTxs(txs: ProcessedTx[]): Promise<void> {
|