@aztec/end-to-end 0.85.0-nightly.20250417 → 0.85.0-nightly.20250418
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/bench/client_flows/data_extractor.js +10 -5
- package/dest/e2e_prover/e2e_prover_test.js +1 -1
- package/dest/fixtures/utils.js +1 -1
- package/dest/shared/capture_private_execution_steps.d.ts.map +1 -1
- package/dest/shared/capture_private_execution_steps.js +3 -17
- package/package.json +34 -34
- package/src/bench/client_flows/data_extractor.ts +8 -4
- package/src/e2e_prover/e2e_prover_test.ts +1 -1
- package/src/fixtures/utils.ts +1 -1
- package/src/shared/capture_private_execution_steps.ts +3 -19
|
@@ -2,7 +2,7 @@ import { BBNativePrivateKernelProver } from '@aztec/bb-prover';
|
|
|
2
2
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/wasm/bundle';
|
|
3
3
|
import { createLogger, logger } from '@aztec/foundation/log';
|
|
4
4
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
5
|
-
import {
|
|
5
|
+
import { Decoder } from 'msgpackr';
|
|
6
6
|
import assert from 'node:assert';
|
|
7
7
|
import { readFile, readdir, writeFile } from 'node:fs/promises';
|
|
8
8
|
import { join } from 'node:path';
|
|
@@ -131,8 +131,10 @@ async function main() {
|
|
|
131
131
|
const userLog = createLogger('client_ivc_flows:data_processor');
|
|
132
132
|
for (const flow of flows){
|
|
133
133
|
userLog.info(`Processing flow ${flow}`);
|
|
134
|
-
const
|
|
135
|
-
const
|
|
134
|
+
const ivcInputs = await readFile(join(ivcFolder, flow, 'ivc-inputs.msgpack'));
|
|
135
|
+
const stepsFromFile = new Decoder({
|
|
136
|
+
useRecords: false
|
|
137
|
+
}).unpack(ivcInputs);
|
|
136
138
|
const witnesses = await readFile(join(ivcFolder, flow, 'witnesses.json'));
|
|
137
139
|
const witnessStack = JSON.parse(witnesses.toString()).map((witnessMap)=>{
|
|
138
140
|
return new Map(Object.entries(witnessMap).map(([k, v])=>[
|
|
@@ -145,8 +147,11 @@ async function main() {
|
|
|
145
147
|
const privateExecutionSteps = executionSteps.map((step, i)=>({
|
|
146
148
|
functionName: step.fnName,
|
|
147
149
|
gateCount: step.gateCount,
|
|
148
|
-
bytecode:
|
|
149
|
-
witness
|
|
150
|
+
bytecode: stepsFromFile[i].bytecode,
|
|
151
|
+
// TODO(AD) do we still want to take this from witness.json?
|
|
152
|
+
witness: witnessStack[i],
|
|
153
|
+
// This can be left empty. If so, the prover will generate a vk on the fly (~25% slower).
|
|
154
|
+
vk: Buffer.from([])
|
|
150
155
|
}));
|
|
151
156
|
let stats;
|
|
152
157
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dest/fixtures/utils.js
CHANGED
|
@@ -560,7 +560,7 @@ export async function createAndSyncProverNode(proverNodePrivateKey, aztecNodeCon
|
|
|
560
560
|
getLogger().info(`Created and synced prover node`, {
|
|
561
561
|
publisherAddress: l1TxUtils.walletClient.account.address
|
|
562
562
|
});
|
|
563
|
-
proverNode.start();
|
|
563
|
+
await proverNode.start();
|
|
564
564
|
return proverNode;
|
|
565
565
|
}
|
|
566
566
|
function createDelayedL1TxUtils(aztecNodeConfig, privateKey, logName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture_private_execution_steps.d.ts","sourceRoot":"","sources":["../../src/shared/capture_private_execution_steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EACb,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"capture_private_execution_steps.d.ts","sourceRoot":"","sources":["../../src/shared/capture_private_execution_steps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EACb,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AASnC,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,2BAA2B,GAAG,YAAY,EACvD,IAAI,CAAC,EAAE,IAAI,CAAC,oBAAoB,GAAG,aAAa,EAAE,aAAa,CAAC,EAChE,aAAa,CAAC,EAAE,MAAM,iBAsCvB"}
|
|
@@ -2,25 +2,10 @@
|
|
|
2
2
|
* This module exposes the ability to capture the private exection steps that go into our "Client IVC" prover.
|
|
3
3
|
* These are used for debugging and benchmarking barretenberg (the prover component).
|
|
4
4
|
*/ import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import {
|
|
6
|
-
import { encode } from '@msgpack/msgpack';
|
|
5
|
+
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
7
6
|
import { promises as fs } from 'fs';
|
|
8
7
|
import path from 'path';
|
|
9
8
|
const logger = createLogger('e2e:capture-private-execution-steps');
|
|
10
|
-
// TODO(#7371): This is duplicated.
|
|
11
|
-
// Longer term we won't use this hacked together msgpack format
|
|
12
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
13
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
14
|
-
async function _createClientIvcProofFiles(directory, executionSteps) {
|
|
15
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
16
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
17
|
-
await fs.writeFile(acirPath, encode(executionSteps.map((map)=>map.bytecode)));
|
|
18
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map((map)=>serializeWitness(map.witness))));
|
|
19
|
-
return {
|
|
20
|
-
acirPath,
|
|
21
|
-
witnessPath
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
9
|
export async function capturePrivateExecutionStepsIfEnvSet(label, interaction, opts, expectedSteps) {
|
|
25
10
|
// Not included in env_var.ts as internal to e2e tests.
|
|
26
11
|
const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
|
|
@@ -45,7 +30,8 @@ export async function capturePrivateExecutionStepsIfEnvSet(label, interaction, o
|
|
|
45
30
|
recursive: true
|
|
46
31
|
});
|
|
47
32
|
// Write the client IVC files read by the prover.
|
|
48
|
-
|
|
33
|
+
const ivcInputsPath = path.join(resultsDirectory, 'ivc-inputs.msgpack');
|
|
34
|
+
await fs.writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
49
35
|
if (profileMode === 'full') {
|
|
50
36
|
// If we have gate counts, write the steps in human-readable format.
|
|
51
37
|
await fs.writeFile(path.join(resultsDirectory, 'steps.json'), JSON.stringify(result.executionSteps.map((step)=>({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.85.0-nightly.
|
|
3
|
+
"version": "0.85.0-nightly.20250418",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,41 +25,40 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "0.85.0-nightly.
|
|
29
|
-
"@aztec/archiver": "0.85.0-nightly.
|
|
30
|
-
"@aztec/aztec": "0.85.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "0.85.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "0.85.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "0.85.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "0.85.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "0.85.0-nightly.
|
|
36
|
-
"@aztec/bot": "0.85.0-nightly.
|
|
37
|
-
"@aztec/cli": "0.85.0-nightly.
|
|
38
|
-
"@aztec/constants": "0.85.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "0.85.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "0.85.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "0.85.0-nightly.
|
|
42
|
-
"@aztec/foundation": "0.85.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "0.85.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "0.85.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "0.85.0-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "0.85.0-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "0.85.0-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "0.85.0-nightly.
|
|
49
|
-
"@aztec/p2p": "0.85.0-nightly.
|
|
50
|
-
"@aztec/protocol-contracts": "0.85.0-nightly.
|
|
51
|
-
"@aztec/prover-client": "0.85.0-nightly.
|
|
52
|
-
"@aztec/prover-node": "0.85.0-nightly.
|
|
53
|
-
"@aztec/pxe": "0.85.0-nightly.
|
|
54
|
-
"@aztec/sequencer-client": "0.85.0-nightly.
|
|
55
|
-
"@aztec/simulator": "0.85.0-nightly.
|
|
56
|
-
"@aztec/stdlib": "0.85.0-nightly.
|
|
57
|
-
"@aztec/telemetry-client": "0.85.0-nightly.
|
|
58
|
-
"@aztec/validator-client": "0.85.0-nightly.
|
|
59
|
-
"@aztec/world-state": "0.85.0-nightly.
|
|
28
|
+
"@aztec/accounts": "0.85.0-nightly.20250418",
|
|
29
|
+
"@aztec/archiver": "0.85.0-nightly.20250418",
|
|
30
|
+
"@aztec/aztec": "0.85.0-nightly.20250418",
|
|
31
|
+
"@aztec/aztec-node": "0.85.0-nightly.20250418",
|
|
32
|
+
"@aztec/aztec.js": "0.85.0-nightly.20250418",
|
|
33
|
+
"@aztec/bb-prover": "0.85.0-nightly.20250418",
|
|
34
|
+
"@aztec/blob-lib": "0.85.0-nightly.20250418",
|
|
35
|
+
"@aztec/blob-sink": "0.85.0-nightly.20250418",
|
|
36
|
+
"@aztec/bot": "0.85.0-nightly.20250418",
|
|
37
|
+
"@aztec/cli": "0.85.0-nightly.20250418",
|
|
38
|
+
"@aztec/constants": "0.85.0-nightly.20250418",
|
|
39
|
+
"@aztec/entrypoints": "0.85.0-nightly.20250418",
|
|
40
|
+
"@aztec/epoch-cache": "0.85.0-nightly.20250418",
|
|
41
|
+
"@aztec/ethereum": "0.85.0-nightly.20250418",
|
|
42
|
+
"@aztec/foundation": "0.85.0-nightly.20250418",
|
|
43
|
+
"@aztec/kv-store": "0.85.0-nightly.20250418",
|
|
44
|
+
"@aztec/l1-artifacts": "0.85.0-nightly.20250418",
|
|
45
|
+
"@aztec/merkle-tree": "0.85.0-nightly.20250418",
|
|
46
|
+
"@aztec/noir-contracts.js": "0.85.0-nightly.20250418",
|
|
47
|
+
"@aztec/noir-noirc_abi": "0.85.0-nightly.20250418",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "0.85.0-nightly.20250418",
|
|
49
|
+
"@aztec/p2p": "0.85.0-nightly.20250418",
|
|
50
|
+
"@aztec/protocol-contracts": "0.85.0-nightly.20250418",
|
|
51
|
+
"@aztec/prover-client": "0.85.0-nightly.20250418",
|
|
52
|
+
"@aztec/prover-node": "0.85.0-nightly.20250418",
|
|
53
|
+
"@aztec/pxe": "0.85.0-nightly.20250418",
|
|
54
|
+
"@aztec/sequencer-client": "0.85.0-nightly.20250418",
|
|
55
|
+
"@aztec/simulator": "0.85.0-nightly.20250418",
|
|
56
|
+
"@aztec/stdlib": "0.85.0-nightly.20250418",
|
|
57
|
+
"@aztec/telemetry-client": "0.85.0-nightly.20250418",
|
|
58
|
+
"@aztec/validator-client": "0.85.0-nightly.20250418",
|
|
59
|
+
"@aztec/world-state": "0.85.0-nightly.20250418",
|
|
60
60
|
"@iarna/toml": "^2.2.5",
|
|
61
61
|
"@jest/globals": "^29.5.0",
|
|
62
|
-
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
63
62
|
"@noble/curves": "^1.0.0",
|
|
64
63
|
"@swc/core": "^1.4.11",
|
|
65
64
|
"@swc/jest": "^0.2.36",
|
|
@@ -84,6 +83,7 @@
|
|
|
84
83
|
"lodash.compact": "^3.0.1",
|
|
85
84
|
"lodash.every": "^4.6.0",
|
|
86
85
|
"lodash.omit": "^4.5.0",
|
|
86
|
+
"msgpackr": "^1.11.2",
|
|
87
87
|
"process": "^0.11.10",
|
|
88
88
|
"stream-browserify": "^3.0.0",
|
|
89
89
|
"string-argv": "^0.3.2",
|
|
@@ -5,7 +5,7 @@ import { createLogger, logger } from '@aztec/foundation/log';
|
|
|
5
5
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
6
6
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Decoder } from 'msgpackr';
|
|
9
9
|
import assert from 'node:assert';
|
|
10
10
|
import { readFile, readdir, writeFile } from 'node:fs/promises';
|
|
11
11
|
import { join } from 'node:path';
|
|
@@ -149,9 +149,10 @@ async function main() {
|
|
|
149
149
|
|
|
150
150
|
for (const flow of flows) {
|
|
151
151
|
userLog.info(`Processing flow ${flow}`);
|
|
152
|
-
const
|
|
153
|
-
const
|
|
152
|
+
const ivcInputs = await readFile(join(ivcFolder, flow, 'ivc-inputs.msgpack'));
|
|
153
|
+
const stepsFromFile: PrivateExecutionStep[] = new Decoder({ useRecords: false }).unpack(ivcInputs);
|
|
154
154
|
const witnesses = await readFile(join(ivcFolder, flow, 'witnesses.json'));
|
|
155
|
+
|
|
155
156
|
const witnessStack = JSON.parse(witnesses.toString()).map((witnessMap: Record<string, string>) => {
|
|
156
157
|
return new Map<number, string>(Object.entries(witnessMap).map(([k, v]) => [Number(k), v]));
|
|
157
158
|
});
|
|
@@ -160,8 +161,11 @@ async function main() {
|
|
|
160
161
|
const privateExecutionSteps: PrivateExecutionStep[] = executionSteps.map((step, i) => ({
|
|
161
162
|
functionName: step.fnName,
|
|
162
163
|
gateCount: step.gateCount,
|
|
163
|
-
bytecode:
|
|
164
|
+
bytecode: stepsFromFile[i].bytecode,
|
|
165
|
+
// TODO(AD) do we still want to take this from witness.json?
|
|
164
166
|
witness: witnessStack[i],
|
|
167
|
+
// This can be left empty. If so, the prover will generate a vk on the fly (~25% slower).
|
|
168
|
+
vk: Buffer.from([]),
|
|
165
169
|
}));
|
|
166
170
|
let stats: { duration: number; eventName: string; proofSize: number } | undefined;
|
|
167
171
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -828,7 +828,7 @@ export async function createAndSyncProverNode(
|
|
|
828
828
|
{ prefilledPublicData },
|
|
829
829
|
);
|
|
830
830
|
getLogger().info(`Created and synced prover node`, { publisherAddress: l1TxUtils.walletClient.account.address });
|
|
831
|
-
proverNode.start();
|
|
831
|
+
await proverNode.start();
|
|
832
832
|
return proverNode;
|
|
833
833
|
}
|
|
834
834
|
|
|
@@ -9,30 +9,13 @@ import type {
|
|
|
9
9
|
ProfileMethodOptions,
|
|
10
10
|
} from '@aztec/aztec.js/contracts';
|
|
11
11
|
import { createLogger } from '@aztec/foundation/log';
|
|
12
|
-
import {
|
|
13
|
-
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
12
|
+
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
14
13
|
|
|
15
|
-
import { encode } from '@msgpack/msgpack';
|
|
16
14
|
import { promises as fs } from 'fs';
|
|
17
15
|
import path from 'path';
|
|
18
16
|
|
|
19
17
|
const logger = createLogger('e2e:capture-private-execution-steps');
|
|
20
18
|
|
|
21
|
-
// TODO(#7371): This is duplicated.
|
|
22
|
-
// Longer term we won't use this hacked together msgpack format
|
|
23
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
24
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
25
|
-
async function _createClientIvcProofFiles(directory: string, executionSteps: PrivateExecutionStep[]) {
|
|
26
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
27
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
28
|
-
await fs.writeFile(acirPath, encode(executionSteps.map(map => map.bytecode)));
|
|
29
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map(map => serializeWitness(map.witness))));
|
|
30
|
-
return {
|
|
31
|
-
acirPath,
|
|
32
|
-
witnessPath,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
19
|
export async function capturePrivateExecutionStepsIfEnvSet(
|
|
37
20
|
label: string,
|
|
38
21
|
interaction: ContractFunctionInteraction | DeployMethod,
|
|
@@ -56,7 +39,8 @@ export async function capturePrivateExecutionStepsIfEnvSet(
|
|
|
56
39
|
logger.info(`Writing private execution steps to ${resultsDirectory}`);
|
|
57
40
|
await fs.mkdir(resultsDirectory, { recursive: true });
|
|
58
41
|
// Write the client IVC files read by the prover.
|
|
59
|
-
|
|
42
|
+
const ivcInputsPath = path.join(resultsDirectory, 'ivc-inputs.msgpack');
|
|
43
|
+
await fs.writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
60
44
|
if (profileMode === 'full') {
|
|
61
45
|
// If we have gate counts, write the steps in human-readable format.
|
|
62
46
|
await fs.writeFile(
|