@aztec/end-to-end 0.85.0-alpha-testnet.2 → 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_fees/fees_test.d.ts +4 -0
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +17 -1
- package/dest/e2e_p2p/p2p_network.d.ts +0 -10
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +1 -40
- package/dest/e2e_prover/e2e_prover_test.js +1 -1
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +7 -3
- 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 -35
- package/src/bench/client_flows/data_extractor.ts +8 -4
- package/src/e2e_fees/fees_test.ts +27 -1
- package/src/e2e_p2p/p2p_network.ts +1 -49
- package/src/e2e_prover/e2e_prover_test.ts +1 -1
- package/src/fixtures/utils.ts +5 -3
- 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
|
|
@@ -62,6 +62,10 @@ export declare class FeesTest {
|
|
|
62
62
|
teardown(): Promise<void>;
|
|
63
63
|
setIsMarkingAsProven(b: boolean): void;
|
|
64
64
|
catchUpProvenChain(): Promise<void>;
|
|
65
|
+
getBlockRewards(): Promise<{
|
|
66
|
+
sequencerBlockRewards: bigint;
|
|
67
|
+
proverBlockRewards: bigint;
|
|
68
|
+
}>;
|
|
65
69
|
mintAndBridgeFeeJuice(address: AztecAddress, amount: bigint): Promise<void>;
|
|
66
70
|
/** Alice mints bananaCoin tokens privately to the target address and redeems them. */
|
|
67
71
|
mintPrivateBananas(amount: bigint, address: AztecAddress): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_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,CAAC,YAAY,GAAG,qBAAqB,CAAM;IAc5D,KAAK;IAUL,QAAQ;IAKd,oBAAoB,CAAC,CAAC,EAAE,OAAO;IAIzB,kBAAkB;IAOlB,eAAe;;;;IAoBf,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAMjE,sFAAsF;IAChF,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;IASjD,kBAAkB;IAOzB,4BAA4B;IAyB5B,iCAAiC;IAMjC,0BAA0B;IAwB1B,8BAA8B;IAuBvB,qBAAqB;IA+DrB,8BAA8B;IAqB9B,yBAAyB;IAWzB,gCAAgC;IAUhC,sBAAsB;CAgCpC"}
|
|
@@ -2,7 +2,7 @@ import { getSchnorrWallet } from '@aztec/accounts/schnorr';
|
|
|
2
2
|
import { createLogger, sleep } from '@aztec/aztec.js';
|
|
3
3
|
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
4
4
|
import { FEE_FUNDING_FOR_TESTER_ACCOUNT } from '@aztec/constants';
|
|
5
|
-
import { RollupContract, createL1Clients, getPublicClient } from '@aztec/ethereum';
|
|
5
|
+
import { RollupContract, createL1Clients, getPublicClient, l1Artifacts } from '@aztec/ethereum';
|
|
6
6
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
7
7
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
8
8
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -105,6 +105,22 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
105
105
|
await sleep(1000);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
async getBlockRewards() {
|
|
109
|
+
const rewardDistributor = getContract({
|
|
110
|
+
address: this.context.deployL1ContractsValues.l1ContractAddresses.rewardDistributorAddress.toString(),
|
|
111
|
+
abi: l1Artifacts.rewardDistributor.contractAbi,
|
|
112
|
+
client: this.context.deployL1ContractsValues.publicClient
|
|
113
|
+
});
|
|
114
|
+
const blockReward = await rewardDistributor.read.BLOCK_REWARD();
|
|
115
|
+
const balance = await this.feeJuiceBridgeTestHarness.getL1FeeJuiceBalance(EthAddress.fromString(rewardDistributor.address));
|
|
116
|
+
const toDistribute = balance > blockReward ? blockReward : balance;
|
|
117
|
+
const sequencerBlockRewards = toDistribute / 2n;
|
|
118
|
+
const proverBlockRewards = toDistribute - sequencerBlockRewards;
|
|
119
|
+
return {
|
|
120
|
+
sequencerBlockRewards,
|
|
121
|
+
proverBlockRewards
|
|
122
|
+
};
|
|
123
|
+
}
|
|
108
124
|
async mintAndBridgeFeeJuice(address, amount) {
|
|
109
125
|
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(amount, address);
|
|
110
126
|
const { claimSecret: secret, messageLeafIndex: index } = claim;
|
|
@@ -260,8 +260,6 @@ export declare class P2PNetworkTest {
|
|
|
260
260
|
wallet?: AccountWalletWithSecretKey;
|
|
261
261
|
spamContract?: SpamContract;
|
|
262
262
|
bootstrapNode?: BootstrapNode;
|
|
263
|
-
private cleanupInterval;
|
|
264
|
-
private gasUtils;
|
|
265
263
|
constructor(testName: string, bootstrapNodeEnr: string, bootNodePort: number, numberOfNodes: number, initialValidatorConfig: AztecNodeConfig, metricsPort?: number | undefined);
|
|
266
264
|
static create({ testName, numberOfNodes, basePort, metricsPort, initialConfig, }: {
|
|
267
265
|
testName: string;
|
|
@@ -271,14 +269,6 @@ export declare class P2PNetworkTest {
|
|
|
271
269
|
initialConfig?: Partial<AztecNodeConfig>;
|
|
272
270
|
}): Promise<P2PNetworkTest>;
|
|
273
271
|
get fundedAccount(): InitialAccountData;
|
|
274
|
-
/**
|
|
275
|
-
* Start a loop to sync the mock system time with the L1 block time
|
|
276
|
-
*/
|
|
277
|
-
startSyncMockSystemTimeInterval(): void;
|
|
278
|
-
/**
|
|
279
|
-
* When using fake timers, we need to keep the system and anvil clocks in sync.
|
|
280
|
-
*/
|
|
281
|
-
syncMockSystemTime(): Promise<void>;
|
|
282
272
|
addBootstrapNode(): Promise<void>;
|
|
283
273
|
getValidators(): {
|
|
284
274
|
validators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,YAAY,EAA0B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAa9D,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,iCAAiC,CAAC;AAOzC,eAAO,MAAM,mBAAmB,QAA0C,CAAC;AAE3E,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC;AAEF,qBAAa,cAAc;IA0BhB,gBAAgB,EAAE,MAAM;IACxB,YAAY,EAAE,MAAM;IAC3B,OAAO,CAAC,aAAa;IAGrB,OAAO,CAAC,WAAW,CAAC;IA9BtB,OAAO,CAAC,eAAe,CAAmB;I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,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;KAC1C;IAcD,IAAI,aAAa,uBAKhB;IAEK,gBAAgB;IActB,aAAa;;;;;;;;;IA0BP,kBAAkB;IAiElB,YAAY;IAYZ,kBAAkB;IAoBlB,iBAAiB;IAsBjB,KAAK;IAaL,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAanC,QAAQ;CAKf"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
|
|
2
2
|
import { RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
3
|
-
import { L1TxUtilsWithBlobs } from '@aztec/ethereum/l1-tx-utils-with-blobs';
|
|
4
3
|
import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
|
|
5
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
6
5
|
import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -44,8 +43,6 @@ export class P2PNetworkTest {
|
|
|
44
43
|
wallet;
|
|
45
44
|
spamContract;
|
|
46
45
|
bootstrapNode;
|
|
47
|
-
cleanupInterval;
|
|
48
|
-
gasUtils;
|
|
49
46
|
constructor(testName, bootstrapNodeEnr, bootNodePort, numberOfNodes, initialValidatorConfig, // If set enable metrics collection
|
|
50
47
|
metricsPort){
|
|
51
48
|
this.bootstrapNodeEnr = bootstrapNodeEnr;
|
|
@@ -59,8 +56,6 @@ export class P2PNetworkTest {
|
|
|
59
56
|
this.validators = [];
|
|
60
57
|
this.deployedAccounts = [];
|
|
61
58
|
this.prefilledPublicData = [];
|
|
62
|
-
this.cleanupInterval = undefined;
|
|
63
|
-
this.gasUtils = undefined;
|
|
64
59
|
this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
|
|
65
60
|
// Set up the base account and node private keys for the initial network deployment
|
|
66
61
|
this.baseAccountPrivateKey = `0x${getPrivateKeyFromIndex(0).toString('hex')}`;
|
|
@@ -99,30 +94,6 @@ export class P2PNetworkTest {
|
|
|
99
94
|
}
|
|
100
95
|
return this.deployedAccounts[0];
|
|
101
96
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Start a loop to sync the mock system time with the L1 block time
|
|
104
|
-
*/ startSyncMockSystemTimeInterval() {
|
|
105
|
-
this.cleanupInterval = setInterval(()=>{
|
|
106
|
-
void this.syncMockSystemTime().catch((err)=>this.logger.error('Error syncing mock system time', err));
|
|
107
|
-
}, l1ContractsConfig.aztecSlotDuration * 1000);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* When using fake timers, we need to keep the system and anvil clocks in sync.
|
|
111
|
-
*/ async syncMockSystemTime() {
|
|
112
|
-
this.logger.info('Syncing mock system time');
|
|
113
|
-
const { dateProvider, deployL1ContractsValues } = this.ctx;
|
|
114
|
-
// Send a tx and only update the time after the tx is mined, as eth time is not continuous
|
|
115
|
-
const { receipt } = await this.gasUtils.sendAndMonitorTransaction({
|
|
116
|
-
to: this.baseAccount.address,
|
|
117
|
-
data: '0x',
|
|
118
|
-
value: 1n
|
|
119
|
-
});
|
|
120
|
-
const timestamp = await deployL1ContractsValues.publicClient.getBlock({
|
|
121
|
-
blockNumber: receipt.blockNumber
|
|
122
|
-
});
|
|
123
|
-
this.logger.info(`Timestamp: ${timestamp.timestamp}`);
|
|
124
|
-
dateProvider.setTime(Number(timestamp.timestamp) * 1000);
|
|
125
|
-
}
|
|
126
97
|
async addBootstrapNode() {
|
|
127
98
|
await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig })=>{
|
|
128
99
|
const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
|
|
@@ -260,15 +231,8 @@ export class P2PNetworkTest {
|
|
|
260
231
|
];
|
|
261
232
|
const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
262
233
|
this.prefilledPublicData = prefilledPublicData;
|
|
263
|
-
this.startSyncMockSystemTimeInterval();
|
|
264
|
-
this.gasUtils = new L1TxUtilsWithBlobs(this.ctx.deployL1ContractsValues.publicClient, this.ctx.deployL1ContractsValues.walletClient, this.logger, {
|
|
265
|
-
gasLimitBufferPercentage: 20,
|
|
266
|
-
maxGwei: 500n,
|
|
267
|
-
maxAttempts: 3,
|
|
268
|
-
checkIntervalMs: 100,
|
|
269
|
-
stallTimeMs: 1000
|
|
270
|
-
});
|
|
271
234
|
this.monitor = new ChainMonitor(RollupContract.getFromL1ContractsValues(this.ctx.deployL1ContractsValues)).start();
|
|
235
|
+
this.monitor.on('l1-block', ({ timestamp })=>this.ctx.dateProvider.setTime(Number(timestamp) * 1000));
|
|
272
236
|
}
|
|
273
237
|
async stopNodes(nodes) {
|
|
274
238
|
this.logger.info('Stopping nodes');
|
|
@@ -283,8 +247,5 @@ export class P2PNetworkTest {
|
|
|
283
247
|
this.monitor.stop();
|
|
284
248
|
await this.bootstrapNode?.stop();
|
|
285
249
|
await this.snapshotManager.teardown();
|
|
286
|
-
if (this.cleanupInterval) {
|
|
287
|
-
clearInterval(this.cleanupInterval);
|
|
288
|
-
}
|
|
289
250
|
}
|
|
290
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":";;AACA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAsC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,GAAG,EAER,KAAK,MAAM,EAM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EAAE,CAAC,CAUnF;AAED,wBAAsB,aAAa,CAAC,CAAC,EAAE,CAAC,EACtC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC/B,MAAM,EAAE,CAAC,EAAE,EACX,eAAe,EAAE,CAAC,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EACnE,aAAa,EAAE,CAAC,EAAE,EAClB,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC/B,MAAM,EAAE,CAAC,EAAE,EACX,aAAa,EAAE,CAAC,EAAE,GACjB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,0BAK3C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,GAAG,iCAiB/C;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,SAAK,EAAE,WAAW,SAAI,iBAS/G;AAED,wBAAsB,uBAAuB,CAC3C,oBAAoB,EAAE,KAAK,MAAM,EAAE,EACnC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,EACrB,mBAAmB,GAAE,kBAAkB,EAAO,uBAiD/C;AAWD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,aAAa,EAAE,GAAG,8BAWnB"}
|
package/dest/fixtures/utils.js
CHANGED
|
@@ -319,7 +319,9 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
319
319
|
config.bbWorkingDirectory = bbConfig.bbWorkingDirectory;
|
|
320
320
|
}
|
|
321
321
|
config.l1PublishRetryIntervalMS = 100;
|
|
322
|
-
const blobSinkClient = createBlobSinkClient(config
|
|
322
|
+
const blobSinkClient = createBlobSinkClient(config, {
|
|
323
|
+
logger: createLogger('node:blob-sink:client')
|
|
324
|
+
});
|
|
323
325
|
const aztecNode = await AztecNodeService.createAndSync(config, {
|
|
324
326
|
dateProvider,
|
|
325
327
|
blobSinkClient,
|
|
@@ -521,7 +523,9 @@ export async function createAndSyncProverNode(proverNodePrivateKey, aztecNodeCon
|
|
|
521
523
|
getTxsByHash: aztecNode.getTxsByHash.bind(aztecNode),
|
|
522
524
|
stop: ()=>Promise.resolve()
|
|
523
525
|
};
|
|
524
|
-
const blobSinkClient = createBlobSinkClient(aztecNodeConfig
|
|
526
|
+
const blobSinkClient = createBlobSinkClient(aztecNodeConfig, {
|
|
527
|
+
logger: createLogger('prover-node:blob-sink:client')
|
|
528
|
+
});
|
|
525
529
|
// Creating temp store and archiver for simulated prover node
|
|
526
530
|
const archiverConfig = {
|
|
527
531
|
...aztecNodeConfig,
|
|
@@ -556,7 +560,7 @@ export async function createAndSyncProverNode(proverNodePrivateKey, aztecNodeCon
|
|
|
556
560
|
getLogger().info(`Created and synced prover node`, {
|
|
557
561
|
publisherAddress: l1TxUtils.walletClient.account.address
|
|
558
562
|
});
|
|
559
|
-
proverNode.start();
|
|
563
|
+
await proverNode.start();
|
|
560
564
|
return proverNode;
|
|
561
565
|
}
|
|
562
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-
|
|
3
|
+
"version": "0.85.0-nightly.20250418",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"build": "yarn clean && tsc -b",
|
|
12
12
|
"build:dev": "tsc -b --watch",
|
|
13
13
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
14
|
-
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
15
14
|
"test:with-alerts": "./scripts/test-with-alerts.sh",
|
|
16
15
|
"test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
|
|
17
16
|
"test:e2e-docker": "./scripts/run_test.sh simple",
|
|
@@ -26,41 +25,40 @@
|
|
|
26
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@aztec/accounts": "0.85.0-
|
|
30
|
-
"@aztec/archiver": "0.85.0-
|
|
31
|
-
"@aztec/aztec": "0.85.0-
|
|
32
|
-
"@aztec/aztec-node": "0.85.0-
|
|
33
|
-
"@aztec/aztec.js": "0.85.0-
|
|
34
|
-
"@aztec/bb-prover": "0.85.0-
|
|
35
|
-
"@aztec/blob-lib": "0.85.0-
|
|
36
|
-
"@aztec/blob-sink": "0.85.0-
|
|
37
|
-
"@aztec/bot": "0.85.0-
|
|
38
|
-
"@aztec/cli": "0.85.0-
|
|
39
|
-
"@aztec/constants": "0.85.0-
|
|
40
|
-
"@aztec/entrypoints": "0.85.0-
|
|
41
|
-
"@aztec/epoch-cache": "0.85.0-
|
|
42
|
-
"@aztec/ethereum": "0.85.0-
|
|
43
|
-
"@aztec/foundation": "0.85.0-
|
|
44
|
-
"@aztec/kv-store": "0.85.0-
|
|
45
|
-
"@aztec/l1-artifacts": "0.85.0-
|
|
46
|
-
"@aztec/merkle-tree": "0.85.0-
|
|
47
|
-
"@aztec/noir-contracts.js": "0.85.0-
|
|
48
|
-
"@aztec/noir-noirc_abi": "0.85.0-
|
|
49
|
-
"@aztec/noir-protocol-circuits-types": "0.85.0-
|
|
50
|
-
"@aztec/p2p": "0.85.0-
|
|
51
|
-
"@aztec/protocol-contracts": "0.85.0-
|
|
52
|
-
"@aztec/prover-client": "0.85.0-
|
|
53
|
-
"@aztec/prover-node": "0.85.0-
|
|
54
|
-
"@aztec/pxe": "0.85.0-
|
|
55
|
-
"@aztec/sequencer-client": "0.85.0-
|
|
56
|
-
"@aztec/simulator": "0.85.0-
|
|
57
|
-
"@aztec/stdlib": "0.85.0-
|
|
58
|
-
"@aztec/telemetry-client": "0.85.0-
|
|
59
|
-
"@aztec/validator-client": "0.85.0-
|
|
60
|
-
"@aztec/world-state": "0.85.0-
|
|
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",
|
|
61
60
|
"@iarna/toml": "^2.2.5",
|
|
62
61
|
"@jest/globals": "^29.5.0",
|
|
63
|
-
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
64
62
|
"@noble/curves": "^1.0.0",
|
|
65
63
|
"@swc/core": "^1.4.11",
|
|
66
64
|
"@swc/jest": "^0.2.36",
|
|
@@ -85,6 +83,7 @@
|
|
|
85
83
|
"lodash.compact": "^3.0.1",
|
|
86
84
|
"lodash.every": "^4.6.0",
|
|
87
85
|
"lodash.omit": "^4.5.0",
|
|
86
|
+
"msgpackr": "^1.11.2",
|
|
88
87
|
"process": "^0.11.10",
|
|
89
88
|
"stream-browserify": "^3.0.0",
|
|
90
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
|
|
@@ -10,7 +10,13 @@ import {
|
|
|
10
10
|
} from '@aztec/aztec.js';
|
|
11
11
|
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
12
12
|
import { FEE_FUNDING_FOR_TESTER_ACCOUNT } from '@aztec/constants';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
type DeployL1ContractsArgs,
|
|
15
|
+
RollupContract,
|
|
16
|
+
createL1Clients,
|
|
17
|
+
getPublicClient,
|
|
18
|
+
l1Artifacts,
|
|
19
|
+
} from '@aztec/ethereum';
|
|
14
20
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
15
21
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
16
22
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -140,6 +146,26 @@ export class FeesTest {
|
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
148
|
|
|
149
|
+
async getBlockRewards() {
|
|
150
|
+
const rewardDistributor = getContract({
|
|
151
|
+
address: this.context.deployL1ContractsValues.l1ContractAddresses.rewardDistributorAddress.toString(),
|
|
152
|
+
abi: l1Artifacts.rewardDistributor.contractAbi,
|
|
153
|
+
client: this.context.deployL1ContractsValues.publicClient,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const blockReward = await rewardDistributor.read.BLOCK_REWARD();
|
|
157
|
+
|
|
158
|
+
const balance = await this.feeJuiceBridgeTestHarness.getL1FeeJuiceBalance(
|
|
159
|
+
EthAddress.fromString(rewardDistributor.address),
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
const toDistribute = balance > blockReward ? blockReward : balance;
|
|
163
|
+
const sequencerBlockRewards = toDistribute / 2n;
|
|
164
|
+
const proverBlockRewards = toDistribute - sequencerBlockRewards;
|
|
165
|
+
|
|
166
|
+
return { sequencerBlockRewards, proverBlockRewards };
|
|
167
|
+
}
|
|
168
|
+
|
|
143
169
|
async mintAndBridgeFeeJuice(address: AztecAddress, amount: bigint) {
|
|
144
170
|
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(amount, address);
|
|
145
171
|
const { claimSecret: secret, messageLeafIndex: index } = claim;
|
|
@@ -3,7 +3,6 @@ import type { InitialAccountData } from '@aztec/accounts/testing';
|
|
|
3
3
|
import type { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
4
4
|
import type { AccountWalletWithSecretKey } from '@aztec/aztec.js';
|
|
5
5
|
import { RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
6
|
-
import { L1TxUtilsWithBlobs } from '@aztec/ethereum/l1-tx-utils-with-blobs';
|
|
7
6
|
import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
|
|
8
7
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
9
8
|
import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -66,10 +65,6 @@ export class P2PNetworkTest {
|
|
|
66
65
|
|
|
67
66
|
public bootstrapNode?: BootstrapNode;
|
|
68
67
|
|
|
69
|
-
private cleanupInterval: NodeJS.Timeout | undefined = undefined;
|
|
70
|
-
|
|
71
|
-
private gasUtils: L1TxUtilsWithBlobs | undefined = undefined;
|
|
72
|
-
|
|
73
68
|
constructor(
|
|
74
69
|
testName: string,
|
|
75
70
|
public bootstrapNodeEnr: string,
|
|
@@ -147,32 +142,6 @@ export class P2PNetworkTest {
|
|
|
147
142
|
return this.deployedAccounts[0];
|
|
148
143
|
}
|
|
149
144
|
|
|
150
|
-
/**
|
|
151
|
-
* Start a loop to sync the mock system time with the L1 block time
|
|
152
|
-
*/
|
|
153
|
-
public startSyncMockSystemTimeInterval() {
|
|
154
|
-
this.cleanupInterval = setInterval(() => {
|
|
155
|
-
void this.syncMockSystemTime().catch(err => this.logger.error('Error syncing mock system time', err));
|
|
156
|
-
}, l1ContractsConfig.aztecSlotDuration * 1000);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* When using fake timers, we need to keep the system and anvil clocks in sync.
|
|
161
|
-
*/
|
|
162
|
-
public async syncMockSystemTime() {
|
|
163
|
-
this.logger.info('Syncing mock system time');
|
|
164
|
-
const { dateProvider, deployL1ContractsValues } = this.ctx!;
|
|
165
|
-
// Send a tx and only update the time after the tx is mined, as eth time is not continuous
|
|
166
|
-
const { receipt } = await this.gasUtils!.sendAndMonitorTransaction({
|
|
167
|
-
to: this.baseAccount.address,
|
|
168
|
-
data: '0x',
|
|
169
|
-
value: 1n,
|
|
170
|
-
});
|
|
171
|
-
const timestamp = await deployL1ContractsValues.publicClient.getBlock({ blockNumber: receipt.blockNumber });
|
|
172
|
-
this.logger.info(`Timestamp: ${timestamp.timestamp}`);
|
|
173
|
-
dateProvider.setTime(Number(timestamp.timestamp) * 1000);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
145
|
async addBootstrapNode() {
|
|
177
146
|
await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig }) => {
|
|
178
147
|
const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
|
|
@@ -341,22 +310,8 @@ export class P2PNetworkTest {
|
|
|
341
310
|
const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
342
311
|
this.prefilledPublicData = prefilledPublicData;
|
|
343
312
|
|
|
344
|
-
this.startSyncMockSystemTimeInterval();
|
|
345
|
-
|
|
346
|
-
this.gasUtils = new L1TxUtilsWithBlobs(
|
|
347
|
-
this.ctx.deployL1ContractsValues.publicClient,
|
|
348
|
-
this.ctx.deployL1ContractsValues.walletClient,
|
|
349
|
-
this.logger,
|
|
350
|
-
{
|
|
351
|
-
gasLimitBufferPercentage: 20,
|
|
352
|
-
maxGwei: 500n,
|
|
353
|
-
maxAttempts: 3,
|
|
354
|
-
checkIntervalMs: 100,
|
|
355
|
-
stallTimeMs: 1000,
|
|
356
|
-
},
|
|
357
|
-
);
|
|
358
|
-
|
|
359
313
|
this.monitor = new ChainMonitor(RollupContract.getFromL1ContractsValues(this.ctx.deployL1ContractsValues)).start();
|
|
314
|
+
this.monitor.on('l1-block', ({ timestamp }) => this.ctx.dateProvider.setTime(Number(timestamp) * 1000));
|
|
360
315
|
}
|
|
361
316
|
|
|
362
317
|
async stopNodes(nodes: AztecNodeService[]) {
|
|
@@ -376,8 +331,5 @@ export class P2PNetworkTest {
|
|
|
376
331
|
this.monitor.stop();
|
|
377
332
|
await this.bootstrapNode?.stop();
|
|
378
333
|
await this.snapshotManager.teardown();
|
|
379
|
-
if (this.cleanupInterval) {
|
|
380
|
-
clearInterval(this.cleanupInterval);
|
|
381
|
-
}
|
|
382
334
|
}
|
|
383
335
|
}
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -516,7 +516,7 @@ export async function setup(
|
|
|
516
516
|
}
|
|
517
517
|
config.l1PublishRetryIntervalMS = 100;
|
|
518
518
|
|
|
519
|
-
const blobSinkClient = createBlobSinkClient(config);
|
|
519
|
+
const blobSinkClient = createBlobSinkClient(config, { logger: createLogger('node:blob-sink:client') });
|
|
520
520
|
const aztecNode = await AztecNodeService.createAndSync(
|
|
521
521
|
config,
|
|
522
522
|
{ dateProvider, blobSinkClient, telemetry },
|
|
@@ -791,7 +791,9 @@ export async function createAndSyncProverNode(
|
|
|
791
791
|
stop: () => Promise.resolve(),
|
|
792
792
|
};
|
|
793
793
|
|
|
794
|
-
const blobSinkClient = createBlobSinkClient(aztecNodeConfig
|
|
794
|
+
const blobSinkClient = createBlobSinkClient(aztecNodeConfig, {
|
|
795
|
+
logger: createLogger('prover-node:blob-sink:client'),
|
|
796
|
+
});
|
|
795
797
|
// Creating temp store and archiver for simulated prover node
|
|
796
798
|
const archiverConfig = { ...aztecNodeConfig, dataDirectory };
|
|
797
799
|
const archiver = await createArchiver(archiverConfig, blobSinkClient, {
|
|
@@ -826,7 +828,7 @@ export async function createAndSyncProverNode(
|
|
|
826
828
|
{ prefilledPublicData },
|
|
827
829
|
);
|
|
828
830
|
getLogger().info(`Created and synced prover node`, { publisherAddress: l1TxUtils.walletClient.account.address });
|
|
829
|
-
proverNode.start();
|
|
831
|
+
await proverNode.start();
|
|
830
832
|
return proverNode;
|
|
831
833
|
}
|
|
832
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(
|