@aztec/prover-client 4.0.0-nightly.20250907 → 4.0.0-nightly.20260107

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.
Files changed (129) hide show
  1. package/dest/block-factory/index.d.ts +1 -1
  2. package/dest/block-factory/light.d.ts +5 -3
  3. package/dest/block-factory/light.d.ts.map +1 -1
  4. package/dest/block-factory/light.js +32 -11
  5. package/dest/config.d.ts +2 -2
  6. package/dest/config.d.ts.map +1 -1
  7. package/dest/config.js +2 -2
  8. package/dest/index.d.ts +1 -1
  9. package/dest/light/index.d.ts +2 -0
  10. package/dest/light/index.d.ts.map +1 -0
  11. package/dest/light/index.js +1 -0
  12. package/dest/light/lightweight_checkpoint_builder.d.ts +36 -0
  13. package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -0
  14. package/dest/light/lightweight_checkpoint_builder.js +147 -0
  15. package/dest/mocks/fixtures.d.ts +5 -5
  16. package/dest/mocks/fixtures.d.ts.map +1 -1
  17. package/dest/mocks/fixtures.js +33 -15
  18. package/dest/mocks/test_context.d.ts +38 -33
  19. package/dest/mocks/test_context.d.ts.map +1 -1
  20. package/dest/mocks/test_context.js +133 -82
  21. package/dest/orchestrator/block-building-helpers.d.ts +35 -35
  22. package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
  23. package/dest/orchestrator/block-building-helpers.js +151 -187
  24. package/dest/orchestrator/block-proving-state.d.ts +68 -55
  25. package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
  26. package/dest/orchestrator/block-proving-state.js +273 -185
  27. package/dest/orchestrator/checkpoint-proving-state.d.ts +63 -0
  28. package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -0
  29. package/dest/orchestrator/checkpoint-proving-state.js +210 -0
  30. package/dest/orchestrator/epoch-proving-state.d.ts +38 -31
  31. package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
  32. package/dest/orchestrator/epoch-proving-state.js +128 -84
  33. package/dest/orchestrator/index.d.ts +1 -1
  34. package/dest/orchestrator/orchestrator.d.ts +35 -34
  35. package/dest/orchestrator/orchestrator.d.ts.map +1 -1
  36. package/dest/orchestrator/orchestrator.js +777 -292
  37. package/dest/orchestrator/orchestrator_metrics.d.ts +1 -3
  38. package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
  39. package/dest/orchestrator/orchestrator_metrics.js +0 -9
  40. package/dest/orchestrator/tx-proving-state.d.ts +12 -10
  41. package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
  42. package/dest/orchestrator/tx-proving-state.js +23 -29
  43. package/dest/prover-client/factory.d.ts +3 -3
  44. package/dest/prover-client/factory.d.ts.map +1 -1
  45. package/dest/prover-client/index.d.ts +1 -1
  46. package/dest/prover-client/prover-client.d.ts +3 -3
  47. package/dest/prover-client/prover-client.d.ts.map +1 -1
  48. package/dest/prover-client/server-epoch-prover.d.ts +13 -11
  49. package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
  50. package/dest/prover-client/server-epoch-prover.js +9 -9
  51. package/dest/proving_broker/broker_prover_facade.d.ts +23 -18
  52. package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
  53. package/dest/proving_broker/broker_prover_facade.js +42 -33
  54. package/dest/proving_broker/config.d.ts +18 -14
  55. package/dest/proving_broker/config.d.ts.map +1 -1
  56. package/dest/proving_broker/config.js +12 -6
  57. package/dest/proving_broker/factory.d.ts +1 -1
  58. package/dest/proving_broker/factory.js +1 -1
  59. package/dest/proving_broker/fixtures.d.ts +3 -2
  60. package/dest/proving_broker/fixtures.d.ts.map +1 -1
  61. package/dest/proving_broker/fixtures.js +3 -2
  62. package/dest/proving_broker/index.d.ts +1 -1
  63. package/dest/proving_broker/proof_store/factory.d.ts +2 -2
  64. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts +1 -1
  65. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts.map +1 -1
  66. package/dest/proving_broker/proof_store/index.d.ts +2 -1
  67. package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
  68. package/dest/proving_broker/proof_store/index.js +1 -0
  69. package/dest/proving_broker/proof_store/inline_proof_store.d.ts +1 -1
  70. package/dest/proving_broker/proof_store/inline_proof_store.d.ts.map +1 -1
  71. package/dest/proving_broker/proof_store/proof_store.d.ts +1 -1
  72. package/dest/proving_broker/proving_agent.d.ts +1 -1
  73. package/dest/proving_broker/proving_agent.d.ts.map +1 -1
  74. package/dest/proving_broker/proving_agent.js +383 -8
  75. package/dest/proving_broker/proving_agent_instrumentation.d.ts +1 -1
  76. package/dest/proving_broker/proving_agent_instrumentation.d.ts.map +1 -1
  77. package/dest/proving_broker/proving_broker.d.ts +2 -2
  78. package/dest/proving_broker/proving_broker.d.ts.map +1 -1
  79. package/dest/proving_broker/proving_broker.js +418 -29
  80. package/dest/proving_broker/proving_broker_database/memory.d.ts +3 -2
  81. package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
  82. package/dest/proving_broker/proving_broker_database/persisted.d.ts +3 -2
  83. package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
  84. package/dest/proving_broker/proving_broker_database/persisted.js +8 -7
  85. package/dest/proving_broker/proving_broker_database.d.ts +3 -2
  86. package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
  87. package/dest/proving_broker/proving_broker_instrumentation.d.ts +1 -1
  88. package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
  89. package/dest/proving_broker/proving_job_controller.d.ts +3 -2
  90. package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
  91. package/dest/proving_broker/proving_job_controller.js +40 -21
  92. package/dest/proving_broker/rpc.d.ts +4 -4
  93. package/dest/test/mock_proof_store.d.ts +3 -3
  94. package/dest/test/mock_proof_store.d.ts.map +1 -1
  95. package/dest/test/mock_prover.d.ts +23 -19
  96. package/dest/test/mock_prover.d.ts.map +1 -1
  97. package/dest/test/mock_prover.js +36 -21
  98. package/package.json +21 -19
  99. package/src/block-factory/light.ts +40 -17
  100. package/src/config.ts +2 -2
  101. package/src/light/index.ts +1 -0
  102. package/src/light/lightweight_checkpoint_builder.ts +198 -0
  103. package/src/mocks/fixtures.ts +41 -36
  104. package/src/mocks/test_context.ts +196 -114
  105. package/src/orchestrator/block-building-helpers.ts +233 -313
  106. package/src/orchestrator/block-proving-state.ts +315 -247
  107. package/src/orchestrator/checkpoint-proving-state.ts +303 -0
  108. package/src/orchestrator/epoch-proving-state.ts +176 -129
  109. package/src/orchestrator/orchestrator.ts +558 -348
  110. package/src/orchestrator/orchestrator_metrics.ts +1 -20
  111. package/src/orchestrator/tx-proving-state.ts +47 -55
  112. package/src/prover-client/factory.ts +6 -2
  113. package/src/prover-client/prover-client.ts +3 -2
  114. package/src/prover-client/server-epoch-prover.ts +30 -21
  115. package/src/proving_broker/broker_prover_facade.ts +175 -112
  116. package/src/proving_broker/config.ts +14 -7
  117. package/src/proving_broker/factory.ts +1 -1
  118. package/src/proving_broker/fixtures.ts +8 -3
  119. package/src/proving_broker/proof_store/index.ts +1 -0
  120. package/src/proving_broker/proving_broker.ts +41 -19
  121. package/src/proving_broker/proving_broker_database/memory.ts +2 -1
  122. package/src/proving_broker/proving_broker_database/persisted.ts +10 -9
  123. package/src/proving_broker/proving_broker_database.ts +2 -1
  124. package/src/proving_broker/proving_job_controller.ts +42 -22
  125. package/src/test/mock_prover.ts +143 -66
  126. package/dest/bin/get-proof-inputs.d.ts +0 -2
  127. package/dest/bin/get-proof-inputs.d.ts.map +0 -1
  128. package/dest/bin/get-proof-inputs.js +0 -51
  129. package/src/bin/get-proof-inputs.ts +0 -59
