@aztec/prover-client 1.0.0-nightly.20250730 → 1.0.0-nightly.20250801
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-building-helpers.d.ts","sourceRoot":"","sources":["../../src/orchestrator/block-building-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiBhF,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,KAAK,KAAK,EAAgC,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"block-building-helpers.d.ts","sourceRoot":"","sources":["../../src/orchestrator/block-building-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiBhF,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,KAAK,KAAK,EAAgC,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAyD,MAAM,yBAAyB,CAAC;AAInH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EACL,KAAK,6BAA6B,EAElC,KAAK,iCAAiC,EACtC,sBAAsB,EAEtB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,YAAY,EAKb,MAAM,qBAAqB,CAAC;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AwB;;;;;;SAI/G;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,wBAAwB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAGrH;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,wBAMrE;AA4CD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,MAAM,EACrB,EAAE,EAAE,wBAAwB,GAC3B,OAAO,CAAC,EAAE,EAAE,CAAC,CAMf;AAGD,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAC5D,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,wBAAwB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAY/B;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,qBAAqB,EACnC,aAAa,EAAE,GAAG,CAAC,YAAY,EAAE,sBAAsB,CAAC,QASzD;AAqBD,wBAAgB,UAAU,CAAC,EAAE,EAAE,WAAW,QAczC"}
|
|
@@ -5,7 +5,7 @@ import { padArrayEnd } from '@aztec/foundation/collection';
|
|
|
5
5
|
import { sha256ToField, sha256Trunc } from '@aztec/foundation/crypto';
|
|
6
6
|
import { BLS12Point, Fr } from '@aztec/foundation/fields';
|
|
7
7
|
import { assertLength, toFriendlyJSON } from '@aztec/foundation/serialize';
|
|
8
|
-
import { MembershipWitness, MerkleTreeCalculator,
|
|
8
|
+
import { MembershipWitness, MerkleTreeCalculator, computeUnbalancedMerkleTreeRoot } from '@aztec/foundation/trees';
|
|
9
9
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
10
10
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
11
11
|
import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
@@ -14,7 +14,7 @@ import { Body } from '@aztec/stdlib/block';
|
|
|
14
14
|
import { ContractClassLogFields } from '@aztec/stdlib/logs';
|
|
15
15
|
import { BlockConstantData, PrivateBaseRollupHints, PrivateBaseStateDiffHints, PublicBaseRollupHints } from '@aztec/stdlib/rollup';
|
|
16
16
|
import { AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafPreimage, PublicDataTreeLeaf, PublicDataTreeLeafPreimage, getTreeHeight } from '@aztec/stdlib/trees';
|
|
17
|
-
import { BlockHeader, ContentCommitment, PartialStateReference, StateReference
|
|
17
|
+
import { BlockHeader, ContentCommitment, PartialStateReference, StateReference } from '@aztec/stdlib/tx';
|
|
18
18
|
import { Attributes, runInSpan } from '@aztec/telemetry-client';
|
|
19
19
|
// Builds the hints for base rollup. Updating the contract, nullifier, and data trees in the process.
|
|
20
20
|
export const insertSideEffectsAndBuildBaseRollupHints = runInSpan('BlockBuilderHelpers', 'buildBaseRollupHints', async (span, tx, globalVariables, // Passing in the snapshot instead of getting it from the db because it might've been updated in the orchestrator
|
|
@@ -154,12 +154,12 @@ export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'build
|
|
|
154
154
|
const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
|
|
155
155
|
const txEffects = txs.map((tx)=>tx.txEffect);
|
|
156
156
|
const body = new Body(txEffects);
|
|
157
|
-
const
|
|
158
|
-
const outHash =
|
|
157
|
+
const txOutHashes = txEffects.map((tx)=>tx.txOutHash());
|
|
158
|
+
const outHash = txOutHashes.length === 0 ? Fr.ZERO : new Fr(computeUnbalancedMerkleTreeRoot(txOutHashes));
|
|
159
159
|
const parityShaRoot = await computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
160
160
|
const blobsHash = getBlobsHashFromBlobs(await Blob.getBlobsPerBlock(body.toBlobFields()));
|
|
161
161
|
const contentCommitment = new ContentCommitment(blobsHash, parityShaRoot, outHash);
|
|
162
|
-
const fees =
|
|
162
|
+
const fees = txEffects.reduce((acc, tx)=>acc.add(tx.transactionFee), Fr.ZERO);
|
|
163
163
|
const manaUsed = txs.reduce((acc, tx)=>acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
|
|
164
164
|
const header = new BlockHeader(previousArchive, contentCommitment, stateReference, globalVariables, fees, manaUsed);
|
|
165
165
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-client",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250801",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
72
|
-
"@aztec/blob-lib": "1.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
74
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
75
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
76
|
-
"@aztec/kv-store": "1.0.0-nightly.
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
78
|
-
"@aztec/noir-types": "1.0.0-nightly.
|
|
79
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
80
|
-
"@aztec/simulator": "1.0.0-nightly.
|
|
81
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
82
|
-
"@aztec/telemetry-client": "1.0.0-nightly.
|
|
83
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
71
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250801",
|
|
72
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250801",
|
|
73
|
+
"@aztec/constants": "1.0.0-nightly.20250801",
|
|
74
|
+
"@aztec/ethereum": "1.0.0-nightly.20250801",
|
|
75
|
+
"@aztec/foundation": "1.0.0-nightly.20250801",
|
|
76
|
+
"@aztec/kv-store": "1.0.0-nightly.20250801",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250801",
|
|
78
|
+
"@aztec/noir-types": "1.0.0-nightly.20250801",
|
|
79
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250801",
|
|
80
|
+
"@aztec/simulator": "1.0.0-nightly.20250801",
|
|
81
|
+
"@aztec/stdlib": "1.0.0-nightly.20250801",
|
|
82
|
+
"@aztec/telemetry-client": "1.0.0-nightly.20250801",
|
|
83
|
+
"@aztec/world-state": "1.0.0-nightly.20250801",
|
|
84
84
|
"@google-cloud/storage": "^7.15.0",
|
|
85
85
|
"@iarna/toml": "^2.2.5",
|
|
86
86
|
"commander": "^12.1.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"zod": "^3.23.8"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
93
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250801",
|
|
94
94
|
"@jest/globals": "^30.0.0",
|
|
95
95
|
"@types/jest": "^30.0.0",
|
|
96
96
|
"@types/node": "^22.15.17",
|
|
@@ -17,7 +17,7 @@ import { padArrayEnd } from '@aztec/foundation/collection';
|
|
|
17
17
|
import { sha256ToField, sha256Trunc } from '@aztec/foundation/crypto';
|
|
18
18
|
import { BLS12Point, Fr } from '@aztec/foundation/fields';
|
|
19
19
|
import { type Tuple, assertLength, toFriendlyJSON } from '@aztec/foundation/serialize';
|
|
20
|
-
import { MembershipWitness, MerkleTreeCalculator,
|
|
20
|
+
import { MembershipWitness, MerkleTreeCalculator, computeUnbalancedMerkleTreeRoot } from '@aztec/foundation/trees';
|
|
21
21
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
22
22
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
23
23
|
import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
@@ -338,25 +338,15 @@ export const buildHeaderAndBodyFromTxs = runInSpan(
|
|
|
338
338
|
const txEffects = txs.map(tx => tx.txEffect);
|
|
339
339
|
const body = new Body(txEffects);
|
|
340
340
|
|
|
341
|
-
const
|
|
342
|
-
const outHash =
|
|
343
|
-
numTxs === 0
|
|
344
|
-
? Fr.ZERO
|
|
345
|
-
: numTxs === 1
|
|
346
|
-
? new Fr(body.txEffects[0].txOutHash())
|
|
347
|
-
: new Fr(
|
|
348
|
-
computeUnbalancedMerkleRoot(
|
|
349
|
-
body.txEffects.map(tx => tx.txOutHash()),
|
|
350
|
-
TxEffect.empty().txOutHash(),
|
|
351
|
-
),
|
|
352
|
-
);
|
|
341
|
+
const txOutHashes = txEffects.map(tx => tx.txOutHash());
|
|
342
|
+
const outHash = txOutHashes.length === 0 ? Fr.ZERO : new Fr(computeUnbalancedMerkleTreeRoot(txOutHashes));
|
|
353
343
|
|
|
354
344
|
const parityShaRoot = await computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
355
345
|
const blobsHash = getBlobsHashFromBlobs(await Blob.getBlobsPerBlock(body.toBlobFields()));
|
|
356
346
|
|
|
357
347
|
const contentCommitment = new ContentCommitment(blobsHash, parityShaRoot, outHash);
|
|
358
348
|
|
|
359
|
-
const fees =
|
|
349
|
+
const fees = txEffects.reduce((acc, tx) => acc.add(tx.transactionFee), Fr.ZERO);
|
|
360
350
|
const manaUsed = txs.reduce((acc, tx) => acc.add(new Fr(tx.gasUsed.billedGas.l2Gas)), Fr.ZERO);
|
|
361
351
|
|
|
362
352
|
const header = new BlockHeader(previousArchive, contentCommitment, stateReference, globalVariables, fees, manaUsed);
|