@aztec/prover-client 1.2.1 → 2.0.0-nightly.20250813
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/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +5 -5
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +4 -2
- package/dest/orchestrator/orchestrator_metrics.d.ts +2 -0
- package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator_metrics.js +9 -0
- package/dest/proving_broker/proving_broker.d.ts +9 -0
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +1 -1
- package/dest/test/mock_proof_store.d.ts +9 -0
- package/dest/test/mock_proof_store.d.ts.map +1 -0
- package/dest/test/mock_proof_store.js +10 -0
- package/dest/test/mock_prover.d.ts +2 -2
- package/package.json +15 -15
- package/src/orchestrator/block-building-helpers.ts +4 -14
- package/src/orchestrator/orchestrator.ts +4 -2
- package/src/orchestrator/orchestrator_metrics.ts +20 -1
- package/src/proving_broker/proving_broker.ts +1 -1
- package/src/test/mock_proof_store.ts +14 -0
|
@@ -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,sBAAs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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 {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAU3F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAS9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EAGxB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAUzC,OAAO,EAAE,KAAK,sBAAs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EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiDtD;;;OAGG;IAEI,iBAAiB,CAAC,GAAG,EAAE,EAAE,EAAE;IAelC;;;OAGG;IAIU,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IA4BnG,oDAAoD;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;YAQzB,UAAU;cAqCR,kCAAkC,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB;IAWvG;;OAEG;IACI,MAAM;IAQb;;OAEG;IACU,aAAa;;;;;IA6B1B;;;;OAIG;YACW,kBAAkB;IAShC;;;;;OAKG;IACH,OAAO,CAAC,eAAe;YAwDT,uBAAuB;YAkCvB,uBAAuB;IAyCrC,OAAO,CAAC,iBAAiB;IA8CzB,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,kBAAkB;YA0BZ,sBAAsB;IAgFpC,OAAO,CAAC,wBAAwB;IAuBhC,OAAO,CAAC,gCAAgC;IAUxC,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,uBAAuB;IAwB/B,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,iBAAiB;YA4BX,8BAA8B;YAa9B,8BAA8B;IA2B5C,OAAO,CAAC,mCAAmC;IAa3C,OAAO,CAAC,yBAAyB;IASjC;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAoDjB,OAAO,CAAC,4BAA4B;CAWrC"}
|
|
@@ -155,18 +155,19 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
155
155
|
/**
|
|
156
156
|
* Kickstarts tube circuits for the specified txs. These will be used during epoch proving.
|
|
157
157
|
* Note that if the tube circuits are not started this way, they will be started nontheless after processing.
|
|
158
|
-
*/
|
|
158
|
+
*/ startTubeCircuits(txs) {
|
|
159
159
|
if (!this.provingState?.verifyState()) {
|
|
160
160
|
throw new Error(`Invalid proving state, call startNewEpoch before starting tube circuits`);
|
|
161
161
|
}
|
|
162
162
|
for (const tx of txs){
|
|
163
|
-
const txHash =
|
|
163
|
+
const txHash = tx.getTxHash().toString();
|
|
164
164
|
const tubeInputs = new TubeInputs(!!tx.data.forPublic, tx.clientIvcProof);
|
|
165
165
|
const tubeProof = promiseWithResolvers();
|
|
166
166
|
logger.debug(`Starting tube circuit for tx ${txHash}`);
|
|
167
167
|
this.doEnqueueTube(txHash, tubeInputs, (proof)=>tubeProof.resolve(proof));
|
|
168
168
|
this.provingState?.cachedTubeProofs.set(txHash, tubeProof.promise);
|
|
169
169
|
}
|
|
170
|
+
return Promise.resolve();
|
|
170
171
|
}
|
|
171
172
|
/**
|
|
172
173
|
* Marks the block as completed.
|
|
@@ -664,6 +665,7 @@ const logger = createLogger('prover-client:orchestrator');
|
|
|
664
665
|
logger.warn(`Error thrown when proving AVM circuit but AVM_PROVING_STRICT is off. Use snapshotted
|
|
665
666
|
AVM inputs and carrying on. ${inspect(err)}.`);
|
|
666
667
|
try {
|
|
668
|
+
this.metrics.incAvmFallback();
|
|
667
669
|
const snapshotAvmPrivateInputs = readAvmMinimalPublicTxInputsFromFile();
|
|
668
670
|
return await this.prover.getAvmProof(snapshotAvmPrivateInputs, true, signal, provingState.epochNumber);
|
|
669
671
|
} catch (err) {
|
|
@@ -2,7 +2,9 @@ import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
|
2
2
|
export declare class ProvingOrchestratorMetrics {
|
|
3
3
|
readonly tracer: Tracer;
|
|
4
4
|
private baseRollupInputsDuration;
|
|
5
|
+
private avmFallbackCount;
|
|
5
6
|
constructor(client: TelemetryClient, name?: string);
|
|
6
7
|
recordBaseRollupInputs(durationMs: number): void;
|
|
8
|
+
incAvmFallback(): void;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=orchestrator_metrics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator_metrics.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"orchestrator_metrics.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,MAAM,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,0BAA0B;IACrC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,wBAAwB,CAAY;IAC5C,OAAO,CAAC,gBAAgB,CAAgB;gBAE5B,MAAM,EAAE,eAAe,EAAE,IAAI,SAAwB;IAkBjE,sBAAsB,CAAC,UAAU,EAAE,MAAM;IAIzC,cAAc;CAGf"}
|
|
@@ -2,6 +2,7 @@ import { Metrics, ValueType } from '@aztec/telemetry-client';
|
|
|
2
2
|
export class ProvingOrchestratorMetrics {
|
|
3
3
|
tracer;
|
|
4
4
|
baseRollupInputsDuration;
|
|
5
|
+
avmFallbackCount;
|
|
5
6
|
constructor(client, name = 'ProvingOrchestrator'){
|
|
6
7
|
this.tracer = client.getTracer(name);
|
|
7
8
|
const meter = client.getMeter(name);
|
|
@@ -10,8 +11,16 @@ export class ProvingOrchestratorMetrics {
|
|
|
10
11
|
description: 'Duration to build base rollup inputs',
|
|
11
12
|
valueType: ValueType.INT
|
|
12
13
|
});
|
|
14
|
+
this.avmFallbackCount = meter.createUpDownCounter(Metrics.PROVING_ORCHESTRATOR_AVM_FALLBACK_COUNT, {
|
|
15
|
+
description: 'How many times the AVM fallback was used',
|
|
16
|
+
valueType: ValueType.INT
|
|
17
|
+
});
|
|
18
|
+
this.avmFallbackCount.add(0);
|
|
13
19
|
}
|
|
14
20
|
recordBaseRollupInputs(durationMs) {
|
|
15
21
|
this.baseRollupInputsDuration.record(Math.ceil(durationMs));
|
|
16
22
|
}
|
|
23
|
+
incAvmFallback() {
|
|
24
|
+
this.avmFallbackCount.add(1);
|
|
25
|
+
}
|
|
17
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type GetProvingJobResponse, type ProofUri, type ProvingJob, type ProvingJobConsumer, type ProvingJobFilter, type ProvingJobId, type ProvingJobProducer, type ProvingJobStatus } from '@aztec/stdlib/interfaces/server';
|
|
2
|
+
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
2
3
|
import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
|
|
3
4
|
import { type ProverBrokerConfig } from './config.js';
|
|
4
5
|
import type { ProvingBrokerDatabase } from './proving_broker_database.js';
|
|
@@ -61,4 +62,12 @@ export declare class ProvingBroker implements ProvingJobProducer, ProvingJobCons
|
|
|
61
62
|
private isJobStale;
|
|
62
63
|
private oldestEpochToKeep;
|
|
63
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Relative priority of each proof type. Proofs higher up on the list are more important and should be prioritized
|
|
67
|
+
* over proofs lower on the list.
|
|
68
|
+
*
|
|
69
|
+
* The aim is that this will speed up block proving as the closer we get to a block's root proof the more likely it
|
|
70
|
+
* is to get picked up by agents
|
|
71
|
+
*/
|
|
72
|
+
export declare const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[];
|
|
64
73
|
//# sourceMappingURL=proving_broker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proving_broker.d.ts","sourceRoot":"","sources":["../../src/proving_broker/proving_broker.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EAEtB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"proving_broker.d.ts","sourceRoot":"","sources":["../../src/proving_broker/proving_broker.ts"],"names":[],"mappings":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DzD,OAAO,CAAC,sBAAsB;YA4QhB,WAAW;IAUzB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,iBAAiB;CAG1B;AAiDD;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,kBAAkB,EAa7D,CAAC"}
|
|
@@ -555,7 +555,7 @@ _ts_decorate([
|
|
|
555
555
|
*
|
|
556
556
|
* The aim is that this will speed up block proving as the closer we get to a block's root proof the more likely it
|
|
557
557
|
* is to get picked up by agents
|
|
558
|
-
*/ const PROOF_TYPES_IN_PRIORITY_ORDER = [
|
|
558
|
+
*/ export const PROOF_TYPES_IN_PRIORITY_ORDER = [
|
|
559
559
|
ProvingRequestType.BLOCK_ROOT_ROLLUP,
|
|
560
560
|
ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP,
|
|
561
561
|
ProvingRequestType.BLOCK_MERGE_ROLLUP,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProvingJobId } from '@aztec/stdlib/interfaces/server';
|
|
2
|
+
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
3
|
+
export declare class MockProofStore {
|
|
4
|
+
private mockCounter;
|
|
5
|
+
private readonly bucketName;
|
|
6
|
+
private readonly basePath;
|
|
7
|
+
saveProofInput(jobId: ProvingJobId, type: ProvingRequestType): Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=mock_proof_store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock_proof_store.d.ts","sourceRoot":"","sources":["../../src/test/mock_proof_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;CAI/E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Mock ProofStore for faster benchmarks with realistic Cloud Storage URIs
|
|
2
|
+
export class MockProofStore {
|
|
3
|
+
mockCounter = 0;
|
|
4
|
+
bucketName = 'aztec-proving-benchmarks';
|
|
5
|
+
basePath = 'proving-jobs';
|
|
6
|
+
saveProofInput(jobId, type) {
|
|
7
|
+
const uri = `gs://${this.bucketName}/${this.basePath}/inputs/${type}/${jobId}`;
|
|
8
|
+
return Promise.resolve(uri);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -21,8 +21,8 @@ export declare class MockProver implements ServerCircuitProver {
|
|
|
21
21
|
constructor();
|
|
22
22
|
getAvmProof(_inputs: AvmCircuitInputs, _skipPublicInputsValidation?: boolean, // TODO(#14234)[Unconditional PIs validation]: Remove.
|
|
23
23
|
_signal?: AbortSignal, _epochNumber?: number): Promise<ProofAndVerificationKey<20000>>;
|
|
24
|
-
getBaseParityProof(_inputs: BaseParityInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<import("@aztec/stdlib/parity").ParityPublicInputs,
|
|
25
|
-
getRootParityProof(_inputs: RootParityInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<import("@aztec/stdlib/parity").ParityPublicInputs,
|
|
24
|
+
getBaseParityProof(_inputs: BaseParityInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<import("@aztec/stdlib/parity").ParityPublicInputs, 457>>;
|
|
25
|
+
getRootParityProof(_inputs: RootParityInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<import("@aztec/stdlib/parity").ParityPublicInputs, 457>>;
|
|
26
26
|
getPrivateBaseRollupProof(_baseRollupInput: PrivateBaseRollupInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
27
27
|
getPublicBaseRollupProof(_inputs: PublicBaseRollupInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
28
28
|
getMergeRollupProof(_input: MergeRollupInputs, _signal?: AbortSignal, _epochNumber?: number): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-nightly.20250813",
|
|
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": "
|
|
72
|
-
"@aztec/blob-lib": "
|
|
73
|
-
"@aztec/constants": "
|
|
74
|
-
"@aztec/ethereum": "
|
|
75
|
-
"@aztec/foundation": "
|
|
76
|
-
"@aztec/kv-store": "
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "
|
|
78
|
-
"@aztec/noir-types": "
|
|
79
|
-
"@aztec/protocol-contracts": "
|
|
80
|
-
"@aztec/simulator": "
|
|
81
|
-
"@aztec/stdlib": "
|
|
82
|
-
"@aztec/telemetry-client": "
|
|
83
|
-
"@aztec/world-state": "
|
|
71
|
+
"@aztec/bb-prover": "2.0.0-nightly.20250813",
|
|
72
|
+
"@aztec/blob-lib": "2.0.0-nightly.20250813",
|
|
73
|
+
"@aztec/constants": "2.0.0-nightly.20250813",
|
|
74
|
+
"@aztec/ethereum": "2.0.0-nightly.20250813",
|
|
75
|
+
"@aztec/foundation": "2.0.0-nightly.20250813",
|
|
76
|
+
"@aztec/kv-store": "2.0.0-nightly.20250813",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250813",
|
|
78
|
+
"@aztec/noir-types": "2.0.0-nightly.20250813",
|
|
79
|
+
"@aztec/protocol-contracts": "2.0.0-nightly.20250813",
|
|
80
|
+
"@aztec/simulator": "2.0.0-nightly.20250813",
|
|
81
|
+
"@aztec/stdlib": "2.0.0-nightly.20250813",
|
|
82
|
+
"@aztec/telemetry-client": "2.0.0-nightly.20250813",
|
|
83
|
+
"@aztec/world-state": "2.0.0-nightly.20250813",
|
|
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": "
|
|
93
|
+
"@aztec/noir-contracts.js": "2.0.0-nightly.20250813",
|
|
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);
|
|
@@ -248,18 +248,19 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
248
248
|
* Note that if the tube circuits are not started this way, they will be started nontheless after processing.
|
|
249
249
|
*/
|
|
250
250
|
@trackSpan('ProvingOrchestrator.startTubeCircuits')
|
|
251
|
-
public
|
|
251
|
+
public startTubeCircuits(txs: Tx[]) {
|
|
252
252
|
if (!this.provingState?.verifyState()) {
|
|
253
253
|
throw new Error(`Invalid proving state, call startNewEpoch before starting tube circuits`);
|
|
254
254
|
}
|
|
255
255
|
for (const tx of txs) {
|
|
256
|
-
const txHash =
|
|
256
|
+
const txHash = tx.getTxHash().toString();
|
|
257
257
|
const tubeInputs = new TubeInputs(!!tx.data.forPublic, tx.clientIvcProof);
|
|
258
258
|
const tubeProof = promiseWithResolvers<ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>>();
|
|
259
259
|
logger.debug(`Starting tube circuit for tx ${txHash}`);
|
|
260
260
|
this.doEnqueueTube(txHash, tubeInputs, proof => tubeProof.resolve(proof));
|
|
261
261
|
this.provingState?.cachedTubeProofs.set(txHash, tubeProof.promise);
|
|
262
262
|
}
|
|
263
|
+
return Promise.resolve();
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
/**
|
|
@@ -996,6 +997,7 @@ export class ProvingOrchestrator implements EpochProver {
|
|
|
996
997
|
);
|
|
997
998
|
|
|
998
999
|
try {
|
|
1000
|
+
this.metrics.incAvmFallback();
|
|
999
1001
|
const snapshotAvmPrivateInputs = readAvmMinimalPublicTxInputsFromFile();
|
|
1000
1002
|
return await this.prover.getAvmProof(snapshotAvmPrivateInputs, true, signal, provingState.epochNumber);
|
|
1001
1003
|
} catch (err) {
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type Histogram,
|
|
3
|
+
Metrics,
|
|
4
|
+
type TelemetryClient,
|
|
5
|
+
type Tracer,
|
|
6
|
+
type UpDownCounter,
|
|
7
|
+
ValueType,
|
|
8
|
+
} from '@aztec/telemetry-client';
|
|
2
9
|
|
|
3
10
|
export class ProvingOrchestratorMetrics {
|
|
4
11
|
public readonly tracer: Tracer;
|
|
5
12
|
|
|
6
13
|
private baseRollupInputsDuration: Histogram;
|
|
14
|
+
private avmFallbackCount: UpDownCounter;
|
|
7
15
|
|
|
8
16
|
constructor(client: TelemetryClient, name = 'ProvingOrchestrator') {
|
|
9
17
|
this.tracer = client.getTracer(name);
|
|
@@ -14,9 +22,20 @@ export class ProvingOrchestratorMetrics {
|
|
|
14
22
|
description: 'Duration to build base rollup inputs',
|
|
15
23
|
valueType: ValueType.INT,
|
|
16
24
|
});
|
|
25
|
+
|
|
26
|
+
this.avmFallbackCount = meter.createUpDownCounter(Metrics.PROVING_ORCHESTRATOR_AVM_FALLBACK_COUNT, {
|
|
27
|
+
description: 'How many times the AVM fallback was used',
|
|
28
|
+
valueType: ValueType.INT,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
this.avmFallbackCount.add(0);
|
|
17
32
|
}
|
|
18
33
|
|
|
19
34
|
recordBaseRollupInputs(durationMs: number) {
|
|
20
35
|
this.baseRollupInputsDuration.record(Math.ceil(durationMs));
|
|
21
36
|
}
|
|
37
|
+
|
|
38
|
+
incAvmFallback() {
|
|
39
|
+
this.avmFallbackCount.add(1);
|
|
40
|
+
}
|
|
22
41
|
}
|
|
@@ -672,7 +672,7 @@ function proofTypeComparator(a: ProvingRequestType, b: ProvingRequestType): -1 |
|
|
|
672
672
|
* The aim is that this will speed up block proving as the closer we get to a block's root proof the more likely it
|
|
673
673
|
* is to get picked up by agents
|
|
674
674
|
*/
|
|
675
|
-
const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
|
|
675
|
+
export const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
|
|
676
676
|
ProvingRequestType.BLOCK_ROOT_ROLLUP,
|
|
677
677
|
ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP,
|
|
678
678
|
ProvingRequestType.BLOCK_MERGE_ROLLUP,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProvingJobId } from '@aztec/stdlib/interfaces/server';
|
|
2
|
+
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
3
|
+
|
|
4
|
+
// Mock ProofStore for faster benchmarks with realistic Cloud Storage URIs
|
|
5
|
+
export class MockProofStore {
|
|
6
|
+
private mockCounter = 0;
|
|
7
|
+
private readonly bucketName = 'aztec-proving-benchmarks';
|
|
8
|
+
private readonly basePath = 'proving-jobs';
|
|
9
|
+
|
|
10
|
+
saveProofInput(jobId: ProvingJobId, type: ProvingRequestType): Promise<string> {
|
|
11
|
+
const uri = `gs://${this.bucketName}/${this.basePath}/inputs/${type}/${jobId}`;
|
|
12
|
+
return Promise.resolve(uri as any);
|
|
13
|
+
}
|
|
14
|
+
}
|