@aztec/prover-client 2.1.0-rc.9 → 3.0.0-devnet.2
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/light.d.ts +5 -3
- package/dest/block-factory/light.d.ts.map +1 -1
- package/dest/block-factory/light.js +16 -9
- package/dest/mocks/fixtures.d.ts +4 -1
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +31 -3
- package/dest/mocks/test_context.d.ts +32 -9
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +78 -22
- package/dest/orchestrator/block-building-helpers.d.ts +33 -31
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +126 -137
- package/dest/orchestrator/block-proving-state.d.ts +60 -53
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +214 -187
- package/dest/orchestrator/checkpoint-proving-state.d.ts +63 -0
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -0
- package/dest/orchestrator/checkpoint-proving-state.js +211 -0
- package/dest/orchestrator/epoch-proving-state.d.ts +34 -28
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +125 -81
- package/dest/orchestrator/orchestrator.d.ts +26 -25
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +350 -218
- package/dest/orchestrator/tx-proving-state.d.ts +11 -9
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +26 -23
- 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 +7 -7
- package/dest/proving_broker/broker_prover_facade.d.ts +20 -15
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +36 -21
- package/dest/proving_broker/config.d.ts +8 -8
- package/dest/proving_broker/config.js +4 -4
- package/dest/proving_broker/factory.js +1 -1
- package/dest/proving_broker/fixtures.js +1 -1
- package/dest/proving_broker/proof_store/index.d.ts +1 -0
- package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/index.js +1 -0
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +29 -18
- package/dest/proving_broker/proving_broker_database/persisted.js +5 -5
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +38 -18
- package/dest/test/mock_prover.d.ts +22 -17
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +35 -20
- package/package.json +16 -17
- package/src/block-factory/light.ts +35 -9
- package/src/mocks/fixtures.ts +39 -11
- package/src/mocks/test_context.ts +137 -31
- package/src/orchestrator/block-building-helpers.ts +213 -211
- package/src/orchestrator/block-proving-state.ts +235 -245
- package/src/orchestrator/checkpoint-proving-state.ts +299 -0
- package/src/orchestrator/epoch-proving-state.ts +169 -126
- package/src/orchestrator/orchestrator.ts +519 -286
- package/src/orchestrator/tx-proving-state.ts +45 -43
- package/src/prover-client/server-epoch-prover.ts +26 -16
- package/src/proving_broker/broker_prover_facade.ts +157 -88
- package/src/proving_broker/config.ts +6 -6
- package/src/proving_broker/factory.ts +1 -1
- package/src/proving_broker/fixtures.ts +1 -1
- package/src/proving_broker/proof_store/index.ts +1 -0
- package/src/proving_broker/proving_broker.ts +36 -18
- package/src/proving_broker/proving_broker_database/persisted.ts +5 -5
- package/src/proving_broker/proving_job_controller.ts +38 -18
- package/src/test/mock_prover.ts +142 -62
- package/dest/bin/get-proof-inputs.d.ts +0 -2
- package/dest/bin/get-proof-inputs.d.ts.map +0 -1
- package/dest/bin/get-proof-inputs.js +0 -51
- package/src/bin/get-proof-inputs.ts +0 -59
|
@@ -1,170 +1,190 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ARCHIVE_HEIGHT, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, NOTE_HASH_SUBTREE_HEIGHT,
|
|
1
|
+
import { BatchedBlob, SpongeBlob, computeBlobsHashFromBlobs, getBlobCommitmentsFromBlobs, getBlobsPerL1Block } from '@aztec/blob-lib';
|
|
2
|
+
import { ARCHIVE_HEIGHT, CIVC_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, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
3
3
|
import { makeTuple } from '@aztec/foundation/array';
|
|
4
4
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { sha256Trunc } from '@aztec/foundation/crypto';
|
|
6
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
7
7
|
import { assertLength, toFriendlyJSON } from '@aztec/foundation/serialize';
|
|
8
|
-
import { MembershipWitness, MerkleTreeCalculator,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { MembershipWitness, MerkleTreeCalculator, computeCompressedUnbalancedMerkleTreeRoot } 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 {
|
|
13
|
-
import {
|
|
12
|
+
import { Body, L2BlockHeader, getBlockBlobFields } from '@aztec/stdlib/block';
|
|
13
|
+
import { getCheckpointBlobFields } from '@aztec/stdlib/checkpoint';
|
|
14
14
|
import { ContractClassLogFields } from '@aztec/stdlib/logs';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { Proof, ProofData, RecursiveProof } from '@aztec/stdlib/proofs';
|
|
16
|
+
import { BlockConstantData, PrivateBaseRollupHints, PublicBaseRollupHints, PublicTubePrivateInputs, TreeSnapshotDiffHints } from '@aztec/stdlib/rollup';
|
|
17
|
+
import { AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafPreimage, PublicDataTreeLeaf, getTreeHeight } from '@aztec/stdlib/trees';
|
|
18
|
+
import { BlockHeader, ContentCommitment, GlobalVariables, PartialStateReference, StateReference } from '@aztec/stdlib/tx';
|
|
19
|
+
import { VkData } from '@aztec/stdlib/vks';
|
|
18
20
|
import { Attributes, runInSpan } from '@aztec/telemetry-client';
|
|
19
21
|
// 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,
|
|
22
|
+
export const insertSideEffectsAndBuildBaseRollupHints = runInSpan('BlockBuilderHelpers', 'buildBaseRollupHints', async (span, tx, lastArchive, newL1ToL2MessageTreeSnapshot, startSpongeBlob, proverId, db)=>{
|
|
21
23
|
span.setAttribute(Attributes.TX_HASH, tx.hash.toString());
|
|
22
24
|
// Get trees info before any changes hit
|
|
23
|
-
const lastArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
24
25
|
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
|
|
26
|
-
const
|
|
27
|
-
const noteHashSubtreeSiblingPath = makeTuple(NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, (i)=>i < noteHashSubtreeSiblingPathArray.length ? noteHashSubtreeSiblingPathArray[i] : Fr.ZERO);
|
|
26
|
+
// Get the note hash subtree root sibling path for insertion.
|
|
27
|
+
const noteHashSubtreeRootSiblingPath = assertLength(await getSubtreeSiblingPath(MerkleTreeId.NOTE_HASH_TREE, NOTE_HASH_SUBTREE_HEIGHT, db), NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH);
|
|
28
28
|
// Update the note hash trees with the new items being inserted to get the new roots
|
|
29
29
|
// that will be used by the next iteration of the base rollup circuit, skipping the empty ones
|
|
30
30
|
const noteHashes = padArrayEnd(tx.txEffect.noteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX);
|
|
31
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
32
|
// The read witnesses for a given TX should be generated before the writes of the same TX are applied.
|
|
36
33
|
// All reads that refer to writes in the same tx are transient and can be simplified out.
|
|
37
34
|
const txPublicDataUpdateRequestInfo = await processPublicDataUpdateRequests(tx, db);
|
|
38
35
|
// Update the nullifier tree, capturing the low nullifier info for each individual operation
|
|
39
|
-
const { lowLeavesWitnessData: nullifierWitnessLeaves, newSubtreeSiblingPath:
|
|
36
|
+
const { lowLeavesWitnessData: nullifierWitnessLeaves, newSubtreeSiblingPath: nullifiersSubtreeRootSiblingPath, 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
37
|
if (nullifierWitnessLeaves === undefined) {
|
|
41
38
|
throw new Error(`Could not craft nullifier batch insertion proofs`);
|
|
42
39
|
}
|
|
43
|
-
|
|
44
|
-
const
|
|
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());
|
|
40
|
+
const blockHash = await tx.data.constants.anchorBlockHeader.hash();
|
|
41
|
+
const anchorBlockArchiveSiblingPath = (await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db)).siblingPath;
|
|
50
42
|
const contractClassLogsFields = makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, (i)=>tx.txEffect.contractClassLogs[i]?.fields || ContractClassLogFields.empty());
|
|
51
43
|
if (tx.avmProvingRequest) {
|
|
52
|
-
const blockHash = await tx.data.constants.historicalHeader.hash();
|
|
53
|
-
const archiveRootMembershipWitness = await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db);
|
|
54
44
|
return PublicBaseRollupHints.from({
|
|
55
|
-
startSpongeBlob
|
|
45
|
+
startSpongeBlob,
|
|
56
46
|
lastArchive,
|
|
57
|
-
|
|
47
|
+
anchorBlockArchiveSiblingPath,
|
|
58
48
|
contractClassLogsFields
|
|
59
49
|
});
|
|
60
50
|
} else {
|
|
61
51
|
if (txPublicDataUpdateRequestInfo.lowPublicDataWritesMembershipWitnesses.length > 1 || txPublicDataUpdateRequestInfo.lowPublicDataWritesPreimages.length > 1 || txPublicDataUpdateRequestInfo.publicDataWritesSiblingPaths.length > 1) {
|
|
62
52
|
throw new Error(`More than one public data write in a private only tx`);
|
|
63
53
|
}
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
54
|
+
// Get hints for reading fee payer's balance in the public data tree.
|
|
55
|
+
const feePayerBalanceMembershipWitness = txPublicDataUpdateRequestInfo.lowPublicDataWritesMembershipWitnesses[0];
|
|
56
|
+
const feePayerBalanceLeafPreimage = txPublicDataUpdateRequestInfo.lowPublicDataWritesPreimages[0];
|
|
57
|
+
const leafSlot = await computeFeePayerBalanceLeafSlot(tx.data.feePayer);
|
|
58
|
+
if (!feePayerBalanceMembershipWitness || !leafSlot.equals(feePayerBalanceLeafPreimage?.leaf.slot)) {
|
|
59
|
+
throw new Error(`Cannot find the public data tree leaf for the fee payer's balance`);
|
|
60
|
+
}
|
|
61
|
+
// Extract witness objects from returned data
|
|
62
|
+
const nullifierPredecessorMembershipWitnessesWithoutPadding = nullifierWitnessLeaves.map((l)=>MembershipWitness.fromBufferArray(l.index, assertLength(l.siblingPath.toBufferArray(), NULLIFIER_TREE_HEIGHT)));
|
|
63
|
+
const treeSnapshotDiffHints = TreeSnapshotDiffHints.from({
|
|
64
|
+
noteHashSubtreeRootSiblingPath,
|
|
65
|
+
nullifierPredecessorPreimages: padArrayEnd(nullifierWitnessLeaves.map((l)=>l.leafPreimage), NullifierLeafPreimage.empty(), MAX_NULLIFIERS_PER_TX),
|
|
69
66
|
nullifierPredecessorMembershipWitnesses: makeTuple(MAX_NULLIFIERS_PER_TX, (i)=>i < nullifierPredecessorMembershipWitnessesWithoutPadding.length ? nullifierPredecessorMembershipWitnessesWithoutPadding[i] : makeEmptyMembershipWitness(NULLIFIER_TREE_HEIGHT)),
|
|
70
|
-
sortedNullifiers:
|
|
71
|
-
sortedNullifierIndexes:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
feeWriteLowLeafPreimage,
|
|
75
|
-
feeWriteLowLeafMembershipWitness,
|
|
76
|
-
feeWriteSiblingPath
|
|
67
|
+
sortedNullifiers: assertLength(sortedNullifiers.map((n)=>Fr.fromBuffer(n)), MAX_NULLIFIERS_PER_TX),
|
|
68
|
+
sortedNullifierIndexes: assertLength(sortedNewLeavesIndexes, MAX_NULLIFIERS_PER_TX),
|
|
69
|
+
nullifierSubtreeRootSiblingPath: assertLength(nullifiersSubtreeRootSiblingPath.toFields(), NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH),
|
|
70
|
+
feePayerBalanceMembershipWitness
|
|
77
71
|
});
|
|
78
|
-
const blockHash = await tx.data.constants.historicalHeader.hash();
|
|
79
|
-
const archiveRootMembershipWitness = await getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT, db);
|
|
80
72
|
const constants = BlockConstantData.from({
|
|
81
73
|
lastArchive,
|
|
82
|
-
|
|
83
|
-
vkTreeRoot:
|
|
84
|
-
|
|
85
|
-
globalVariables
|
|
74
|
+
l1ToL2TreeSnapshot: newL1ToL2MessageTreeSnapshot,
|
|
75
|
+
vkTreeRoot: tx.data.constants.vkTreeRoot,
|
|
76
|
+
protocolContractsHash: tx.data.constants.protocolContractsHash,
|
|
77
|
+
globalVariables: tx.globalVariables,
|
|
78
|
+
proverId
|
|
86
79
|
});
|
|
87
80
|
return PrivateBaseRollupHints.from({
|
|
88
81
|
start,
|
|
89
|
-
startSpongeBlob
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
startSpongeBlob,
|
|
83
|
+
treeSnapshotDiffHints,
|
|
84
|
+
feePayerBalanceLeafPreimage,
|
|
85
|
+
anchorBlockArchiveSiblingPath,
|
|
93
86
|
contractClassLogsFields,
|
|
94
87
|
constants
|
|
95
88
|
});
|
|
96
89
|
}
|
|
97
90
|
});
|
|
98
|
-
export
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
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}.`);
|
|
108
|
-
}
|
|
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);
|
|
91
|
+
export function getCivcProofFromTx(tx) {
|
|
92
|
+
const publicInputs = tx.data.publicInputs().toFields();
|
|
93
|
+
const binaryProof = new Proof(Buffer.concat(tx.clientIvcProof.attachPublicInputs(publicInputs).fieldsWithPublicInputs.map((field)=>field.toBuffer())), publicInputs.length);
|
|
94
|
+
return new RecursiveProof(tx.clientIvcProof.fields, binaryProof, true, CIVC_PROOF_LENGTH);
|
|
112
95
|
}
|
|
113
|
-
export
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
const
|
|
96
|
+
export function getPublicTubePrivateInputsFromTx(tx, proverId) {
|
|
97
|
+
const proofData = new ProofData(tx.data.toPrivateToPublicKernelCircuitPublicInputs(), getCivcProofFromTx(tx), getVkData('HidingKernelToPublic'));
|
|
98
|
+
return new PublicTubePrivateInputs(proofData, proverId);
|
|
99
|
+
}
|
|
100
|
+
// Build "hints" as the private inputs for the checkpoint root rollup circuit.
|
|
101
|
+
// The `blobCommitments` will be accumulated and checked in the root rollup against the `finalBlobChallenges`.
|
|
102
|
+
// The `blobsHash` will be validated on L1 against the submitted blob data.
|
|
103
|
+
export const buildBlobHints = (blobFields)=>{
|
|
104
|
+
const blobs = getBlobsPerL1Block(blobFields);
|
|
105
|
+
const blobCommitments = getBlobCommitmentsFromBlobs(blobs);
|
|
106
|
+
const blobsHash = computeBlobsHashFromBlobs(blobs);
|
|
123
107
|
return {
|
|
124
|
-
blobFields,
|
|
125
108
|
blobCommitments,
|
|
126
109
|
blobs,
|
|
127
110
|
blobsHash
|
|
128
111
|
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
112
|
+
};
|
|
113
|
+
// Build the data required to prove the txs in an epoch. Currently only used in tests. It assumes 1 block per checkpoint.
|
|
114
|
+
export const buildBlobDataFromTxs = async (txsPerCheckpoint)=>{
|
|
115
|
+
const blobFields = txsPerCheckpoint.map((txs)=>getCheckpointBlobFields([
|
|
116
|
+
txs.map((tx)=>tx.txEffect)
|
|
117
|
+
]));
|
|
118
|
+
const finalBlobChallenges = await buildFinalBlobChallenges(blobFields);
|
|
119
|
+
return {
|
|
120
|
+
blobFieldsLengths: blobFields.map((fields)=>fields.length),
|
|
121
|
+
finalBlobChallenges
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export const buildFinalBlobChallenges = async (blobFieldsPerCheckpoint)=>{
|
|
125
|
+
const blobs = blobFieldsPerCheckpoint.map((blobFields)=>getBlobsPerL1Block(blobFields));
|
|
126
|
+
return await BatchedBlob.precomputeBatchedBlobChallenges(blobs);
|
|
127
|
+
};
|
|
128
|
+
export const accumulateBlobs = runInSpan('BlockBuilderHelpers', 'accumulateBlobs', async (_span, blobFields, startBlobAccumulator)=>{
|
|
129
|
+
const blobs = getBlobsPerL1Block(blobFields);
|
|
130
|
+
const endBlobAccumulator = await startBlobAccumulator.accumulateBlobs(blobs);
|
|
134
131
|
return endBlobAccumulator;
|
|
135
132
|
});
|
|
136
|
-
export const buildHeaderFromCircuitOutputs = runInSpan('BlockBuilderHelpers', 'buildHeaderFromCircuitOutputs', (_span,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
133
|
+
export const buildHeaderFromCircuitOutputs = runInSpan('BlockBuilderHelpers', 'buildHeaderFromCircuitOutputs', async (_span, blockRootRollupOutput)=>{
|
|
134
|
+
const constants = blockRootRollupOutput.constants;
|
|
135
|
+
const globalVariables = GlobalVariables.from({
|
|
136
|
+
chainId: constants.chainId,
|
|
137
|
+
version: constants.version,
|
|
138
|
+
blockNumber: blockRootRollupOutput.previousArchive.nextAvailableLeafIndex,
|
|
139
|
+
timestamp: blockRootRollupOutput.endTimestamp,
|
|
140
|
+
slotNumber: constants.slotNumber,
|
|
141
|
+
coinbase: constants.coinbase,
|
|
142
|
+
feeRecipient: constants.feeRecipient,
|
|
143
|
+
gasFees: constants.gasFees
|
|
144
|
+
});
|
|
145
|
+
const spongeBlobHash = await blockRootRollupOutput.endSpongeBlob.clone().squeeze();
|
|
146
|
+
return new BlockHeader(blockRootRollupOutput.previousArchive, blockRootRollupOutput.endState, spongeBlobHash, globalVariables, blockRootRollupOutput.accumulatedFees, blockRootRollupOutput.accumulatedManaUsed);
|
|
148
147
|
});
|
|
149
|
-
export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'buildHeaderAndBodyFromTxs', async (span, txs, globalVariables, l1ToL2Messages, db)=>{
|
|
148
|
+
export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'buildHeaderAndBodyFromTxs', async (span, txs, globalVariables, l1ToL2Messages, db, startSpongeBlob)=>{
|
|
150
149
|
span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber);
|
|
151
150
|
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
151
|
const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
153
152
|
const txEffects = txs.map((tx)=>tx.txEffect);
|
|
154
153
|
const body = new Body(txEffects);
|
|
155
154
|
const txOutHashes = txEffects.map((tx)=>tx.txOutHash());
|
|
156
|
-
const outHash = txOutHashes.length === 0 ? Fr.ZERO : new Fr(
|
|
155
|
+
const outHash = txOutHashes.length === 0 ? Fr.ZERO : new Fr(computeCompressedUnbalancedMerkleTreeRoot(txOutHashes));
|
|
157
156
|
const parityShaRoot = await computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
158
|
-
const
|
|
157
|
+
const blockBlobFields = body.toBlobFields();
|
|
158
|
+
// TODO(#17027): This only works when there's one block per checkpoint.
|
|
159
|
+
const blobFields = [
|
|
160
|
+
new Fr(blockBlobFields.length + 1)
|
|
161
|
+
].concat(blockBlobFields);
|
|
162
|
+
const blobsHash = computeBlobsHashFromBlobs(getBlobsPerL1Block(blobFields));
|
|
159
163
|
const contentCommitment = new ContentCommitment(blobsHash, parityShaRoot, outHash);
|
|
160
164
|
const fees = txEffects.reduce((acc, tx)=>acc.add(tx.transactionFee), Fr.ZERO);
|
|
161
165
|
const manaUsed = txs.reduce((acc, tx)=>acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
|
|
162
|
-
const
|
|
166
|
+
const endSpongeBlob = startSpongeBlob?.clone() ?? await SpongeBlob.init(blobFields.length);
|
|
167
|
+
await endSpongeBlob.absorb(blockBlobFields);
|
|
168
|
+
const spongeBlobHash = await endSpongeBlob.squeeze();
|
|
169
|
+
const header = new L2BlockHeader(previousArchive, contentCommitment, stateReference, globalVariables, fees, manaUsed, spongeBlobHash);
|
|
163
170
|
return {
|
|
164
171
|
header,
|
|
165
172
|
body
|
|
166
173
|
};
|
|
167
174
|
});
|
|
175
|
+
export const buildBlockHeaderFromTxs = runInSpan('BlockBuilderHelpers', 'buildBlockHeaderFromTxs', async (span, txs, globalVariables, startSpongeBlob, db)=>{
|
|
176
|
+
span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber);
|
|
177
|
+
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)));
|
|
178
|
+
const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
179
|
+
const blobFields = getBlockBlobFields(txs.map((tx)=>tx.txEffect));
|
|
180
|
+
const endSpongeBlob = startSpongeBlob.clone();
|
|
181
|
+
await endSpongeBlob.absorb(blobFields);
|
|
182
|
+
const spongeBlobHash = await endSpongeBlob.squeeze();
|
|
183
|
+
const txEffects = txs.map((tx)=>tx.txEffect);
|
|
184
|
+
const fees = txEffects.reduce((acc, tx)=>acc.add(tx.transactionFee), Fr.ZERO);
|
|
185
|
+
const manaUsed = txs.reduce((acc, tx)=>acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
|
|
186
|
+
return new BlockHeader(previousArchive, stateReference, spongeBlobHash, globalVariables, fees, manaUsed);
|
|
187
|
+
});
|
|
168
188
|
/** Computes the inHash for a block's ContentCommitment given its l1 to l2 messages. */ export async function computeInHashFromL1ToL2Messages(unpaddedL1ToL2Messages) {
|
|
169
189
|
const l1ToL2Messages = padArrayEnd(unpaddedL1ToL2Messages, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
|
|
170
190
|
const hasher = (left, right)=>Promise.resolve(sha256Trunc(Buffer.concat([
|
|
@@ -175,42 +195,6 @@ export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'build
|
|
|
175
195
|
const parityCalculator = await MerkleTreeCalculator.create(parityHeight, Fr.ZERO.toBuffer(), hasher);
|
|
176
196
|
return new Fr(await parityCalculator.computeTreeRoot(l1ToL2Messages.map((msg)=>msg.toBuffer())));
|
|
177
197
|
}
|
|
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
198
|
export async function getLastSiblingPath(treeId, db) {
|
|
215
199
|
const { size } = await db.getTreeInfo(treeId);
|
|
216
200
|
const path = await db.getSiblingPath(treeId, size - 1n);
|
|
@@ -286,7 +270,7 @@ function validateSimulatedTree(localTree, simulatedTree, name, label) {
|
|
|
286
270
|
}
|
|
287
271
|
}
|
|
288
272
|
export function validateTx(tx) {
|
|
289
|
-
const txHeader = tx.data.constants.
|
|
273
|
+
const txHeader = tx.data.constants.anchorBlockHeader;
|
|
290
274
|
if (txHeader.state.l1ToL2MessageTree.isEmpty()) {
|
|
291
275
|
throw new Error(`Empty L1 to L2 messages tree in tx: ${toFriendlyJSON(tx)}`);
|
|
292
276
|
}
|
|
@@ -300,3 +284,8 @@ export function validateTx(tx) {
|
|
|
300
284
|
throw new Error(`Empty public data tree in tx: ${toFriendlyJSON(tx)}`);
|
|
301
285
|
}
|
|
302
286
|
}
|
|
287
|
+
export function toProofData({ inputs, proof, verificationKey }, vkIndex) {
|
|
288
|
+
const leafIndex = vkIndex || getVKIndex(verificationKey.keyAsFields);
|
|
289
|
+
const vkData = new VkData(verificationKey, leafIndex, getVKSiblingPath(leafIndex));
|
|
290
|
+
return new ProofData(inputs, proof, vkData);
|
|
291
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ARCHIVE_HEIGHT, type
|
|
1
|
+
import 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
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import type
|
|
4
|
+
import { type Tuple } from '@aztec/foundation/serialize';
|
|
5
5
|
import { type TreeNodeLocation } from '@aztec/foundation/trees';
|
|
6
|
-
import type { EthAddress, L2Block } from '@aztec/stdlib/block';
|
|
7
6
|
import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
8
|
-
import { type ParityPublicInputs,
|
|
9
|
-
import {
|
|
10
|
-
import { AppendOnlyTreeSnapshot
|
|
11
|
-
import { type BlockHeader,
|
|
12
|
-
import type {
|
|
7
|
+
import { type ParityPublicInputs, ParityRootPrivateInputs } from '@aztec/stdlib/parity';
|
|
8
|
+
import { BlockRollupPublicInputs, BlockRootEmptyTxFirstRollupPrivateInputs, BlockRootRollupPrivateInputs, BlockRootSingleTxRollupPrivateInputs, CheckpointConstantData, TxMergeRollupPrivateInputs, type TxRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
9
|
+
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
|
|
10
|
+
import { type BlockHeader, GlobalVariables } from '@aztec/stdlib/tx';
|
|
11
|
+
import type { UInt64 } from '@aztec/stdlib/types';
|
|
12
|
+
import type { CheckpointProvingState } from './checkpoint-proving-state.js';
|
|
13
13
|
import type { TxProvingState } from './tx-proving-state.js';
|
|
14
|
-
export type
|
|
14
|
+
export type ProofState<T, PROOF_LENGTH extends number> = {
|
|
15
|
+
provingOutput?: PublicInputsAndRecursiveProof<T, PROOF_LENGTH>;
|
|
16
|
+
isProving?: boolean;
|
|
17
|
+
};
|
|
15
18
|
/**
|
|
16
19
|
* The current state of the proving schedule for a given block. Managed by ProvingState.
|
|
17
20
|
* Contains the raw inputs and intermediate state to generate every constituent proof in the tree.
|
|
@@ -19,60 +22,63 @@ export type TreeSnapshots = Map<MerkleTreeId, AppendOnlyTreeSnapshot>;
|
|
|
19
22
|
export declare class BlockProvingState {
|
|
20
23
|
#private;
|
|
21
24
|
readonly index: number;
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
private readonly
|
|
26
|
-
readonly
|
|
27
|
-
private readonly lastArchiveSnapshot;
|
|
25
|
+
readonly blockNumber: number;
|
|
26
|
+
readonly totalNumTxs: number;
|
|
27
|
+
private readonly constants;
|
|
28
|
+
private readonly timestamp;
|
|
29
|
+
readonly lastArchiveTreeSnapshot: AppendOnlyTreeSnapshot;
|
|
28
30
|
private readonly lastArchiveSiblingPath;
|
|
29
|
-
private readonly
|
|
30
|
-
private readonly
|
|
31
|
-
|
|
32
|
-
private readonly
|
|
33
|
-
private
|
|
34
|
-
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
endBlobAccumulator: BatchedBlobAccumulator | undefined;
|
|
42
|
-
blobsHash: Fr | undefined;
|
|
43
|
-
totalNumTxs: number;
|
|
31
|
+
private readonly lastL1ToL2MessageTreeSnapshot;
|
|
32
|
+
private readonly lastL1ToL2MessageSubtreeRootSiblingPath;
|
|
33
|
+
readonly newL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot;
|
|
34
|
+
private readonly headerOfLastBlockInPreviousCheckpoint;
|
|
35
|
+
private readonly startSpongeBlob;
|
|
36
|
+
parentCheckpoint: CheckpointProvingState;
|
|
37
|
+
private baseOrMergeProofs;
|
|
38
|
+
private baseParityProofs;
|
|
39
|
+
private rootParityProof;
|
|
40
|
+
private blockRootProof;
|
|
41
|
+
private builtBlockHeader;
|
|
42
|
+
private endSpongeBlob;
|
|
44
43
|
private txs;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
private isFirstBlock;
|
|
45
|
+
private error;
|
|
46
|
+
constructor(index: number, blockNumber: number, 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);
|
|
47
|
+
get epochNumber(): number;
|
|
49
48
|
addNewTx(tx: TxProvingState): number;
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
isAcceptingTxs(): boolean;
|
|
50
|
+
getProcessedTxs(): import("@aztec/stdlib/tx").ProcessedTx[];
|
|
51
|
+
tryStartProvingBase(txIndex: number): boolean;
|
|
52
|
+
setBaseRollupProof(txIndex: number, provingOutput: PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
|
|
53
|
+
tryStartProvingMerge(location: TreeNodeLocation): boolean;
|
|
54
|
+
setMergeRollupProof(location: TreeNodeLocation, provingOutput: PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
|
|
55
|
+
tryStartProvingBaseParity(index: number): boolean;
|
|
52
56
|
setBaseParityProof(index: number, provingOutput: PublicInputsAndRecursiveProof<ParityPublicInputs>): void;
|
|
57
|
+
tryStartProvingRootParity(): boolean;
|
|
53
58
|
setRootParityProof(provingOutput: PublicInputsAndRecursiveProof<ParityPublicInputs>): void;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
tryStartProvingBlockRoot(): boolean;
|
|
60
|
+
setBlockRootRollupProof(provingOutput: PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
|
|
61
|
+
getBlockRootRollupOutput(): BlockRollupPublicInputs | undefined;
|
|
62
|
+
setBuiltBlockHeader(blockHeader: BlockHeader): void;
|
|
63
|
+
getBuiltBlockHeader(): BlockHeader | undefined;
|
|
64
|
+
getGlobalVariables(): GlobalVariables;
|
|
65
|
+
getStartSpongeBlob(): SpongeBlob;
|
|
66
|
+
setEndSpongeBlob(endSpongeBlob: SpongeBlob): void;
|
|
67
|
+
getEndSpongeBlob(): SpongeBlob | undefined;
|
|
68
|
+
getTxEffects(): import("@aztec/stdlib/tx").TxEffect[];
|
|
62
69
|
getParentLocation(location: TreeNodeLocation): TreeNodeLocation;
|
|
63
|
-
getMergeRollupInputs(mergeLocation: TreeNodeLocation):
|
|
64
|
-
getBlockRootRollupTypeAndInputs():
|
|
70
|
+
getMergeRollupInputs(mergeLocation: TreeNodeLocation): TxMergeRollupPrivateInputs;
|
|
71
|
+
getBlockRootRollupTypeAndInputs(): {
|
|
65
72
|
rollupType: string;
|
|
66
|
-
inputs:
|
|
73
|
+
inputs: BlockRootEmptyTxFirstRollupPrivateInputs;
|
|
67
74
|
} | {
|
|
68
75
|
rollupType: string;
|
|
69
|
-
inputs:
|
|
76
|
+
inputs: BlockRootSingleTxRollupPrivateInputs;
|
|
70
77
|
} | {
|
|
71
78
|
rollupType: string;
|
|
72
|
-
inputs:
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
getRootParityInputs(): RootParityInputs;
|
|
79
|
+
inputs: BlockRootRollupPrivateInputs;
|
|
80
|
+
};
|
|
81
|
+
getParityRootInputs(): ParityRootPrivateInputs;
|
|
76
82
|
getTxProvingState(txIndex: number): TxProvingState;
|
|
77
83
|
buildHeaderFromProvingOutputs(): Promise<BlockHeader>;
|
|
78
84
|
isReadyForMergeRollup(location: TreeNodeLocation): boolean;
|
|
@@ -80,6 +86,7 @@ export declare class BlockProvingState {
|
|
|
80
86
|
isReadyForRootParity(): boolean;
|
|
81
87
|
isComplete(): boolean;
|
|
82
88
|
verifyState(): boolean;
|
|
89
|
+
getError(): string | undefined;
|
|
83
90
|
reject(reason: string): void;
|
|
84
91
|
}
|
|
85
92
|
//# sourceMappingURL=block-proving-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-proving-state.d.ts","sourceRoot":"","sources":["../../src/orchestrator/block-proving-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"block-proving-state.d.ts","sourceRoot":"","sources":["../../src/orchestrator/block-proving-state.ts"],"names":[],"mappings":"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"}
|