@@ -1,216 +1,197 @@
1
- import { Blob } from '@aztec/blob-lib';
2
- import { ARCHIVE_HEIGHT, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, NOTE_HASH_SUBTREE_HEIGHT, NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, NULLIFIER_SUBTREE_HEIGHT, NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, NULLIFIER_TREE_HEIGHT, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
1
+ import { BatchedBlobAccumulator, computeBlobsHashFromBlobs, encodeBlockBlobData, getBlobCommitmentsFromBlobs, getBlobsPerL1Block } from '@aztec/blob-lib';
2
+ import { ARCHIVE_HEIGHT, CHONK_PROOF_LENGTH, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, NOTE_HASH_SUBTREE_HEIGHT, NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH, NULLIFIER_SUBTREE_HEIGHT, NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH, NULLIFIER_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
3
3
  import { makeTuple } from '@aztec/foundation/array';
4
+ import { BlockNumber } from '@aztec/foundation/branded-types';
4
5
  import { padArrayEnd } from '@aztec/foundation/collection';
5
- import { sha256ToField, sha256Trunc } from '@aztec/foundation/crypto';
6
- import { BLS12Point, Fr } from '@aztec/foundation/fields';
6
+ import { Fr } from '@aztec/foundation/curves/bn254';
7
7
  import { assertLength, toFriendlyJSON } from '@aztec/foundation/serialize';
8
- import { MembershipWitness, MerkleTreeCalculator, computeUnbalancedMerkleTreeRoot } from '@aztec/foundation/trees';
9
- import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
10
- import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
8
+ import { MembershipWitness } from '@aztec/foundation/trees';
9
+ import { getVkData } from '@aztec/noir-protocol-circuits-types/server/vks';
10
+ import { getVKIndex, getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
11
11
  import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
12
- import { PublicDataHint } from '@aztec/stdlib/avm';
13
12
  import { Body } from '@aztec/stdlib/block';
14
13
  import { ContractClassLogFields } from '@aztec/stdlib/logs';
15
- import { BlockConstantData, PrivateBaseRollupHints, PrivateBaseStateDiffHints, PublicBaseRollupHints } from '@aztec/stdlib/rollup';
16
- import { AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafPreimage, PublicDataTreeLeaf, PublicDataTreeLeafPreimage, getTreeHeight } from '@aztec/stdlib/trees';
17
- import { BlockHeader, ContentCommitment, PartialStateReference, StateReference } from '@aztec/stdlib/tx';
14
+ import { Proof, ProofData, RecursiveProof } from '@aztec/stdlib/proofs';
15
+ import { BlockConstantData, PrivateBaseRollupHints, PublicBaseRollupHints, PublicChonkVerifierPrivateInputs, TreeSnapshotDiffHints } from '@aztec/stdlib/rollup';
16
+ import { AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafPreimage, getTreeHeight } from '@aztec/stdlib/trees';
17
+ import { BlockHeader, GlobalVariables, PartialStateReference } from '@aztec/stdlib/tx';
18
+ import { VkData } from '@aztec/stdlib/vks';
18
19
  import { Attributes, runInSpan } from '@aztec/telemetry-client';
19
20
  // Builds the hints for base rollup. Updating the contract, nullifier, and data trees in the process.
20
- export const insertSideEffectsAndBuildBaseRollupHints = runInSpan('BlockBuilderHelpers', 'buildBaseRollupHints', async (span, tx, globalVariables, newL1ToL2MessageTreeSnapshot, db, startSpongeBlob)=>{
21
+ export const insertSideEffectsAndBuildBaseRollupHints = runInSpan('BlockBuilderHelpers', 'buildBaseRollupHints', async (span, tx, lastArchive, newL1ToL2MessageTreeSnapshot, startSpongeBlob, proverId, db)=>{
21
22
  span.setAttribute(Attributes.TX_HASH, tx.hash.toString());
22
23
  // Get trees info before any changes hit
23
- const lastArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
24
24
  const start = new PartialStateReference(await getTreeSnapshot(MerkleTreeId.NOTE_HASH_TREE, db), await getTreeSnapshot(MerkleTreeId.NULLIFIER_TREE, db), await getTreeSnapshot(MerkleTreeId.PUBLIC_DATA_TREE, db));
25
- // Get the subtree sibling paths for the circuit
26
- const noteHashSubtreeSiblingPathArray = await getSubtreeSiblingPath(MerkleTreeId.NOTE_HASH_TREE, NOTE_HASH_SUBTREE_HEIGHT, db);
27
- const noteHashSubtreeSiblingPath = makeTuple(NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, (i)=>i < noteHashSubtreeSiblingPathArray.length ? noteHashSubtreeSiblingPathArray[i] : Fr.ZERO);
28
- // Update the note hash trees with the new items being inserted to get the new roots
29
- // that will be used by the next iteration of the base rollup circuit, skipping the empty ones
30
- const noteHashes = padArrayEnd(tx.txEffect.noteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX);
31
- await db.appendLeaves(MerkleTreeId.NOTE_HASH_TREE, noteHashes);
32
- // Create data hint for reading fee payer initial balance in Fee Juice
33
- const leafSlot = await computeFeePayerBalanceLeafSlot(tx.data.feePayer);
34
- const feePayerFeeJuiceBalanceReadHint = await getPublicDataHint(db, leafSlot.toBigInt());
35
- // The read witnesses for a given TX should be generated before the writes of the same TX are applied.
36
- // All reads that refer to writes in the same tx are transient and can be simplified out.
37
- const txPublicDataUpdateRequestInfo = await processPublicDataUpdateRequests(tx, db);
38
- // Update the nullifier tree, capturing the low nullifier info for each individual operation
39
- const { lowLeavesWitnessData: nullifierWitnessLeaves, newSubtreeSiblingPath: nullifiersSubtreeSiblingPath, sortedNewLeaves: sortednullifiers, sortedNewLeavesIndexes } = await db.batchInsert(MerkleTreeId.NULLIFIER_TREE, padArrayEnd(tx.txEffect.nullifiers, Fr.ZERO, MAX_NULLIFIERS_PER_TX).map((n)=>n.toBuffer()), NULLIFIER_SUBTREE_HEIGHT);
40
- if (nullifierWitnessLeaves === undefined) {
41
- throw new Error(`Could not craft nullifier batch insertion proofs`);
42
- }
43
- // Extract witness objects from returned data
44
- const nullifierPredecessorMembershipWitnessesWithoutPadding = nullifierWitnessLeaves.map((l)=>MembershipWitness.fromBufferArray(l.index, assertLength(l.siblingPath.toBufferArray(), NULLIFIER_TREE_HEIGHT)));
45
- const nullifierSubtreeSiblingPathArray = nullifiersSubtreeSiblingPath.toFields();
46
- const nullifierSubtreeSiblingPath = makeTuple(NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, (i)=>i < nullifierSubtreeSiblingPathArray.length ? nullifierSubtreeSiblingPathArray[i] : Fr.ZERO);
47
- // Append new data to startSpongeBlob
48
- const inputSpongeBlob = startSpongeBlob.clone();
49
- await startSpongeBlob.absorb(tx.txEffect.toBlobFields());
25
+ // Get the note hash subtree root sibling path for insertion.
26
+ const noteHashSubtreeRootSiblingPath = assertLength(await getSubtreeSiblingPath(MerkleTreeId.NOTE_HASH_TREE, NOTE_HASH_SUBTREE_HEIGHT, db), NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH);
27
+ const { nullifierInsertionResult, publicDataInsertionResult } = await insertSideEffects(tx, db);
28
+ const blockHash = await tx.data.constants.anchorBlockHeader.hash();
29
+ const anchorBlockArchiveSiblingPath = (await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db)).siblingPath;
50
30
  const contractClassLogsFields = makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, (i)=>tx.txEffect.contractClassLogs[i]?.fields || ContractClassLogFields.empty());
51
31
  if (tx.avmProvingRequest) {
52
- const blockHash = await tx.data.constants.historicalHeader.hash();
53
- const archiveRootMembershipWitness = await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db);
54
32
  return PublicBaseRollupHints.from({
55
- startSpongeBlob: inputSpongeBlob,
33
+ startSpongeBlob,
56
34
  lastArchive,
57
- archiveRootMembershipWitness,
35
+ anchorBlockArchiveSiblingPath,
58
36
  contractClassLogsFields
59
37
  });
60
38
  } else {
61
- if (txPublicDataUpdateRequestInfo.lowPublicDataWritesMembershipWitnesses.length > 1 || txPublicDataUpdateRequestInfo.lowPublicDataWritesPreimages.length > 1 || txPublicDataUpdateRequestInfo.publicDataWritesSiblingPaths.length > 1) {
39
+ if (tx.txEffect.publicDataWrites.length > 1) {
62
40
  throw new Error(`More than one public data write in a private only tx`);
63
41
  }
64
- const feeWriteLowLeafPreimage = txPublicDataUpdateRequestInfo.lowPublicDataWritesPreimages[0] || PublicDataTreeLeafPreimage.empty();
65
- const feeWriteLowLeafMembershipWitness = txPublicDataUpdateRequestInfo.lowPublicDataWritesMembershipWitnesses[0] || MembershipWitness.empty(PUBLIC_DATA_TREE_HEIGHT);
66
- const feeWriteSiblingPath = txPublicDataUpdateRequestInfo.publicDataWritesSiblingPaths[0] || makeTuple(PUBLIC_DATA_TREE_HEIGHT, ()=>Fr.ZERO);
67
- const stateDiffHints = PrivateBaseStateDiffHints.from({
68
- nullifierPredecessorPreimages: makeTuple(MAX_NULLIFIERS_PER_TX, (i)=>i < nullifierWitnessLeaves.length ? nullifierWitnessLeaves[i].leafPreimage : NullifierLeafPreimage.empty()),
69
- nullifierPredecessorMembershipWitnesses: makeTuple(MAX_NULLIFIERS_PER_TX, (i)=>i < nullifierPredecessorMembershipWitnessesWithoutPadding.length ? nullifierPredecessorMembershipWitnessesWithoutPadding[i] : makeEmptyMembershipWitness(NULLIFIER_TREE_HEIGHT)),
70
- sortedNullifiers: makeTuple(MAX_NULLIFIERS_PER_TX, (i)=>Fr.fromBuffer(sortednullifiers[i])),
71
- sortedNullifierIndexes: makeTuple(MAX_NULLIFIERS_PER_TX, (i)=>sortedNewLeavesIndexes[i]),
72
- noteHashSubtreeSiblingPath,
73
- nullifierSubtreeSiblingPath,
74
- feeWriteLowLeafPreimage,
75
- feeWriteLowLeafMembershipWitness,
76
- feeWriteSiblingPath
42
+ // Get hints for reading fee payer's balance in the public data tree.
43
+ const feePayerBalanceLeafWitnessData = publicDataInsertionResult.lowLeavesWitnessData[0];
44
+ const feePayerBalanceMembershipWitness = MembershipWitness.fromBufferArray(feePayerBalanceLeafWitnessData.index, assertLength(feePayerBalanceLeafWitnessData.siblingPath.toBufferArray(), PUBLIC_DATA_TREE_HEIGHT));
45
+ const feePayerBalanceLeafPreimage = feePayerBalanceLeafWitnessData.leafPreimage;
46
+ const leafSlot = await computeFeePayerBalanceLeafSlot(tx.data.feePayer);
47
+ if (!leafSlot.equals(feePayerBalanceLeafPreimage.leaf.slot)) {
48
+ throw new Error(`Cannot find the public data tree leaf for the fee payer's balance`);
49
+ }
50
+ // Get hints for inserting the nullifiers.
51
+ const nullifierLowLeavesWitnessData = nullifierInsertionResult.lowLeavesWitnessData;
52
+ const nullifierPredecessorPreimages = padArrayEnd(nullifierLowLeavesWitnessData.map((l)=>l.leafPreimage), NullifierLeafPreimage.empty(), MAX_NULLIFIERS_PER_TX);
53
+ const nullifierPredecessorMembershipWitnesses = padArrayEnd(nullifierLowLeavesWitnessData.map((l)=>MembershipWitness.fromBufferArray(l.index, assertLength(l.siblingPath.toBufferArray(), NULLIFIER_TREE_HEIGHT))), makeEmptyMembershipWitness(NULLIFIER_TREE_HEIGHT), MAX_NULLIFIERS_PER_TX);
54
+ const sortedNullifiers = assertLength(nullifierInsertionResult.sortedNewLeaves.map((n)=>Fr.fromBuffer(n)), MAX_NULLIFIERS_PER_TX);
55
+ const sortedNullifierIndexes = assertLength(nullifierInsertionResult.sortedNewLeavesIndexes, MAX_NULLIFIERS_PER_TX);
56
+ const nullifierSubtreeRootSiblingPath = assertLength(nullifierInsertionResult.newSubtreeSiblingPath.toFields(), NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH);
57
+ const treeSnapshotDiffHints = TreeSnapshotDiffHints.from({
58
+ noteHashSubtreeRootSiblingPath,
59
+ nullifierPredecessorPreimages,
60
+ nullifierPredecessorMembershipWitnesses,
61
+ sortedNullifiers,
62
+ sortedNullifierIndexes,
63
+ nullifierSubtreeRootSiblingPath,
64
+ feePayerBalanceMembershipWitness
77
65
  });
78
- const blockHash = await tx.data.constants.historicalHeader.hash();
79
- const archiveRootMembershipWitness = await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db);
80
66
  const constants = BlockConstantData.from({
81
67
  lastArchive,
82
- newL1ToL2: newL1ToL2MessageTreeSnapshot,
83
- vkTreeRoot: getVKTreeRoot(),
84
- protocolContractTreeRoot,
85
- globalVariables
68
+ l1ToL2TreeSnapshot: newL1ToL2MessageTreeSnapshot,
69
+ vkTreeRoot: tx.data.constants.vkTreeRoot,
70
+ protocolContractsHash: tx.data.constants.protocolContractsHash,
71
+ globalVariables: tx.globalVariables,
72
+ proverId
86
73
  });
87
74
  return PrivateBaseRollupHints.from({
88
75
  start,
89
- startSpongeBlob: inputSpongeBlob,
90
- stateDiffHints,
91
- feePayerFeeJuiceBalanceReadHint,
92
- archiveRootMembershipWitness,
76
+ startSpongeBlob,
77
+ treeSnapshotDiffHints,
78
+ feePayerBalanceLeafPreimage,
79
+ anchorBlockArchiveSiblingPath,
93
80
  contractClassLogsFields,
94
81
  constants
95
82
  });
96
83
  }
97
84
  });
98
- export async function getPublicDataHint(db, leafSlot) {
99
- const { index } = await db.getPreviousValueIndex(MerkleTreeId.PUBLIC_DATA_TREE, leafSlot) ?? {};
100
- if (index === undefined) {
101
- throw new Error(`Cannot find the previous value index for public data ${leafSlot}.`);
85
+ export const insertSideEffects = runInSpan('BlockBuilderHelpers', 'buildBaseRollupHints', async (span, tx, db)=>{
86
+ span.setAttribute(Attributes.TX_HASH, tx.hash.toString());
87
+ // Insert the note hashes. Padded with zeros to the max number of note hashes per tx.
88
+ const noteHashes = padArrayEnd(tx.txEffect.noteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX);
89
+ await db.appendLeaves(MerkleTreeId.NOTE_HASH_TREE, noteHashes);
90
+ // Insert the nullifiers. Padded with zeros to the max number of nullifiers per tx.
91
+ // Capturing the low nullifier info for each individual operation.
92
+ const nullifierInsertionResult = await db.batchInsert(MerkleTreeId.NULLIFIER_TREE, padArrayEnd(tx.txEffect.nullifiers, Fr.ZERO, MAX_NULLIFIERS_PER_TX).map((n)=>n.toBuffer()), NULLIFIER_SUBTREE_HEIGHT);
93
+ if (nullifierInsertionResult.lowLeavesWitnessData === undefined) {
94
+ throw new Error(`Failed to batch insert nullifiers.`);
102
95
  }
103
- const siblingPath = await db.getSiblingPath(MerkleTreeId.PUBLIC_DATA_TREE, index);
104
- const membershipWitness = new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, index, siblingPath.toTuple());
105
- const leafPreimage = await db.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, index);
106
- if (!leafPreimage) {
107
- throw new Error(`Cannot find the leaf preimage for public data tree at index ${index}.`);
96
+ if (tx.txEffect.publicDataWrites.some((write)=>write.isEmpty())) {
97
+ throw new Error(`Empty public data write in tx: ${toFriendlyJSON(tx)}.`);
108
98
  }
109
- const exists = leafPreimage.leaf.slot.toBigInt() === leafSlot;
110
- const value = exists ? leafPreimage.leaf.value : Fr.ZERO;
111
- return new PublicDataHint(new Fr(leafSlot), value, membershipWitness, leafPreimage);
99
+ // Insert the public data writes sequentially. No need to pad them to the max array size.
100
+ // Capturing the low leaf info for each individual operation.
101
+ const publicDataInsertionResult = await db.sequentialInsert(MerkleTreeId.PUBLIC_DATA_TREE, tx.txEffect.publicDataWrites.map((write)=>write.toBuffer()));
102
+ return {
103
+ nullifierInsertionResult,
104
+ publicDataInsertionResult
105
+ };
106
+ });
107
+ export function getChonkProofFromTx(tx) {
108
+ const publicInputs = tx.data.publicInputs().toFields();
109
+ const binaryProof = new Proof(Buffer.concat(tx.chonkProof.attachPublicInputs(publicInputs).fieldsWithPublicInputs.map((field)=>field.toBuffer())), publicInputs.length);
110
+ return new RecursiveProof(tx.chonkProof.fields, binaryProof, true, CHONK_PROOF_LENGTH);
111
+ }
112
+ export function getPublicChonkVerifierPrivateInputsFromTx(tx, proverId) {
113
+ const proofData = new ProofData(tx.data.toPrivateToPublicKernelCircuitPublicInputs(), getChonkProofFromTx(tx), getVkData('HidingKernelToPublic'));
114
+ return new PublicChonkVerifierPrivateInputs(proofData, proverId);
112
115
  }
113
- export const buildBlobHints = runInSpan('BlockBuilderHelpers', 'buildBlobHints', async (_span, txEffects)=>{
114
- const blobFields = txEffects.flatMap((tx)=>tx.toBlobFields());
115
- const blobs = await Blob.getBlobsPerBlock(blobFields);
116
- // TODO(#13430): The blobsHash is confusingly similar to blobCommitmentsHash, calculated from below blobCommitments:
117
- // - blobsHash := sha256([blobhash_0, ..., blobhash_m]) = a hash of all blob hashes in a block with m+1 blobs inserted into the header, exists so a user can cross check blobs.
118
- // - blobCommitmentsHash := sha256( ...sha256(sha256(C_0), C_1) ... C_n) = iteratively calculated hash of all blob commitments in an epoch with n+1 blobs (see calculateBlobCommitmentsHash()),
119
- // exists so we can validate injected commitments to the rollup circuits correspond to the correct real blobs.
120
- // We may be able to combine these values e.g. blobCommitmentsHash := sha256( ...sha256(sha256(blobshash_0), blobshash_1) ... blobshash_l) for an epoch with l+1 blocks.
121
- const blobCommitments = blobs.map((b)=>BLS12Point.decompress(b.commitment));
122
- const blobsHash = new Fr(getBlobsHashFromBlobs(blobs));
116
+ // Build "hints" as the private inputs for the checkpoint root rollup circuit.
117
+ // The `blobCommitments` will be accumulated and checked in the root rollup against the `finalBlobChallenges`.
118
+ // The `blobsHash` will be validated on L1 against the submitted blob data.
119
+ export const buildBlobHints = (blobFields)=>{
120
+ const blobs = getBlobsPerL1Block(blobFields);
121
+ const blobCommitments = getBlobCommitmentsFromBlobs(blobs);
122
+ const blobsHash = computeBlobsHashFromBlobs(blobs);
123
123
  return {
124
- blobFields,
125
124
  blobCommitments,
126
125
  blobs,
127
126
  blobsHash
128
127
  };
129
- });
130
- export const accumulateBlobs = runInSpan('BlockBuilderHelpers', 'accumulateBlobs', async (_span, txs, startBlobAccumulator)=>{
131
- const blobFields = txs.flatMap((tx)=>tx.txEffect.toBlobFields());
132
- const blobs = await Blob.getBlobsPerBlock(blobFields);
133
- const endBlobAccumulator = startBlobAccumulator.accumulateBlobs(blobs);
128
+ };
129
+ export const buildFinalBlobChallenges = async (blobFieldsPerCheckpoint)=>{
130
+ return await BatchedBlobAccumulator.precomputeBatchedBlobChallenges(blobFieldsPerCheckpoint);
131
+ };
132
+ export const accumulateBlobs = runInSpan('BlockBuilderHelpers', 'accumulateBlobs', async (_span, blobFields, startBlobAccumulator)=>{
133
+ const endBlobAccumulator = await startBlobAccumulator.accumulateFields(blobFields);
134
134
  return endBlobAccumulator;
135
135
  });
136
- export const buildHeaderFromCircuitOutputs = runInSpan('BlockBuilderHelpers', 'buildHeaderFromCircuitOutputs', (_span, previousRollupData, parityPublicInputs, rootRollupOutputs, blobsHash, endState)=>{
137
- if (previousRollupData.length > 2) {
138
- throw new Error(`There can't be more than 2 previous rollups. Received ${previousRollupData.length}.`);
139
- }
140
- const outHash = previousRollupData.length === 0 ? Fr.ZERO : previousRollupData.length === 1 ? previousRollupData[0].outHash : sha256ToField([
141
- previousRollupData[0].outHash,
142
- previousRollupData[1].outHash
143
- ]);
144
- const contentCommitment = new ContentCommitment(blobsHash, parityPublicInputs.shaRoot, outHash);
145
- const accumulatedFees = previousRollupData.reduce((sum, d)=>sum.add(d.accumulatedFees), Fr.ZERO);
146
- const accumulatedManaUsed = previousRollupData.reduce((sum, d)=>sum.add(d.accumulatedManaUsed), Fr.ZERO);
147
- return new BlockHeader(rootRollupOutputs.previousArchive, contentCommitment, endState, rootRollupOutputs.endGlobalVariables, accumulatedFees, accumulatedManaUsed);
136
+ export const buildHeaderFromCircuitOutputs = runInSpan('BlockBuilderHelpers', 'buildHeaderFromCircuitOutputs', async (_span, blockRootRollupOutput)=>{
137
+ const constants = blockRootRollupOutput.constants;
138
+ const globalVariables = GlobalVariables.from({
139
+ chainId: constants.chainId,
140
+ version: constants.version,
141
+ blockNumber: BlockNumber(blockRootRollupOutput.previousArchive.nextAvailableLeafIndex),
142
+ timestamp: blockRootRollupOutput.timestamp,
143
+ slotNumber: constants.slotNumber,
144
+ coinbase: constants.coinbase,
145
+ feeRecipient: constants.feeRecipient,
146
+ gasFees: constants.gasFees
147
+ });
148
+ const spongeBlobHash = await blockRootRollupOutput.endSpongeBlob.clone().squeeze();
149
+ return new BlockHeader(blockRootRollupOutput.previousArchive, blockRootRollupOutput.endState, spongeBlobHash, globalVariables, blockRootRollupOutput.accumulatedFees, blockRootRollupOutput.accumulatedManaUsed);
148
150
  });
149
- export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'buildHeaderAndBodyFromTxs', async (span, txs, globalVariables, l1ToL2Messages, db)=>{
151
+ export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'buildHeaderAndBodyFromTxs', async (span, txs, lastArchive, endState, globalVariables, startSpongeBlob, isFirstBlock)=>{
150
152
  span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber);
151
- const stateReference = new StateReference(await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, db), new PartialStateReference(await getTreeSnapshot(MerkleTreeId.NOTE_HASH_TREE, db), await getTreeSnapshot(MerkleTreeId.NULLIFIER_TREE, db), await getTreeSnapshot(MerkleTreeId.PUBLIC_DATA_TREE, db)));
152
- const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
153
153
  const txEffects = txs.map((tx)=>tx.txEffect);
154
154
  const body = new Body(txEffects);
155
- const txOutHashes = txEffects.map((tx)=>tx.txOutHash());
156
- const outHash = txOutHashes.length === 0 ? Fr.ZERO : new Fr(computeUnbalancedMerkleTreeRoot(txOutHashes));
157
- const parityShaRoot = await computeInHashFromL1ToL2Messages(l1ToL2Messages);
158
- const blobsHash = getBlobsHashFromBlobs(await Blob.getBlobsPerBlock(body.toBlobFields()));
159
- const contentCommitment = new ContentCommitment(blobsHash, parityShaRoot, outHash);
160
- const fees = txEffects.reduce((acc, tx)=>acc.add(tx.transactionFee), Fr.ZERO);
161
- const manaUsed = txs.reduce((acc, tx)=>acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
162
- const header = new BlockHeader(previousArchive, contentCommitment, stateReference, globalVariables, fees, manaUsed);
155
+ const totalFees = txEffects.reduce((acc, tx)=>acc.add(tx.transactionFee), Fr.ZERO);
156
+ const totalManaUsed = txs.reduce((acc, tx)=>acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
157
+ const { l1ToL2MessageTree, partial } = endState;
158
+ const blockBlobFields = encodeBlockBlobData({
159
+ blockEndMarker: {
160
+ timestamp: globalVariables.timestamp,
161
+ blockNumber: globalVariables.blockNumber,
162
+ numTxs: txs.length
163
+ },
164
+ blockEndStateField: {
165
+ l1ToL2MessageNextAvailableLeafIndex: l1ToL2MessageTree.nextAvailableLeafIndex,
166
+ noteHashNextAvailableLeafIndex: partial.noteHashTree.nextAvailableLeafIndex,
167
+ nullifierNextAvailableLeafIndex: partial.nullifierTree.nextAvailableLeafIndex,
168
+ publicDataNextAvailableLeafIndex: partial.publicDataTree.nextAvailableLeafIndex,
169
+ totalManaUsed: totalManaUsed.toBigInt()
170
+ },
171
+ lastArchiveRoot: lastArchive.root,
172
+ noteHashRoot: partial.noteHashTree.root,
173
+ nullifierRoot: partial.nullifierTree.root,
174
+ publicDataRoot: partial.publicDataTree.root,
175
+ l1ToL2MessageRoot: isFirstBlock ? l1ToL2MessageTree.root : undefined,
176
+ txs: body.toTxBlobData()
177
+ });
178
+ const endSpongeBlob = startSpongeBlob.clone();
179
+ await endSpongeBlob.absorb(blockBlobFields);
180
+ const spongeBlobHash = await endSpongeBlob.squeeze();
181
+ const header = BlockHeader.from({
182
+ lastArchive,
183
+ state: endState,
184
+ spongeBlobHash,
185
+ globalVariables,
186
+ totalFees,
187
+ totalManaUsed
188
+ });
163
189
  return {
164
190
  header,
165
- body
191
+ body,
192
+ blockBlobFields
166
193
  };
167
194
  });
168
- /** Computes the inHash for a block's ContentCommitment given its l1 to l2 messages. */ export async function computeInHashFromL1ToL2Messages(unpaddedL1ToL2Messages) {
169
- const l1ToL2Messages = padArrayEnd(unpaddedL1ToL2Messages, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
170
- const hasher = (left, right)=>Promise.resolve(sha256Trunc(Buffer.concat([
171
- left,
172
- right
173
- ])));
174
- const parityHeight = Math.ceil(Math.log2(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP));
175
- const parityCalculator = await MerkleTreeCalculator.create(parityHeight, Fr.ZERO.toBuffer(), hasher);
176
- return new Fr(await parityCalculator.computeTreeRoot(l1ToL2Messages.map((msg)=>msg.toBuffer())));
177
- }
178
- export function getBlobsHashFromBlobs(inputs) {
179
- return sha256ToField(inputs.map((b)=>b.getEthVersionedBlobHash()));
180
- }
181
- // Note: tested against the constant values in block_root/empty_block_root_rollup_inputs.nr, set by block_building_helpers.test.ts.
182
- // Having this separate fn hopefully makes it clear how we treat empty blocks and their blobs, and won't break if we decide to change how
183
- // getBlobsPerBlock() works on empty input.
184
- export async function getEmptyBlockBlobsHash() {
185
- const blobHash = (await Blob.getBlobsPerBlock([])).map((b)=>b.getEthVersionedBlobHash());
186
- return sha256ToField(blobHash);
187
- }
188
- // Validate that the roots of all local trees match the output of the root circuit simulation
189
- // TODO: does this get called?
190
- export async function validateBlockRootOutput(blockRootOutput, blockHeader, db) {
191
- await Promise.all([
192
- validateState(blockHeader.state, db),
193
- validateSimulatedTree(await getTreeSnapshot(MerkleTreeId.ARCHIVE, db), blockRootOutput.newArchive, 'Archive')
194
- ]);
195
- }
196
- export const validateState = runInSpan('BlockBuilderHelpers', 'validateState', async (_span, state, db)=>{
197
- const promises = [
198
- MerkleTreeId.NOTE_HASH_TREE,
199
- MerkleTreeId.NULLIFIER_TREE,
200
- MerkleTreeId.PUBLIC_DATA_TREE
201
- ].map(async (id)=>{
202
- return {
203
- key: id,
204
- value: await getTreeSnapshot(id, db)
205
- };
206
- });
207
- const snapshots = new Map((await Promise.all(promises)).map((obj)=>[
208
- obj.key,
209
- obj.value
210
- ]));
211
- validatePartialState(state.partial, snapshots);
212
- validateSimulatedTree(await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, db), state.l1ToL2MessageTree, 'L1ToL2MessageTree');
213
- });
214
195
  export async function getLastSiblingPath(treeId, db) {
215
196
  const { size } = await db.getTreeInfo(treeId);
216
197
  const path = await db.getSiblingPath(treeId, size - 1n);
@@ -228,28 +209,6 @@ export async function getTreeSnapshot(id, db) {
228
209
  export function makeEmptyMembershipWitness(height) {
229
210
  return new MembershipWitness(height, 0n, makeTuple(height, ()=>Fr.ZERO));
230
211
  }
231
- const processPublicDataUpdateRequests = runInSpan('BlockBuilderHelpers', 'processPublicDataUpdateRequests', async (span, tx, db)=>{
232
- span.setAttribute(Attributes.TX_HASH, tx.hash.toString());
233
- const allPublicDataWrites = tx.txEffect.publicDataWrites.map(({ leafSlot, value })=>new PublicDataTreeLeaf(leafSlot, value));
234
- const { lowLeavesWitnessData, insertionWitnessData } = await db.sequentialInsert(MerkleTreeId.PUBLIC_DATA_TREE, allPublicDataWrites.map((write)=>{
235
- if (write.isEmpty()) {
236
- throw new Error(`Empty public data write in tx: ${toFriendlyJSON(tx)}`);
237
- }
238
- return write.toBuffer();
239
- }));
240
- const lowPublicDataWritesPreimages = lowLeavesWitnessData.map((lowLeafWitness)=>lowLeafWitness.leafPreimage);
241
- const lowPublicDataWritesMembershipWitnesses = lowLeavesWitnessData.map((lowLeafWitness)=>MembershipWitness.fromBufferArray(lowLeafWitness.index, assertLength(lowLeafWitness.siblingPath.toBufferArray(), PUBLIC_DATA_TREE_HEIGHT)));
242
- const publicDataWritesSiblingPaths = insertionWitnessData.map((w)=>{
243
- const insertionSiblingPath = w.siblingPath.toFields();
244
- assertLength(insertionSiblingPath, PUBLIC_DATA_TREE_HEIGHT);
245
- return insertionSiblingPath;
246
- });
247
- return {
248
- lowPublicDataWritesPreimages,
249
- lowPublicDataWritesMembershipWitnesses,
250
- publicDataWritesSiblingPaths
251
- };
252
- });
253
212
  export async function getSubtreeSiblingPath(treeId, subtreeHeight, db) {
254
213
  const nextAvailableLeafIndex = await db.getTreeInfo(treeId).then((t)=>t.size);
255
214
  const fullSiblingPath = await db.getSiblingPath(treeId, nextAvailableLeafIndex);
@@ -286,7 +245,7 @@ function validateSimulatedTree(localTree, simulatedTree, name, label) {
286
245
  }
287
246
  }
288
247
  export function validateTx(tx) {
289
- const txHeader = tx.data.constants.historicalHeader;
248
+ const txHeader = tx.data.constants.anchorBlockHeader;
290
249
  if (txHeader.state.l1ToL2MessageTree.isEmpty()) {
291
250
  throw new Error(`Empty L1 to L2 messages tree in tx: ${toFriendlyJSON(tx)}`);
292
251
  }
@@ -300,3 +259,8 @@ export function validateTx(tx) {
300
259
  throw new Error(`Empty public data tree in tx: ${toFriendlyJSON(tx)}`);
301
260
  }
302
261
  }
262
+ export function toProofData({ inputs, proof, verificationKey }, vkIndex) {
263
+ const leafIndex = vkIndex || getVKIndex(verificationKey.keyAsFields);
264
+ const vkData = new VkData(verificationKey, leafIndex, getVKSiblingPath(leafIndex));
265
+ return new ProofData(inputs, proof, vkData);
266
+ }
@@ -1,17 +1,21 @@
1
- import { BatchedBlobAccumulator, SpongeBlob } from '@aztec/blob-lib';
2
- import { type ARCHIVE_HEIGHT, type L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
3
- import { Fr } from '@aztec/foundation/fields';
4
- import type { Tuple } from '@aztec/foundation/serialize';
1
+ import { type BlockBlobData, type BlockEndBlobData, type SpongeBlob } from '@aztec/blob-lib';
2
+ import { type ARCHIVE_HEIGHT, type L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
3
+ import { BlockNumber } from '@aztec/foundation/branded-types';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
+ import { type Tuple } from '@aztec/foundation/serialize';
5
6
  import { type TreeNodeLocation } from '@aztec/foundation/trees';
6
- import type { EthAddress, L2Block } from '@aztec/stdlib/block';
7
7
  import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
8
- import { type ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
9
- import { type BaseOrMergeRollupPublicInputs, type BlockRootOrBlockMergePublicInputs, BlockRootRollupInputs, EmptyBlockRootRollupInputs, MergeRollupInputs, PaddingBlockRootRollupInputs, SingleTxBlockRootRollupInputs } from '@aztec/stdlib/rollup';
10
- import { AppendOnlyTreeSnapshot, type MerkleTreeId } from '@aztec/stdlib/trees';
11
- import { type BlockHeader, type GlobalVariables } from '@aztec/stdlib/tx';
12
- import type { EpochProvingState } from './epoch-proving-state.js';
8
+ import { type ParityPublicInputs, ParityRootPrivateInputs } from '@aztec/stdlib/parity';
9
+ import { BlockRollupPublicInputs, BlockRootEmptyTxFirstRollupPrivateInputs, BlockRootRollupPrivateInputs, BlockRootSingleTxRollupPrivateInputs, CheckpointConstantData, TxMergeRollupPrivateInputs, type TxRollupPublicInputs } from '@aztec/stdlib/rollup';
10
+ import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
11
+ import { BlockHeader, StateReference } from '@aztec/stdlib/tx';
12
+ import type { UInt64 } from '@aztec/stdlib/types';
13
+ import type { CheckpointProvingState } from './checkpoint-proving-state.js';
13
14
  import type { TxProvingState } from './tx-proving-state.js';
14
- export type TreeSnapshots = Map<MerkleTreeId, AppendOnlyTreeSnapshot>;
15
+ export type ProofState<T, PROOF_LENGTH extends number> = {
16
+ provingOutput?: PublicInputsAndRecursiveProof<T, PROOF_LENGTH>;
17
+ isProving?: boolean;
18
+ };
15
19
  /**
16
20
  * The current state of the proving schedule for a given block. Managed by ProvingState.
17
21
  * Contains the raw inputs and intermediate state to generate every constituent proof in the tree.
@@ -19,60 +23,68 @@ export type TreeSnapshots = Map<MerkleTreeId, AppendOnlyTreeSnapshot>;
19
23
  export declare class BlockProvingState {
20
24
  #private;
21
25
  readonly index: number;
22
- readonly globalVariables: GlobalVariables;
23
- readonly newL1ToL2Messages: Fr[];
24
- readonly l1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot;
25
- private readonly l1ToL2MessageSubtreeSiblingPath;
26
- readonly l1ToL2MessageTreeSnapshotAfterInsertion: AppendOnlyTreeSnapshot;
27
- private readonly lastArchiveSnapshot;
26
+ readonly blockNumber: BlockNumber;
27
+ readonly totalNumTxs: number;
28
+ private readonly constants;
29
+ private readonly timestamp;
30
+ readonly lastArchiveTreeSnapshot: AppendOnlyTreeSnapshot;
28
31
  private readonly lastArchiveSiblingPath;
29
- private readonly newArchiveSiblingPath;
30
- private readonly previousBlockHeader;
31
- private readonly proverId;
32
- private readonly parentEpoch;
33
- private baseOrMergeProvingOutputs;
34
- private baseParityProvingOutputs;
35
- private rootParityProvingOutput;
36
- private blockRootProvingOutput;
37
- blockRootRollupStarted: boolean;
38
- block: L2Block | undefined;
39
- spongeBlobState: SpongeBlob | undefined;
40
- startBlobAccumulator: BatchedBlobAccumulator | undefined;
41
- endBlobAccumulator: BatchedBlobAccumulator | undefined;
42
- blobsHash: Fr | undefined;
43
- totalNumTxs: number;
32
+ private readonly lastL1ToL2MessageTreeSnapshot;
33
+ private readonly lastL1ToL2MessageSubtreeRootSiblingPath;
34
+ readonly newL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot;
35
+ private readonly headerOfLastBlockInPreviousCheckpoint;
36
+ private readonly startSpongeBlob;
37
+ parentCheckpoint: CheckpointProvingState;
38
+ private baseOrMergeProofs;
39
+ private baseParityProofs;
40
+ private rootParityProof;
41
+ private blockRootProof;
42
+ private builtBlockHeader;
43
+ private endState;
44
+ private endSpongeBlob;
44
45
  private txs;
45
- error: string | undefined;
46
- constructor(index: number, globalVariables: GlobalVariables, newL1ToL2Messages: Fr[], l1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot, l1ToL2MessageSubtreeSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH>, l1ToL2MessageTreeSnapshotAfterInsertion: AppendOnlyTreeSnapshot, lastArchiveSnapshot: AppendOnlyTreeSnapshot, lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>, newArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>, previousBlockHeader: BlockHeader, proverId: EthAddress, parentEpoch: EpochProvingState);
47
- get blockNumber(): number;
48
- startNewBlock(numTxs: number, numBlobFields: number): void;
46
+ private isFirstBlock;
47
+ private error;
48
+ constructor(index: number, blockNumber: BlockNumber, totalNumTxs: number, constants: CheckpointConstantData, timestamp: UInt64, lastArchiveTreeSnapshot: AppendOnlyTreeSnapshot, lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>, lastL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot, lastL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>, newL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot, headerOfLastBlockInPreviousCheckpoint: BlockHeader, startSpongeBlob: SpongeBlob, parentCheckpoint: CheckpointProvingState);
49
+ get epochNumber(): number;
49
50
  addNewTx(tx: TxProvingState): number;
50
- setBaseRollupProof(txIndex: number, provingOutput: PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
51
- setMergeRollupProof(location: TreeNodeLocation, provingOutput: PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
51
+ isAcceptingTxs(): boolean;
52
+ getProcessedTxs(): import("@aztec/stdlib/tx").ProcessedTx[];
53
+ tryStartProvingBase(txIndex: number): boolean;
54
+ setBaseRollupProof(txIndex: number, provingOutput: PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
55
+ tryStartProvingMerge(location: TreeNodeLocation): boolean;
56
+ setMergeRollupProof(location: TreeNodeLocation, provingOutput: PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
57
+ tryStartProvingBaseParity(index: number): boolean;
52
58
  setBaseParityProof(index: number, provingOutput: PublicInputsAndRecursiveProof<ParityPublicInputs>): void;
59
+ tryStartProvingRootParity(): boolean;
53
60
  setRootParityProof(provingOutput: PublicInputsAndRecursiveProof<ParityPublicInputs>): void;
54
- setBlockRootRollupProof(provingOutput: PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
55
- setBlock(block: L2Block): void;
56
- setStartBlobAccumulator(accumulator: BatchedBlobAccumulator): void;
57
- setEndBlobAccumulator(accumulator: BatchedBlobAccumulator): void;
58
- accumulateBlobs(): Promise<void>;
59
- get allTxs(): TxProvingState[];
60
- /** Returns the block number as an epoch number. Used for prioritizing proof requests. */
61
- get epochNumber(): number;
61
+ tryStartProvingBlockRoot(): boolean;
62
+ setBlockRootRollupProof(provingOutput: PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
63
+ getBlockRootRollupOutput(): BlockRollupPublicInputs | undefined;
64
+ buildBlockHeader(): Promise<BlockHeader>;
65
+ getBuiltBlockHeader(): BlockHeader | undefined;
66
+ getStartSpongeBlob(): SpongeBlob;
67
+ setEndSpongeBlob(endSpongeBlob: SpongeBlob): void;
68
+ getEndSpongeBlob(): SpongeBlob | undefined;
69
+ setEndState(endState: StateReference): void;
70
+ hasEndState(): boolean;
71
+ getBlockEndBlobFields(): Fr[];
72
+ getBlockEndBlobData(): BlockEndBlobData;
73
+ getBlockBlobData(): BlockBlobData;
74
+ getTxEffects(): import("@aztec/stdlib/tx").TxEffect[];
62
75
  getParentLocation(location: TreeNodeLocation): TreeNodeLocation;
63
- getMergeRollupInputs(mergeLocation: TreeNodeLocation): MergeRollupInputs;
64
- getBlockRootRollupTypeAndInputs(): Promise<{
76
+ getMergeRollupInputs(mergeLocation: TreeNodeLocation): TxMergeRollupPrivateInputs;
77
+ getBlockRootRollupTypeAndInputs(): {
65
78
  rollupType: string;
66
- inputs: EmptyBlockRootRollupInputs;
79
+ inputs: BlockRootSingleTxRollupPrivateInputs;
67
80
  } | {
68
81
  rollupType: string;
69
- inputs: SingleTxBlockRootRollupInputs;
82
+ inputs: BlockRootRollupPrivateInputs;
70
83
  } | {
71
84
  rollupType: string;
72
- inputs: BlockRootRollupInputs;
73
- }>;
74
- getPaddingBlockRootInputs(): PaddingBlockRootRollupInputs;
75
- getRootParityInputs(): RootParityInputs;
85
+ inputs: BlockRootEmptyTxFirstRollupPrivateInputs;
86
+ };
87
+ getParityRootInputs(): ParityRootPrivateInputs;
76
88
  getTxProvingState(txIndex: number): TxProvingState;
77
89
  buildHeaderFromProvingOutputs(): Promise<BlockHeader>;
78
90
  isReadyForMergeRollup(location: TreeNodeLocation): boolean;
@@ -80,6 +92,7 @@ export declare class BlockProvingState {
80
92
  isReadyForRootParity(): boolean;
81
93
  isComplete(): boolean;
82
94
  verifyState(): boolean;
95
+ getError(): string | undefined;
83
96
  reject(reason: string): void;
84
97
  }
85
- //# sourceMappingURL=block-proving-state.d.ts.map
98
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2stcHJvdmluZy1zdGF0ZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL29yY2hlc3RyYXRvci9ibG9jay1wcm92aW5nLXN0YXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLGFBQWEsRUFBRSxLQUFLLGdCQUFnQixFQUFFLEtBQUssVUFBVSxFQUEwQixNQUFNLGl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