@aztec/end-to-end 0.84.0-nightly.20250413 → 0.84.0-nightly.20250415
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/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +2 -3
- package/dest/shared/capture_private_execution_steps.d.ts.map +1 -1
- package/dest/shared/capture_private_execution_steps.js +29 -28
- package/package.json +32 -32
- package/src/bench/utils.ts +2 -7
- package/src/shared/capture_private_execution_steps.ts +25 -28
package/dest/bench/utils.d.ts
CHANGED
|
@@ -41,6 +41,6 @@ export declare function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitO
|
|
|
41
41
|
* @param startingBlock - First l2 block to process.
|
|
42
42
|
* @returns The new PXE.
|
|
43
43
|
*/
|
|
44
|
-
export declare function createNewPXE(node: AztecNode, contract: BenchmarkingContract
|
|
44
|
+
export declare function createNewPXE(node: AztecNode, contract: BenchmarkingContract): Promise<PXEService>;
|
|
45
45
|
export {};
|
|
46
46
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAA4C,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAIxH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAS,MAAM,sBAAsB,CAAC;AAEtF;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAC5B,6BAA6B,CAAC,OAAO,EAAE,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;IACtE,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;GAuBF;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAuEF;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,MAAM,EAAE,CAAC,CAMnB;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,QAAQ,iBAI3F;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAevG"}
|
package/dest/bench/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchCall
|
|
1
|
+
import { BatchCall } from '@aztec/aztec.js';
|
|
2
2
|
import { mean, stdDev, times } from '@aztec/foundation/collection';
|
|
3
3
|
import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking';
|
|
4
4
|
import { createPXEService } from '@aztec/pxe/server';
|
|
@@ -127,12 +127,11 @@ export async function waitTxs(txs, context, txWaitOpts) {
|
|
|
127
127
|
* @param contract - Benchmark contract to add to the pxe.
|
|
128
128
|
* @param startingBlock - First l2 block to process.
|
|
129
129
|
* @returns The new PXE.
|
|
130
|
-
*/ export async function createNewPXE(node, contract
|
|
130
|
+
*/ export async function createNewPXE(node, contract) {
|
|
131
131
|
const l1Contracts = await node.getL1ContractAddresses();
|
|
132
132
|
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
133
133
|
const pxeConfig = {
|
|
134
134
|
l2BlockBatchSize: 200,
|
|
135
|
-
l2StartingBlock: startingBlock,
|
|
136
135
|
l2BlockPollingIntervalMS: 100,
|
|
137
136
|
dataDirectory: undefined,
|
|
138
137
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
@@ -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;AA0BnC,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,iBAqCvB"}
|
|
@@ -11,48 +11,49 @@ const logger = createLogger('e2e:capture-private-execution-steps');
|
|
|
11
11
|
// Longer term we won't use this hacked together msgpack format
|
|
12
12
|
// Leaving duplicated as this eventually bb will provide a serialization
|
|
13
13
|
// helper for passing to a generic msgpack RPC endpoint.
|
|
14
|
-
async function _createClientIvcProofFiles(directory, executionSteps
|
|
14
|
+
async function _createClientIvcProofFiles(directory, executionSteps) {
|
|
15
15
|
const acirPath = path.join(directory, 'acir.msgpack');
|
|
16
16
|
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
17
17
|
await fs.writeFile(acirPath, encode(executionSteps.map((map)=>map.bytecode)));
|
|
18
18
|
await fs.writeFile(witnessPath, encode(executionSteps.map((map)=>serializeWitness(map.witness))));
|
|
19
|
-
let rawWitnessesPath;
|
|
20
|
-
if (rawWitnesses) {
|
|
21
|
-
rawWitnessesPath = path.join(directory, 'witnesses.json');
|
|
22
|
-
await fs.writeFile(rawWitnessesPath, JSON.stringify(executionSteps.map((step)=>Object.fromEntries(step.witness))));
|
|
23
|
-
}
|
|
24
19
|
return {
|
|
25
20
|
acirPath,
|
|
26
|
-
witnessPath
|
|
27
|
-
rawWitnessesPath
|
|
21
|
+
witnessPath
|
|
28
22
|
};
|
|
29
23
|
}
|
|
30
24
|
export async function capturePrivateExecutionStepsIfEnvSet(label, interaction, opts, expectedSteps) {
|
|
31
25
|
// Not included in env_var.ts as internal to e2e tests.
|
|
32
26
|
const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
|
|
33
|
-
if (ivcFolder) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
27
|
+
if (!ivcFolder) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const profileMode = [
|
|
31
|
+
'execution-steps',
|
|
32
|
+
'full'
|
|
33
|
+
].includes(process.env.PROFILE_MODE ?? '') ? process.env.PROFILE_MODE : 'execution-steps';
|
|
34
|
+
logger.info(`Capturing client ivc execution profile for ${label} in mode ${profileMode}`);
|
|
35
|
+
const result = await interaction.profile({
|
|
36
|
+
...opts,
|
|
37
|
+
profileMode
|
|
38
|
+
});
|
|
39
|
+
if (expectedSteps !== undefined && result.executionSteps.length !== expectedSteps) {
|
|
40
|
+
throw new Error(`Expected ${expectedSteps} execution steps, got ${result.executionSteps.length}`);
|
|
41
|
+
}
|
|
42
|
+
const resultsDirectory = path.join(ivcFolder, label);
|
|
43
|
+
logger.info(`Writing private execution steps to ${resultsDirectory}`);
|
|
44
|
+
await fs.mkdir(resultsDirectory, {
|
|
45
|
+
recursive: true
|
|
46
|
+
});
|
|
47
|
+
// Write the client IVC files read by the prover.
|
|
48
|
+
await _createClientIvcProofFiles(resultsDirectory, result.executionSteps);
|
|
49
|
+
if (profileMode === 'full') {
|
|
50
|
+
// If we have gate counts, write the steps in human-readable format.
|
|
51
51
|
await fs.writeFile(path.join(resultsDirectory, 'steps.json'), JSON.stringify(result.executionSteps.map((step)=>({
|
|
52
52
|
fnName: step.functionName,
|
|
53
53
|
gateCount: step.gateCount
|
|
54
54
|
})), null, 2));
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
// In full mode, we also write the raw witnesses in a more human-readable format.
|
|
56
|
+
await fs.writeFile(path.join(resultsDirectory, 'witnesses.json'), JSON.stringify(result.executionSteps.map((step)=>Object.fromEntries(step.witness))));
|
|
57
57
|
}
|
|
58
|
+
logger.info(`Wrote private execution steps to ${resultsDirectory}`);
|
|
58
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.84.0-nightly.
|
|
3
|
+
"version": "0.84.0-nightly.20250415",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -26,37 +26,37 @@
|
|
|
26
26
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aztec/accounts": "0.84.0-nightly.
|
|
30
|
-
"@aztec/archiver": "0.84.0-nightly.
|
|
31
|
-
"@aztec/aztec": "0.84.0-nightly.
|
|
32
|
-
"@aztec/aztec-node": "0.84.0-nightly.
|
|
33
|
-
"@aztec/aztec.js": "0.84.0-nightly.
|
|
34
|
-
"@aztec/bb-prover": "0.84.0-nightly.
|
|
35
|
-
"@aztec/blob-lib": "0.84.0-nightly.
|
|
36
|
-
"@aztec/blob-sink": "0.84.0-nightly.
|
|
37
|
-
"@aztec/bot": "0.84.0-nightly.
|
|
38
|
-
"@aztec/constants": "0.84.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "0.84.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "0.84.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "0.84.0-nightly.
|
|
42
|
-
"@aztec/foundation": "0.84.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "0.84.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "0.84.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "0.84.0-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "0.84.0-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "0.84.0-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "0.84.0-nightly.
|
|
49
|
-
"@aztec/p2p": "0.84.0-nightly.
|
|
50
|
-
"@aztec/protocol-contracts": "0.84.0-nightly.
|
|
51
|
-
"@aztec/prover-client": "0.84.0-nightly.
|
|
52
|
-
"@aztec/prover-node": "0.84.0-nightly.
|
|
53
|
-
"@aztec/pxe": "0.84.0-nightly.
|
|
54
|
-
"@aztec/sequencer-client": "0.84.0-nightly.
|
|
55
|
-
"@aztec/simulator": "0.84.0-nightly.
|
|
56
|
-
"@aztec/stdlib": "0.84.0-nightly.
|
|
57
|
-
"@aztec/telemetry-client": "0.84.0-nightly.
|
|
58
|
-
"@aztec/validator-client": "0.84.0-nightly.
|
|
59
|
-
"@aztec/world-state": "0.84.0-nightly.
|
|
29
|
+
"@aztec/accounts": "0.84.0-nightly.20250415",
|
|
30
|
+
"@aztec/archiver": "0.84.0-nightly.20250415",
|
|
31
|
+
"@aztec/aztec": "0.84.0-nightly.20250415",
|
|
32
|
+
"@aztec/aztec-node": "0.84.0-nightly.20250415",
|
|
33
|
+
"@aztec/aztec.js": "0.84.0-nightly.20250415",
|
|
34
|
+
"@aztec/bb-prover": "0.84.0-nightly.20250415",
|
|
35
|
+
"@aztec/blob-lib": "0.84.0-nightly.20250415",
|
|
36
|
+
"@aztec/blob-sink": "0.84.0-nightly.20250415",
|
|
37
|
+
"@aztec/bot": "0.84.0-nightly.20250415",
|
|
38
|
+
"@aztec/constants": "0.84.0-nightly.20250415",
|
|
39
|
+
"@aztec/entrypoints": "0.84.0-nightly.20250415",
|
|
40
|
+
"@aztec/epoch-cache": "0.84.0-nightly.20250415",
|
|
41
|
+
"@aztec/ethereum": "0.84.0-nightly.20250415",
|
|
42
|
+
"@aztec/foundation": "0.84.0-nightly.20250415",
|
|
43
|
+
"@aztec/kv-store": "0.84.0-nightly.20250415",
|
|
44
|
+
"@aztec/l1-artifacts": "0.84.0-nightly.20250415",
|
|
45
|
+
"@aztec/merkle-tree": "0.84.0-nightly.20250415",
|
|
46
|
+
"@aztec/noir-contracts.js": "0.84.0-nightly.20250415",
|
|
47
|
+
"@aztec/noir-noirc_abi": "0.84.0-nightly.20250415",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "0.84.0-nightly.20250415",
|
|
49
|
+
"@aztec/p2p": "0.84.0-nightly.20250415",
|
|
50
|
+
"@aztec/protocol-contracts": "0.84.0-nightly.20250415",
|
|
51
|
+
"@aztec/prover-client": "0.84.0-nightly.20250415",
|
|
52
|
+
"@aztec/prover-node": "0.84.0-nightly.20250415",
|
|
53
|
+
"@aztec/pxe": "0.84.0-nightly.20250415",
|
|
54
|
+
"@aztec/sequencer-client": "0.84.0-nightly.20250415",
|
|
55
|
+
"@aztec/simulator": "0.84.0-nightly.20250415",
|
|
56
|
+
"@aztec/stdlib": "0.84.0-nightly.20250415",
|
|
57
|
+
"@aztec/telemetry-client": "0.84.0-nightly.20250415",
|
|
58
|
+
"@aztec/validator-client": "0.84.0-nightly.20250415",
|
|
59
|
+
"@aztec/world-state": "0.84.0-nightly.20250415",
|
|
60
60
|
"@iarna/toml": "^2.2.5",
|
|
61
61
|
"@jest/globals": "^29.5.0",
|
|
62
62
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
package/src/bench/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AztecNodeService } from '@aztec/aztec-node';
|
|
2
|
-
import { type AztecNode, BatchCall,
|
|
2
|
+
import { type AztecNode, BatchCall, type SentTx, type WaitOpts } from '@aztec/aztec.js';
|
|
3
3
|
import { mean, stdDev, times } from '@aztec/foundation/collection';
|
|
4
4
|
import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking';
|
|
5
5
|
import { type PXEService, type PXEServiceConfig, createPXEService } from '@aztec/pxe/server';
|
|
@@ -154,16 +154,11 @@ export async function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpt
|
|
|
154
154
|
* @param startingBlock - First l2 block to process.
|
|
155
155
|
* @returns The new PXE.
|
|
156
156
|
*/
|
|
157
|
-
export async function createNewPXE(
|
|
158
|
-
node: AztecNode,
|
|
159
|
-
contract: BenchmarkingContract,
|
|
160
|
-
startingBlock: number = INITIAL_L2_BLOCK_NUM,
|
|
161
|
-
): Promise<PXEService> {
|
|
157
|
+
export async function createNewPXE(node: AztecNode, contract: BenchmarkingContract): Promise<PXEService> {
|
|
162
158
|
const l1Contracts = await node.getL1ContractAddresses();
|
|
163
159
|
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
164
160
|
const pxeConfig = {
|
|
165
161
|
l2BlockBatchSize: 200,
|
|
166
|
-
l2StartingBlock: startingBlock,
|
|
167
162
|
l2BlockPollingIntervalMS: 100,
|
|
168
163
|
dataDirectory: undefined,
|
|
169
164
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
@@ -22,24 +22,14 @@ const logger = createLogger('e2e:capture-private-execution-steps');
|
|
|
22
22
|
// Longer term we won't use this hacked together msgpack format
|
|
23
23
|
// Leaving duplicated as this eventually bb will provide a serialization
|
|
24
24
|
// helper for passing to a generic msgpack RPC endpoint.
|
|
25
|
-
async function _createClientIvcProofFiles(
|
|
26
|
-
directory: string,
|
|
27
|
-
executionSteps: PrivateExecutionStep[],
|
|
28
|
-
rawWitnesses: boolean = false,
|
|
29
|
-
) {
|
|
25
|
+
async function _createClientIvcProofFiles(directory: string, executionSteps: PrivateExecutionStep[]) {
|
|
30
26
|
const acirPath = path.join(directory, 'acir.msgpack');
|
|
31
27
|
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
32
28
|
await fs.writeFile(acirPath, encode(executionSteps.map(map => map.bytecode)));
|
|
33
29
|
await fs.writeFile(witnessPath, encode(executionSteps.map(map => serializeWitness(map.witness))));
|
|
34
|
-
let rawWitnessesPath;
|
|
35
|
-
if (rawWitnesses) {
|
|
36
|
-
rawWitnessesPath = path.join(directory, 'witnesses.json');
|
|
37
|
-
await fs.writeFile(rawWitnessesPath, JSON.stringify(executionSteps.map(step => Object.fromEntries(step.witness))));
|
|
38
|
-
}
|
|
39
30
|
return {
|
|
40
31
|
acirPath,
|
|
41
32
|
witnessPath,
|
|
42
|
-
rawWitnessesPath,
|
|
43
33
|
};
|
|
44
34
|
}
|
|
45
35
|
|
|
@@ -51,21 +41,24 @@ export async function capturePrivateExecutionStepsIfEnvSet(
|
|
|
51
41
|
) {
|
|
52
42
|
// Not included in env_var.ts as internal to e2e tests.
|
|
53
43
|
const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
|
|
54
|
-
if (ivcFolder) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
if (!ivcFolder) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const profileMode = ['execution-steps', 'full'].includes(process.env.PROFILE_MODE ?? '')
|
|
48
|
+
? (process.env.PROFILE_MODE as 'full' | 'execution-steps')
|
|
49
|
+
: 'execution-steps';
|
|
50
|
+
logger.info(`Capturing client ivc execution profile for ${label} in mode ${profileMode}`);
|
|
51
|
+
const result = await interaction.profile({ ...opts, profileMode });
|
|
52
|
+
if (expectedSteps !== undefined && result.executionSteps.length !== expectedSteps) {
|
|
53
|
+
throw new Error(`Expected ${expectedSteps} execution steps, got ${result.executionSteps.length}`);
|
|
54
|
+
}
|
|
55
|
+
const resultsDirectory = path.join(ivcFolder, label);
|
|
56
|
+
logger.info(`Writing private execution steps to ${resultsDirectory}`);
|
|
57
|
+
await fs.mkdir(resultsDirectory, { recursive: true });
|
|
58
|
+
// Write the client IVC files read by the prover.
|
|
59
|
+
await _createClientIvcProofFiles(resultsDirectory, result.executionSteps);
|
|
60
|
+
if (profileMode === 'full') {
|
|
61
|
+
// If we have gate counts, write the steps in human-readable format.
|
|
69
62
|
await fs.writeFile(
|
|
70
63
|
path.join(resultsDirectory, 'steps.json'),
|
|
71
64
|
JSON.stringify(
|
|
@@ -74,7 +67,11 @@ export async function capturePrivateExecutionStepsIfEnvSet(
|
|
|
74
67
|
2,
|
|
75
68
|
),
|
|
76
69
|
);
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
// In full mode, we also write the raw witnesses in a more human-readable format.
|
|
71
|
+
await fs.writeFile(
|
|
72
|
+
path.join(resultsDirectory, 'witnesses.json'),
|
|
73
|
+
JSON.stringify(result.executionSteps.map(step => Object.fromEntries(step.witness))),
|
|
74
|
+
);
|
|
79
75
|
}
|
|
76
|
+
logger.info(`Wrote private execution steps to ${resultsDirectory}`);
|
|
80
77
|
}
|