@aztec/prover-client 0.69.0 → 0.69.1-devnet
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_builder/light.d.ts +0 -1
- package/dest/block_builder/light.d.ts.map +1 -1
- package/dest/block_builder/light.js +4 -14
- package/dest/config.d.ts +2 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +3 -2
- package/dest/mocks/test_context.d.ts +2 -2
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +6 -6
- package/dest/orchestrator/block-building-helpers.d.ts +10 -25
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +33 -44
- package/dest/orchestrator/block-proving-state.d.ts +40 -44
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +149 -85
- package/dest/orchestrator/epoch-proving-state.d.ts +23 -30
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +92 -65
- package/dest/orchestrator/orchestrator.d.ts +16 -47
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +204 -341
- package/dest/orchestrator/tx-proving-state.d.ts +10 -6
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +57 -46
- package/dest/prover-agent/memory-proving-queue.d.ts +3 -3
- package/dest/prover-agent/memory-proving-queue.d.ts.map +1 -1
- package/dest/prover-agent/memory-proving-queue.js +4 -4
- package/dest/prover-agent/prover-agent.js +4 -4
- package/dest/prover-client/prover-client.d.ts.map +1 -1
- package/dest/prover-client/prover-client.js +5 -2
- package/dest/prover-client/server-epoch-prover.d.ts +25 -0
- package/dest/prover-client/server-epoch-prover.d.ts.map +1 -0
- package/dest/prover-client/server-epoch-prover.js +40 -0
- package/dest/proving_broker/broker_prover_facade.d.ts +15 -4
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +247 -44
- package/dest/proving_broker/config.d.ts +61 -0
- package/dest/proving_broker/config.d.ts.map +1 -0
- package/dest/proving_broker/config.js +83 -0
- package/dest/proving_broker/factory.d.ts +1 -1
- package/dest/proving_broker/factory.d.ts.map +1 -1
- package/dest/proving_broker/factory.js +2 -5
- package/dest/proving_broker/fixtures.d.ts +5 -0
- package/dest/proving_broker/fixtures.d.ts.map +1 -0
- package/dest/proving_broker/fixtures.js +12 -0
- package/dest/proving_broker/index.d.ts +1 -0
- package/dest/proving_broker/index.d.ts.map +1 -1
- package/dest/proving_broker/index.js +2 -1
- package/dest/proving_broker/proving_broker.d.ts +16 -12
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +306 -273
- package/dest/proving_broker/proving_broker_database/memory.d.ts +4 -2
- package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/memory.js +17 -4
- package/dest/proving_broker/proving_broker_database/persisted.d.ts +10 -6
- package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/persisted.js +105 -13
- package/dest/proving_broker/proving_broker_database.d.ts +7 -3
- package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +4 -4
- package/dest/proving_broker/rpc.d.ts.map +1 -1
- package/dest/proving_broker/rpc.js +4 -4
- package/dest/test/mock_prover.d.ts +6 -6
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +6 -6
- package/package.json +11 -11
- package/src/block_builder/light.ts +3 -21
- package/src/config.ts +4 -4
- package/src/mocks/test_context.ts +3 -6
- package/src/orchestrator/block-building-helpers.ts +44 -118
- package/src/orchestrator/block-proving-state.ts +251 -121
- package/src/orchestrator/epoch-proving-state.ts +159 -88
- package/src/orchestrator/orchestrator.ts +251 -527
- package/src/orchestrator/tx-proving-state.ts +35 -19
- package/src/prover-agent/memory-proving-queue.ts +11 -12
- package/src/prover-agent/prover-agent.ts +4 -4
- package/src/prover-client/prover-client.ts +4 -6
- package/src/prover-client/server-epoch-prover.ts +44 -0
- package/src/proving_broker/broker_prover_facade.ts +321 -61
- package/src/proving_broker/config.ts +93 -0
- package/src/proving_broker/factory.ts +2 -5
- package/src/proving_broker/fixtures.ts +14 -0
- package/src/proving_broker/index.ts +1 -0
- package/src/proving_broker/proving_broker.ts +114 -71
- package/src/proving_broker/proving_broker_database/memory.ts +24 -4
- package/src/proving_broker/proving_broker_database/persisted.ts +141 -19
- package/src/proving_broker/proving_broker_database.ts +8 -3
- package/src/proving_broker/proving_job_controller.ts +5 -5
- package/src/proving_broker/rpc.ts +2 -3
- package/src/test/mock_prover.ts +9 -11
package/src/config.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type ACVMConfig, type BBConfig } from '@aztec/bb-prover';
|
|
2
|
+
import { type ProverConfig, proverConfigMappings } from '@aztec/circuit-types';
|
|
3
|
+
import { type ConfigMappingsType, booleanConfigHelper, getConfigFromMappings } from '@aztec/foundation/config';
|
|
4
|
+
|
|
2
5
|
import {
|
|
3
6
|
type ProverAgentConfig,
|
|
4
7
|
type ProverBrokerConfig,
|
|
5
|
-
type ProverConfig,
|
|
6
8
|
proverAgentConfigMappings,
|
|
7
9
|
proverBrokerConfigMappings,
|
|
8
|
-
|
|
9
|
-
} from '@aztec/circuit-types';
|
|
10
|
-
import { type ConfigMappingsType, booleanConfigHelper, getConfigFromMappings } from '@aztec/foundation/config';
|
|
10
|
+
} from './proving_broker/config.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The prover configuration.
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type PublicExecutionRequest,
|
|
6
6
|
type ServerCircuitProver,
|
|
7
7
|
type Tx,
|
|
8
|
-
type TxValidator,
|
|
9
8
|
} from '@aztec/circuit-types';
|
|
10
9
|
import { makeBloatedProcessedTx } from '@aztec/circuit-types/test';
|
|
11
10
|
import {
|
|
@@ -19,7 +18,7 @@ import { times } from '@aztec/foundation/collection';
|
|
|
19
18
|
import { Fr } from '@aztec/foundation/fields';
|
|
20
19
|
import { type Logger } from '@aztec/foundation/log';
|
|
21
20
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
22
|
-
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types';
|
|
21
|
+
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vks';
|
|
23
22
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
24
23
|
import {
|
|
25
24
|
PublicProcessor,
|
|
@@ -195,7 +194,7 @@ export class TestContext {
|
|
|
195
194
|
return { block, txs, msgs };
|
|
196
195
|
}
|
|
197
196
|
|
|
198
|
-
public async processPublicFunctions(txs: Tx[], maxTransactions: number
|
|
197
|
+
public async processPublicFunctions(txs: Tx[], maxTransactions: number) {
|
|
199
198
|
const defaultExecutorImplementation = (
|
|
200
199
|
_stateManager: AvmPersistableStateManager,
|
|
201
200
|
executionRequest: PublicExecutionRequest,
|
|
@@ -220,7 +219,6 @@ export class TestContext {
|
|
|
220
219
|
return await this.processPublicFunctionsWithMockExecutorImplementation(
|
|
221
220
|
txs,
|
|
222
221
|
maxTransactions,
|
|
223
|
-
txValidator,
|
|
224
222
|
defaultExecutorImplementation,
|
|
225
223
|
);
|
|
226
224
|
}
|
|
@@ -244,7 +242,6 @@ export class TestContext {
|
|
|
244
242
|
private async processPublicFunctionsWithMockExecutorImplementation(
|
|
245
243
|
txs: Tx[],
|
|
246
244
|
maxTransactions: number,
|
|
247
|
-
txValidator?: TxValidator<ProcessedTx>,
|
|
248
245
|
executorMock?: (
|
|
249
246
|
stateManager: AvmPersistableStateManager,
|
|
250
247
|
executionRequest: PublicExecutionRequest,
|
|
@@ -271,7 +268,7 @@ export class TestContext {
|
|
|
271
268
|
if (executorMock) {
|
|
272
269
|
simulateInternal.mockImplementation(executorMock);
|
|
273
270
|
}
|
|
274
|
-
return await this.publicProcessor.process(txs, maxTransactions
|
|
271
|
+
return await this.publicProcessor.process(txs, { maxTransactions });
|
|
275
272
|
}
|
|
276
273
|
}
|
|
277
274
|
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
19
19
|
MembershipWitness,
|
|
20
20
|
MerkleTreeCalculator,
|
|
21
|
-
type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
22
21
|
NOTE_HASH_SUBTREE_HEIGHT,
|
|
23
22
|
NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH,
|
|
24
23
|
NULLIFIER_SUBTREE_HEIGHT,
|
|
@@ -32,25 +31,17 @@ import {
|
|
|
32
31
|
PublicDataHint,
|
|
33
32
|
PublicDataTreeLeaf,
|
|
34
33
|
PublicDataTreeLeafPreimage,
|
|
35
|
-
type RecursiveProof,
|
|
36
34
|
StateReference,
|
|
37
|
-
VK_TREE_HEIGHT,
|
|
38
|
-
type VerificationKeyAsFields,
|
|
39
35
|
} from '@aztec/circuits.js';
|
|
40
36
|
import { type SpongeBlob } from '@aztec/circuits.js/blobs';
|
|
41
37
|
import {
|
|
42
38
|
type BaseOrMergeRollupPublicInputs,
|
|
43
|
-
BlockMergeRollupInputs,
|
|
44
39
|
type BlockRootOrBlockMergePublicInputs,
|
|
45
40
|
ConstantRollupData,
|
|
46
|
-
MergeRollupInputs,
|
|
47
|
-
PreviousRollupBlockData,
|
|
48
|
-
PreviousRollupData,
|
|
49
41
|
PrivateBaseRollupHints,
|
|
50
42
|
PrivateBaseStateDiffHints,
|
|
51
43
|
PublicBaseRollupHints,
|
|
52
44
|
PublicBaseStateDiffHints,
|
|
53
|
-
RootRollupInputs,
|
|
54
45
|
} from '@aztec/circuits.js/rollup';
|
|
55
46
|
import { makeTuple } from '@aztec/foundation/array';
|
|
56
47
|
import { Blob } from '@aztec/foundation/blob';
|
|
@@ -59,7 +50,7 @@ import { sha256Trunc } from '@aztec/foundation/crypto';
|
|
|
59
50
|
import { type Logger } from '@aztec/foundation/log';
|
|
60
51
|
import { type Tuple, assertLength, serializeToBuffer, toFriendlyJSON } from '@aztec/foundation/serialize';
|
|
61
52
|
import { computeUnbalancedMerkleRoot } from '@aztec/foundation/trees';
|
|
62
|
-
import {
|
|
53
|
+
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vks';
|
|
63
54
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
64
55
|
import { computeFeePayerBalanceLeafSlot } from '@aztec/simulator';
|
|
65
56
|
import { type MerkleTreeReadOperations } from '@aztec/world-state';
|
|
@@ -274,66 +265,51 @@ async function getPublicDataHint(db: MerkleTreeWriteOperations, leafSlot: bigint
|
|
|
274
265
|
return new PublicDataHint(new Fr(leafSlot), value, membershipWitness, leafPreimage);
|
|
275
266
|
}
|
|
276
267
|
|
|
277
|
-
export function
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
right: [
|
|
284
|
-
BaseOrMergeRollupPublicInputs,
|
|
285
|
-
RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
286
|
-
VerificationKeyAsFields,
|
|
287
|
-
],
|
|
288
|
-
) {
|
|
289
|
-
const mergeInputs = new MergeRollupInputs([
|
|
290
|
-
getPreviousRollupDataFromPublicInputs(left[0], left[1], left[2]),
|
|
291
|
-
getPreviousRollupDataFromPublicInputs(right[0], right[1], right[2]),
|
|
292
|
-
]);
|
|
293
|
-
return mergeInputs;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export function createBlockMergeRollupInputs(
|
|
297
|
-
left: [
|
|
298
|
-
BlockRootOrBlockMergePublicInputs,
|
|
299
|
-
RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
300
|
-
VerificationKeyAsFields,
|
|
301
|
-
],
|
|
302
|
-
right: [
|
|
303
|
-
BlockRootOrBlockMergePublicInputs,
|
|
304
|
-
RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
305
|
-
VerificationKeyAsFields,
|
|
306
|
-
],
|
|
307
|
-
) {
|
|
308
|
-
const mergeInputs = new BlockMergeRollupInputs([
|
|
309
|
-
getPreviousRollupBlockDataFromPublicInputs(left[0], left[1], left[2]),
|
|
310
|
-
getPreviousRollupBlockDataFromPublicInputs(right[0], right[1], right[2]),
|
|
311
|
-
]);
|
|
312
|
-
return mergeInputs;
|
|
268
|
+
export function buildBlobHints(txEffects: TxEffect[]) {
|
|
269
|
+
const blobFields = txEffects.flatMap(tx => tx.toBlobFields());
|
|
270
|
+
const blobs = Blob.getBlobs(blobFields);
|
|
271
|
+
const blobCommitments = blobs.map(b => b.commitmentToFields());
|
|
272
|
+
const blobsHash = new Fr(getBlobsHashFromBlobs(blobs));
|
|
273
|
+
return { blobFields, blobCommitments, blobs, blobsHash };
|
|
313
274
|
}
|
|
314
275
|
|
|
315
276
|
export function buildHeaderFromCircuitOutputs(
|
|
316
|
-
|
|
277
|
+
previousRollupData: BaseOrMergeRollupPublicInputs[],
|
|
317
278
|
parityPublicInputs: ParityPublicInputs,
|
|
318
279
|
rootRollupOutputs: BlockRootOrBlockMergePublicInputs,
|
|
319
|
-
|
|
280
|
+
endState: StateReference,
|
|
320
281
|
logger?: Logger,
|
|
321
282
|
) {
|
|
283
|
+
if (previousRollupData.length > 2) {
|
|
284
|
+
throw new Error(`There can't be more than 2 previous rollups. Received ${previousRollupData.length}.`);
|
|
285
|
+
}
|
|
286
|
+
|
|
322
287
|
const blobsHash = rootRollupOutputs.blobPublicInputs[0].getBlobsHash();
|
|
288
|
+
const numTxs = previousRollupData.reduce((sum, d) => sum + d.numTxs, 0);
|
|
289
|
+
const outHash =
|
|
290
|
+
previousRollupData.length === 0
|
|
291
|
+
? Fr.ZERO.toBuffer()
|
|
292
|
+
: previousRollupData.length === 1
|
|
293
|
+
? previousRollupData[0].outHash.toBuffer()
|
|
294
|
+
: sha256Trunc(
|
|
295
|
+
Buffer.concat([previousRollupData[0].outHash.toBuffer(), previousRollupData[1].outHash.toBuffer()]),
|
|
296
|
+
);
|
|
323
297
|
const contentCommitment = new ContentCommitment(
|
|
324
|
-
new Fr(
|
|
298
|
+
new Fr(numTxs),
|
|
325
299
|
blobsHash,
|
|
326
300
|
parityPublicInputs.shaRoot.toBuffer(),
|
|
327
|
-
|
|
301
|
+
outHash,
|
|
328
302
|
);
|
|
329
|
-
|
|
303
|
+
|
|
304
|
+
const accumulatedFees = previousRollupData.reduce((sum, d) => sum.add(d.accumulatedFees), Fr.ZERO);
|
|
305
|
+
const accumulatedManaUsed = previousRollupData.reduce((sum, d) => sum.add(d.accumulatedManaUsed), Fr.ZERO);
|
|
330
306
|
const header = new BlockHeader(
|
|
331
307
|
rootRollupOutputs.previousArchive,
|
|
332
308
|
contentCommitment,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
309
|
+
endState,
|
|
310
|
+
rootRollupOutputs.endGlobalVariables,
|
|
311
|
+
accumulatedFees,
|
|
312
|
+
accumulatedManaUsed,
|
|
337
313
|
);
|
|
338
314
|
if (!header.hash().equals(rootRollupOutputs.endBlockHash)) {
|
|
339
315
|
logger?.error(
|
|
@@ -363,13 +339,19 @@ export async function buildHeaderAndBodyFromTxs(
|
|
|
363
339
|
|
|
364
340
|
const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
365
341
|
|
|
366
|
-
const
|
|
367
|
-
const body = new Body(
|
|
342
|
+
const txEffects = txs.map(tx => tx.txEffect);
|
|
343
|
+
const body = new Body(txEffects);
|
|
368
344
|
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
345
|
+
const numTxs = body.txEffects.length;
|
|
346
|
+
const outHash =
|
|
347
|
+
numTxs === 0
|
|
348
|
+
? Fr.ZERO.toBuffer()
|
|
349
|
+
: numTxs === 1
|
|
350
|
+
? body.txEffects[0].txOutHash()
|
|
351
|
+
: computeUnbalancedMerkleRoot(
|
|
352
|
+
body.txEffects.map(tx => tx.txOutHash()),
|
|
353
|
+
TxEffect.empty().txOutHash(),
|
|
354
|
+
);
|
|
373
355
|
|
|
374
356
|
l1ToL2Messages = padArrayEnd(l1ToL2Messages, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
|
|
375
357
|
const hasher = (left: Buffer, right: Buffer) => sha256Trunc(Buffer.concat([left, right]));
|
|
@@ -379,12 +361,7 @@ export async function buildHeaderAndBodyFromTxs(
|
|
|
379
361
|
);
|
|
380
362
|
const blobsHash = getBlobsHashFromBlobs(Blob.getBlobs(body.toBlobFields()));
|
|
381
363
|
|
|
382
|
-
const contentCommitment = new ContentCommitment(
|
|
383
|
-
new Fr(body.numberOfTxsIncludingPadded),
|
|
384
|
-
blobsHash,
|
|
385
|
-
parityShaRoot,
|
|
386
|
-
outHash,
|
|
387
|
-
);
|
|
364
|
+
const contentCommitment = new ContentCommitment(new Fr(numTxs), blobsHash, parityShaRoot, outHash);
|
|
388
365
|
|
|
389
366
|
const fees = body.txEffects.reduce((acc, tx) => acc.add(tx.transactionFee), Fr.ZERO);
|
|
390
367
|
const manaUsed = txs.reduce((acc, tx) => acc.add(new Fr(tx.gasUsed.totalGas.l2Gas)), Fr.ZERO);
|
|
@@ -434,57 +411,6 @@ export async function getRootTreeSiblingPath<TID extends MerkleTreeId>(treeId: T
|
|
|
434
411
|
return padArrayEnd(path.toFields(), Fr.ZERO, getTreeHeight(treeId));
|
|
435
412
|
}
|
|
436
413
|
|
|
437
|
-
// Builds the inputs for the final root rollup circuit, without making any changes to trees
|
|
438
|
-
export function getRootRollupInput(
|
|
439
|
-
rollupOutputLeft: BlockRootOrBlockMergePublicInputs,
|
|
440
|
-
rollupProofLeft: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
441
|
-
verificationKeyLeft: VerificationKeyAsFields,
|
|
442
|
-
rollupOutputRight: BlockRootOrBlockMergePublicInputs,
|
|
443
|
-
rollupProofRight: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
444
|
-
verificationKeyRight: VerificationKeyAsFields,
|
|
445
|
-
proverId: Fr,
|
|
446
|
-
) {
|
|
447
|
-
const previousRollupData: RootRollupInputs['previousRollupData'] = [
|
|
448
|
-
getPreviousRollupBlockDataFromPublicInputs(rollupOutputLeft, rollupProofLeft, verificationKeyLeft),
|
|
449
|
-
getPreviousRollupBlockDataFromPublicInputs(rollupOutputRight, rollupProofRight, verificationKeyRight),
|
|
450
|
-
];
|
|
451
|
-
|
|
452
|
-
return RootRollupInputs.from({
|
|
453
|
-
previousRollupData,
|
|
454
|
-
proverId,
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
export function getPreviousRollupDataFromPublicInputs(
|
|
459
|
-
rollupOutput: BaseOrMergeRollupPublicInputs,
|
|
460
|
-
rollupProof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
461
|
-
vk: VerificationKeyAsFields,
|
|
462
|
-
) {
|
|
463
|
-
const leafIndex = getVKIndex(vk);
|
|
464
|
-
|
|
465
|
-
return new PreviousRollupData(
|
|
466
|
-
rollupOutput,
|
|
467
|
-
rollupProof,
|
|
468
|
-
vk,
|
|
469
|
-
new MembershipWitness(VK_TREE_HEIGHT, BigInt(leafIndex), getVKSiblingPath(leafIndex)),
|
|
470
|
-
);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
export function getPreviousRollupBlockDataFromPublicInputs(
|
|
474
|
-
rollupOutput: BlockRootOrBlockMergePublicInputs,
|
|
475
|
-
rollupProof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
476
|
-
vk: VerificationKeyAsFields,
|
|
477
|
-
) {
|
|
478
|
-
const leafIndex = getVKIndex(vk);
|
|
479
|
-
|
|
480
|
-
return new PreviousRollupBlockData(
|
|
481
|
-
rollupOutput,
|
|
482
|
-
rollupProof,
|
|
483
|
-
vk,
|
|
484
|
-
new MembershipWitness(VK_TREE_HEIGHT, BigInt(leafIndex), getVKSiblingPath(leafIndex)),
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
|
|
488
414
|
export async function getConstantRollupData(
|
|
489
415
|
globalVariables: GlobalVariables,
|
|
490
416
|
db: MerkleTreeReadOperations,
|