@aztec/end-to-end 0.86.0-nightly.20250505 → 0.86.0-nightly.20250507
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/client_flows_benchmark.js +1 -1
- package/dest/bench/client_flows/config.d.ts +1 -1
- package/dest/bench/client_flows/config.d.ts.map +1 -1
- package/dest/bench/client_flows/config.js +19 -0
- package/dest/bench/client_flows/data_extractor.d.ts.map +1 -1
- package/dest/bench/client_flows/data_extractor.js +23 -11
- package/dest/bench/utils.js +1 -3
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +4 -5
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +2 -6
- package/dest/fixtures/utils.d.ts +1 -2
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +10 -16
- package/dest/shared/capture_private_execution_steps.d.ts.map +1 -1
- package/dest/shared/capture_private_execution_steps.js +8 -4
- package/dest/shared/uniswap_l1_l2.js +1 -1
- package/package.json +34 -34
- package/src/bench/client_flows/client_flows_benchmark.ts +1 -1
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/client_flows/data_extractor.ts +37 -17
- package/src/bench/utils.ts +1 -1
- package/src/e2e_fees/fees_test.ts +4 -5
- package/src/e2e_p2p/shared.ts +2 -4
- package/src/fixtures/utils.ts +7 -19
- package/src/shared/capture_private_execution_steps.ts +9 -2
- package/src/shared/uniswap_l1_l2.ts +1 -1
|
@@ -218,7 +218,7 @@ export class ClientFlowsBenchmark {
|
|
|
218
218
|
async applyDeploySponsoredFPCSnapshot() {
|
|
219
219
|
await this.snapshotManager.snapshot('deploy_sponsored_fpc', async ()=>{
|
|
220
220
|
const sponsoredFPC = await setupSponsoredFPC(this.pxe);
|
|
221
|
-
this.logger.info(`SponsoredFPC
|
|
221
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
222
222
|
return {
|
|
223
223
|
sponsoredFPCAddress: sponsoredFPC.address
|
|
224
224
|
};
|
|
@@ -4,7 +4,7 @@ export type ClientFlowConfig = {
|
|
|
4
4
|
feePaymentMethods: BenchmarkingFeePaymentMethod[];
|
|
5
5
|
recursions?: number[];
|
|
6
6
|
};
|
|
7
|
-
type ClientFlows = 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
7
|
+
type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
8
8
|
export type ClientFlowsConfig = {
|
|
9
9
|
[key in ClientFlows]: ClientFlowConfig;
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE7F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;IAClD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE7F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;IAClD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,WAAW,GAAG,oBAAoB,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,KAAK,CAAC;AAE3F,MAAM,MAAM,iBAAiB,GAAG;KAC7B,GAAG,IAAI,WAAW,GAAG,gBAAgB;CACvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAsB9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAsB/B,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export const KEY_FLOWS_CONFIG = {
|
|
2
|
+
accountDeployments: {
|
|
3
|
+
accounts: [
|
|
4
|
+
'ecdsar1',
|
|
5
|
+
'schnorr'
|
|
6
|
+
],
|
|
7
|
+
feePaymentMethods: [
|
|
8
|
+
'sponsored_fpc'
|
|
9
|
+
]
|
|
10
|
+
},
|
|
2
11
|
deployments: {
|
|
3
12
|
accounts: [
|
|
4
13
|
'ecdsar1',
|
|
@@ -39,6 +48,16 @@ export const KEY_FLOWS_CONFIG = {
|
|
|
39
48
|
}
|
|
40
49
|
};
|
|
41
50
|
export const FULL_FLOWS_CONFIG = {
|
|
51
|
+
accountDeployments: {
|
|
52
|
+
accounts: [
|
|
53
|
+
'ecdsar1',
|
|
54
|
+
'schnorr'
|
|
55
|
+
],
|
|
56
|
+
feePaymentMethods: [
|
|
57
|
+
'bridged_fee_juice',
|
|
58
|
+
'sponsored_fpc'
|
|
59
|
+
]
|
|
60
|
+
},
|
|
42
61
|
deployments: {
|
|
43
62
|
accounts: [
|
|
44
63
|
'ecdsar1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_extractor.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/data_extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"data_extractor.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/data_extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAa9C,QAAA,MAAM,QAAQ,oFAAqF,CAAC;AACpG,KAAK,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAsBF,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IACrC,OAAO,CAAC,IAAI,CAAa;IAEzB,OAAO;IAEP,MAAM,CAAC,MAAM;IAIb,MAAM,CAAC,WAAW;IAIlB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAiBpC,OAAO,CAAC,SAAS;IAIV,SAAS;IAIT,OAAO;CAGf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
2
2
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
3
3
|
import { createLogger, logger } from '@aztec/foundation/log';
|
|
4
|
+
import { Timer } from '@aztec/foundation/timer';
|
|
4
5
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
5
6
|
import { Decoder } from 'msgpackr';
|
|
6
7
|
import assert from 'node:assert';
|
|
@@ -96,11 +97,11 @@ async function createProver(config = {}, log) {
|
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
function getMinimumTrace(logs
|
|
100
|
-
const minimumMessage = '
|
|
100
|
+
function getMinimumTrace(logs) {
|
|
101
|
+
const minimumMessage = 'Trace details:';
|
|
101
102
|
const minimumMessageIndex = logs.findIndex((log)=>log.message.includes(minimumMessage));
|
|
102
103
|
const candidateLogs = logs.slice(minimumMessageIndex - GATE_TYPES.length, minimumMessageIndex);
|
|
103
|
-
const traceLogs =
|
|
104
|
+
const traceLogs = candidateLogs.filter((log)=>GATE_TYPES.some((type)=>log.message.includes(type))).map((log)=>log.message.split(/\t|\n/)).flat().map((log)=>log.replace(/\(mem: .*\)/, '').trim()).filter(Boolean);
|
|
104
105
|
const traceSizes = traceLogs.map((log)=>{
|
|
105
106
|
const [gateType, gateSizeStr] = log.replace(/\n.*\)$/, '').replace(/bb - /, '').split(':').map((s)=>s.trim());
|
|
106
107
|
const gateSize = parseInt(gateSizeStr);
|
|
@@ -142,23 +143,29 @@ async function main() {
|
|
|
142
143
|
v
|
|
143
144
|
]));
|
|
144
145
|
});
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const privateExecutionSteps =
|
|
146
|
+
const profileFile = await readFile(join(ivcFolder, flow, 'profile.json'));
|
|
147
|
+
const profile = JSON.parse(profileFile.toString());
|
|
148
|
+
const privateExecutionSteps = profile.steps.map((step, i)=>({
|
|
148
149
|
functionName: step.fnName,
|
|
149
150
|
gateCount: step.gateCount,
|
|
150
151
|
bytecode: stepsFromFile[i].bytecode,
|
|
151
152
|
// TODO(AD) do we still want to take this from witness.json?
|
|
152
153
|
witness: witnessStack[i],
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
vk: stepsFromFile[i].vk,
|
|
155
|
+
timings: {
|
|
156
|
+
witgen: step.timings.witgen,
|
|
157
|
+
gateCount: step.timings.witgen
|
|
158
|
+
}
|
|
155
159
|
}));
|
|
156
160
|
let stats;
|
|
157
161
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
158
162
|
let error;
|
|
159
163
|
let currentLogs = [];
|
|
164
|
+
let provingTime;
|
|
160
165
|
try {
|
|
166
|
+
const provingTimer = new Timer();
|
|
161
167
|
await prover.createClientIvcProof(privateExecutionSteps);
|
|
168
|
+
provingTime = provingTimer.ms();
|
|
162
169
|
} catch (e) {
|
|
163
170
|
userLog.error(`Failed to generate client ivc proof for ${flow}`, e);
|
|
164
171
|
error = e.message;
|
|
@@ -169,20 +176,25 @@ async function main() {
|
|
|
169
176
|
if (!error) {
|
|
170
177
|
stats = currentLogs[0].data;
|
|
171
178
|
}
|
|
172
|
-
const minimumTrace = getMinimumTrace(currentLogs
|
|
173
|
-
const steps =
|
|
179
|
+
const minimumTrace = getMinimumTrace(currentLogs);
|
|
180
|
+
const steps = profile.steps.reduce((acc, step, i)=>{
|
|
174
181
|
const previousAccGateCount = i === 0 ? 0 : acc[i - 1].accGateCount;
|
|
175
182
|
return [
|
|
176
183
|
...acc,
|
|
177
184
|
{
|
|
178
185
|
fnName: step.fnName,
|
|
179
186
|
gateCount: step.gateCount,
|
|
180
|
-
accGateCount: previousAccGateCount + step.gateCount
|
|
187
|
+
accGateCount: previousAccGateCount + step.gateCount,
|
|
188
|
+
timings: {
|
|
189
|
+
witgen: step.timings.witgen
|
|
190
|
+
}
|
|
181
191
|
}
|
|
182
192
|
];
|
|
183
193
|
}, []);
|
|
184
194
|
const totalGateCount = steps[steps.length - 1].accGateCount;
|
|
185
195
|
const benchmark = {
|
|
196
|
+
syncTime: profile.syncTime,
|
|
197
|
+
provingTime,
|
|
186
198
|
proverType,
|
|
187
199
|
minimumTrace: minimumTrace,
|
|
188
200
|
totalGateCount,
|
package/dest/bench/utils.js
CHANGED
|
@@ -110,9 +110,7 @@ function getMetricValues(points) {
|
|
|
110
110
|
*/ export async function sendTxs(txCount, context, contract, heavyPublicCompute = false) {
|
|
111
111
|
const calls = times(txCount, (index)=>makeCall(index, context, contract, heavyPublicCompute));
|
|
112
112
|
context.logger.info(`Creating ${txCount} txs`);
|
|
113
|
-
const provenTxs = await Promise.all(calls.map((call)=>call.prove(
|
|
114
|
-
skipPublicSimulation: true
|
|
115
|
-
})));
|
|
113
|
+
const provenTxs = await Promise.all(calls.map((call)=>call.prove()));
|
|
116
114
|
context.logger.info(`Sending ${txCount} txs`);
|
|
117
115
|
return provenTxs.map((tx)=>tx.send());
|
|
118
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/fees_test.ts"],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OlB,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;IAuB1B,8BAA8B;IAuBvB,qBAAqB;IA4ErB,8BAA8B;IAoB9B,yBAAyB;IAWzB,gCAAgC;IAUhC,sBAAsB;CAgCpC"}
|
|
@@ -246,14 +246,13 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
246
246
|
await this.snapshotManager.snapshot('sponsored_fpc_setup', async (context)=>{
|
|
247
247
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
248
248
|
expect((await context.pxe.getContractMetadata(feeJuiceContract.address)).isContractPubliclyDeployed).toBe(true);
|
|
249
|
-
|
|
250
|
-
this.logger.info(`SponsoredFPC
|
|
249
|
+
const sponsoredFPC = await setupSponsoredFPC(context.pxe);
|
|
250
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
251
251
|
return {
|
|
252
|
-
sponsoredFPCAddress:
|
|
252
|
+
sponsoredFPCAddress: sponsoredFPC.address
|
|
253
253
|
};
|
|
254
254
|
}, async (data)=>{
|
|
255
|
-
|
|
256
|
-
this.sponsoredFPC = sponsoredFPC;
|
|
255
|
+
this.sponsoredFPC = await SponsoredFPCContract.at(data.sponsoredFPCAddress, this.aliceWallet);
|
|
257
256
|
});
|
|
258
257
|
}
|
|
259
258
|
async applyFundAliceWithBananas() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAA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,CAAC;IAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAqB9E"}
|
package/dest/e2e_p2p/shared.js
CHANGED
|
@@ -10,9 +10,7 @@ export const submitComplexTxsTo = async (logger, spamContract, numTxs, opts = {}
|
|
|
10
10
|
const seed = 1234n;
|
|
11
11
|
const spamCount = 15;
|
|
12
12
|
for(let i = 0; i < numTxs; i++){
|
|
13
|
-
const tx = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic).send(
|
|
14
|
-
skipPublicSimulation: true
|
|
15
|
-
});
|
|
13
|
+
const tx = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic).send();
|
|
16
14
|
const txHash = await tx.getTxHash();
|
|
17
15
|
logger.info(`Tx sent with hash ${txHash}`);
|
|
18
16
|
const receipt = await tx.getReceipt();
|
|
@@ -54,9 +52,7 @@ export async function createPXEServiceAndPrepareTransactions(logger, node, numTx
|
|
|
54
52
|
});
|
|
55
53
|
const contract = await TestContract.at(testContractInstance.address, wallet);
|
|
56
54
|
const txs = await timesAsync(numTxs, async ()=>{
|
|
57
|
-
const tx = await contract.methods.emit_nullifier(Fr.random()).prove(
|
|
58
|
-
skipPublicSimulation: true
|
|
59
|
-
});
|
|
55
|
+
const tx = await contract.methods.emit_nullifier(Fr.random()).prove();
|
|
60
56
|
const txHash = await tx.getTxHash();
|
|
61
57
|
logger.info(`Tx prepared with hash ${txHash}`);
|
|
62
58
|
return tx;
|
package/dest/fixtures/utils.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
11
11
|
import { Fr } from '@aztec/foundation/fields';
|
|
12
12
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
13
13
|
import type { DataStoreConfig } from '@aztec/kv-store/config';
|
|
14
|
-
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
15
14
|
import { type ProverNode, type ProverNodeConfig } from '@aztec/prover-node';
|
|
16
15
|
import { type PXEService, type PXEServiceConfig } from '@aztec/pxe/server';
|
|
17
16
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
@@ -159,7 +158,7 @@ export declare function getSponsoredFPCAddress(): Promise<AztecAddress>;
|
|
|
159
158
|
/**
|
|
160
159
|
* Deploy a sponsored FPC contract to a running instance.
|
|
161
160
|
*/
|
|
162
|
-
export declare function setupSponsoredFPC(pxe: PXE): Promise<
|
|
161
|
+
export declare function setupSponsoredFPC(pxe: PXE): Promise<import("@aztec/aztec.js").ContractInstanceWithAddress>;
|
|
163
162
|
export declare function waitForProvenChain(node: AztecNode, targetBlock?: number, timeoutSec?: number, intervalSec?: number): Promise<void>;
|
|
164
163
|
export declare function createAndSyncProverNode(proverNodePrivateKey: `0x${string}`, aztecNodeConfig: AztecNodeConfig, proverNodeConfig: Partial<ProverNodeConfig> & Pick<DataStoreConfig, 'dataDirectory'>, aztecNode: AztecNode, prefilledPublicData?: PublicDataTreeLeaf[]): Promise<ProverNode>;
|
|
165
164
|
export declare function createForwarderContract(aztecNodeConfig: AztecNodeConfig, privateKey: `0x${string}`, rollupAddress: Hex): Promise<ForwarderContract>;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":";;AACA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,y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a,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,kEAQ/C;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,SAAK,EAAE,WAAW,SAAI,iBAS/G;AAED,wBAAgB,uBAAuB,CACrC,oBAAoB,EAAE,KAAK,MAAM,EAAE,EACnC,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,EACpF,SAAS,EAAE,SAAS,EACpB,mBAAmB,GAAE,kBAAkB,EAAO,uBA6C/C;AAWD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,aAAa,EAAE,GAAG,8BAUnB"}
|
package/dest/fixtures/utils.js
CHANGED
|
@@ -2,14 +2,12 @@ import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
|
|
|
2
2
|
import { deployFundedSchnorrAccounts, generateSchnorrAccounts, getDeployedTestAccounts, getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
|
|
3
3
|
import { createArchiver } from '@aztec/archiver';
|
|
4
4
|
import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
5
|
-
import { BatchCall,
|
|
5
|
+
import { BatchCall, createAztecNodeClient, createLogger, createPXEClient, makeFetch, waitForPXE } from '@aztec/aztec.js';
|
|
6
6
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
7
|
-
import { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee/testing';
|
|
8
7
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
9
8
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
10
9
|
import { createBlobSinkServer } from '@aztec/blob-sink/server';
|
|
11
10
|
import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
12
|
-
import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multicall';
|
|
13
11
|
import { ForwarderContract, NULL_KEY, createExtendedL1Client, deployL1Contracts, getL1ContractsConfigEnvVars, isAnvilTestChain, l1Artifacts } from '@aztec/ethereum';
|
|
14
12
|
import { DelayedTxUtils, EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
15
13
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
@@ -500,19 +498,15 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
500
498
|
/**
|
|
501
499
|
* Deploy a sponsored FPC contract to a running instance.
|
|
502
500
|
*/ export async function setupSponsoredFPC(pxe) {
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
}).deployed();
|
|
514
|
-
getLogger().info(`SponsoredFPC: ${deployed.address}`);
|
|
515
|
-
return deployed;
|
|
501
|
+
const instance = await getContractInstanceFromDeployParams(SponsoredFPCContract.artifact, {
|
|
502
|
+
salt: new Fr(SPONSORED_FPC_SALT)
|
|
503
|
+
});
|
|
504
|
+
await pxe.registerContract({
|
|
505
|
+
instance,
|
|
506
|
+
artifact: SponsoredFPCContract.artifact
|
|
507
|
+
});
|
|
508
|
+
getLogger().info(`SponsoredFPC: ${instance.address}`);
|
|
509
|
+
return instance;
|
|
516
510
|
}
|
|
517
511
|
export async function waitForProvenChain(node, targetBlock, timeoutSec = 60, intervalSec = 1) {
|
|
518
512
|
targetBlock ??= await node.getBlockNumber();
|
|
@@ -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;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,
|
|
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,iBA6CvB"}
|
|
@@ -34,10 +34,14 @@ export async function capturePrivateExecutionStepsIfEnvSet(label, interaction, o
|
|
|
34
34
|
await fs.writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
35
35
|
if (profileMode === 'full') {
|
|
36
36
|
// If we have gate counts, write the steps in human-readable format.
|
|
37
|
-
await fs.writeFile(path.join(resultsDirectory, '
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
await fs.writeFile(path.join(resultsDirectory, 'profile.json'), JSON.stringify({
|
|
38
|
+
syncTime: result.syncTime,
|
|
39
|
+
steps: result.executionSteps.map((step)=>({
|
|
40
|
+
fnName: step.functionName,
|
|
41
|
+
gateCount: step.gateCount,
|
|
42
|
+
timings: step.timings
|
|
43
|
+
}))
|
|
44
|
+
}, null, 2));
|
|
41
45
|
// In full mode, we also write the raw witnesses in a more human-readable format.
|
|
42
46
|
await fs.writeFile(path.join(resultsDirectory, 'witnesses.json'), JSON.stringify(result.executionSteps.map((step)=>Object.fromEntries(step.witness))));
|
|
43
47
|
}
|
|
@@ -438,7 +438,7 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
|
|
|
438
438
|
chainId: ownerWallet.getChainId(),
|
|
439
439
|
version: ownerWallet.getVersion()
|
|
440
440
|
});
|
|
441
|
-
await expect(uniswapL2Contract.methods.swap_private(wethCrossChainHarness.l2Token.address, wethCrossChainHarness.l2Bridge.address, wethAmountToBridge, daiCrossChainHarness.l2Bridge.address, nonceForWETHTransferToPublicApproval, uniswapFeeTier, minimumOutputAmount, Fr.random(), ownerEthAddress).
|
|
441
|
+
await expect(uniswapL2Contract.methods.swap_private(wethCrossChainHarness.l2Token.address, wethCrossChainHarness.l2Bridge.address, wethAmountToBridge, daiCrossChainHarness.l2Bridge.address, nonceForWETHTransferToPublicApproval, uniswapFeeTier, minimumOutputAmount, Fr.random(), ownerEthAddress).simulate()).rejects.toThrow(`Unknown auth witness for message hash ${expectedMessageHash.toString()}`);
|
|
442
442
|
});
|
|
443
443
|
it("can't swap if user passes a token different to what the bridge tracks", async ()=>{
|
|
444
444
|
// 1. give user private funds on L2:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.86.0-nightly.
|
|
3
|
+
"version": "0.86.0-nightly.20250507",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,39 +25,39 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "0.86.0-nightly.
|
|
29
|
-
"@aztec/archiver": "0.86.0-nightly.
|
|
30
|
-
"@aztec/aztec": "0.86.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "0.86.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "0.86.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "0.86.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "0.86.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "0.86.0-nightly.
|
|
36
|
-
"@aztec/bot": "0.86.0-nightly.
|
|
37
|
-
"@aztec/cli": "0.86.0-nightly.
|
|
38
|
-
"@aztec/constants": "0.86.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "0.86.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "0.86.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "0.86.0-nightly.
|
|
42
|
-
"@aztec/foundation": "0.86.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "0.86.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "0.86.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "0.86.0-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "0.86.0-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "0.86.0-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "0.86.0-nightly.
|
|
49
|
-
"@aztec/noir-test-contracts.js": "0.86.0-nightly.
|
|
50
|
-
"@aztec/p2p": "0.86.0-nightly.
|
|
51
|
-
"@aztec/protocol-contracts": "0.86.0-nightly.
|
|
52
|
-
"@aztec/prover-client": "0.86.0-nightly.
|
|
53
|
-
"@aztec/prover-node": "0.86.0-nightly.
|
|
54
|
-
"@aztec/pxe": "0.86.0-nightly.
|
|
55
|
-
"@aztec/sequencer-client": "0.86.0-nightly.
|
|
56
|
-
"@aztec/simulator": "0.86.0-nightly.
|
|
57
|
-
"@aztec/stdlib": "0.86.0-nightly.
|
|
58
|
-
"@aztec/telemetry-client": "0.86.0-nightly.
|
|
59
|
-
"@aztec/validator-client": "0.86.0-nightly.
|
|
60
|
-
"@aztec/world-state": "0.86.0-nightly.
|
|
28
|
+
"@aztec/accounts": "0.86.0-nightly.20250507",
|
|
29
|
+
"@aztec/archiver": "0.86.0-nightly.20250507",
|
|
30
|
+
"@aztec/aztec": "0.86.0-nightly.20250507",
|
|
31
|
+
"@aztec/aztec-node": "0.86.0-nightly.20250507",
|
|
32
|
+
"@aztec/aztec.js": "0.86.0-nightly.20250507",
|
|
33
|
+
"@aztec/bb-prover": "0.86.0-nightly.20250507",
|
|
34
|
+
"@aztec/blob-lib": "0.86.0-nightly.20250507",
|
|
35
|
+
"@aztec/blob-sink": "0.86.0-nightly.20250507",
|
|
36
|
+
"@aztec/bot": "0.86.0-nightly.20250507",
|
|
37
|
+
"@aztec/cli": "0.86.0-nightly.20250507",
|
|
38
|
+
"@aztec/constants": "0.86.0-nightly.20250507",
|
|
39
|
+
"@aztec/entrypoints": "0.86.0-nightly.20250507",
|
|
40
|
+
"@aztec/epoch-cache": "0.86.0-nightly.20250507",
|
|
41
|
+
"@aztec/ethereum": "0.86.0-nightly.20250507",
|
|
42
|
+
"@aztec/foundation": "0.86.0-nightly.20250507",
|
|
43
|
+
"@aztec/kv-store": "0.86.0-nightly.20250507",
|
|
44
|
+
"@aztec/l1-artifacts": "0.86.0-nightly.20250507",
|
|
45
|
+
"@aztec/merkle-tree": "0.86.0-nightly.20250507",
|
|
46
|
+
"@aztec/noir-contracts.js": "0.86.0-nightly.20250507",
|
|
47
|
+
"@aztec/noir-noirc_abi": "0.86.0-nightly.20250507",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "0.86.0-nightly.20250507",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "0.86.0-nightly.20250507",
|
|
50
|
+
"@aztec/p2p": "0.86.0-nightly.20250507",
|
|
51
|
+
"@aztec/protocol-contracts": "0.86.0-nightly.20250507",
|
|
52
|
+
"@aztec/prover-client": "0.86.0-nightly.20250507",
|
|
53
|
+
"@aztec/prover-node": "0.86.0-nightly.20250507",
|
|
54
|
+
"@aztec/pxe": "0.86.0-nightly.20250507",
|
|
55
|
+
"@aztec/sequencer-client": "0.86.0-nightly.20250507",
|
|
56
|
+
"@aztec/simulator": "0.86.0-nightly.20250507",
|
|
57
|
+
"@aztec/stdlib": "0.86.0-nightly.20250507",
|
|
58
|
+
"@aztec/telemetry-client": "0.86.0-nightly.20250507",
|
|
59
|
+
"@aztec/validator-client": "0.86.0-nightly.20250507",
|
|
60
|
+
"@aztec/world-state": "0.86.0-nightly.20250507",
|
|
61
61
|
"@iarna/toml": "^2.2.5",
|
|
62
62
|
"@jest/globals": "^29.5.0",
|
|
63
63
|
"@noble/curves": "^1.0.0",
|
|
@@ -303,7 +303,7 @@ export class ClientFlowsBenchmark {
|
|
|
303
303
|
'deploy_sponsored_fpc',
|
|
304
304
|
async () => {
|
|
305
305
|
const sponsoredFPC = await setupSponsoredFPC(this.pxe);
|
|
306
|
-
this.logger.info(`SponsoredFPC
|
|
306
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
307
307
|
return { sponsoredFPCAddress: sponsoredFPC.address };
|
|
308
308
|
},
|
|
309
309
|
async ({ sponsoredFPCAddress }) => {
|
|
@@ -6,13 +6,17 @@ export type ClientFlowConfig = {
|
|
|
6
6
|
recursions?: number[];
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
type ClientFlows = 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
9
|
+
type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
10
10
|
|
|
11
11
|
export type ClientFlowsConfig = {
|
|
12
12
|
[key in ClientFlows]: ClientFlowConfig;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const KEY_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
16
|
+
accountDeployments: {
|
|
17
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
18
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
19
|
+
},
|
|
16
20
|
deployments: {
|
|
17
21
|
accounts: ['ecdsar1', 'schnorr'],
|
|
18
22
|
feePaymentMethods: ['sponsored_fpc'],
|
|
@@ -33,6 +37,10 @@ export const KEY_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
40
|
+
accountDeployments: {
|
|
41
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
42
|
+
feePaymentMethods: ['bridged_fee_juice', 'sponsored_fpc'],
|
|
43
|
+
},
|
|
36
44
|
deployments: {
|
|
37
45
|
accounts: ['ecdsar1', 'schnorr'],
|
|
38
46
|
feePaymentMethods: ['bridged_fee_juice', 'sponsored_fpc'],
|
|
@@ -2,6 +2,7 @@ import type { Logger } from '@aztec/aztec.js';
|
|
|
2
2
|
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
3
3
|
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
4
4
|
import { createLogger, logger } from '@aztec/foundation/log';
|
|
5
|
+
import { Timer } from '@aztec/foundation/timer';
|
|
5
6
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
6
7
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
7
8
|
|
|
@@ -105,18 +106,18 @@ async function createProver(config: NativeProverConfig = {}, log: Logger) {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
function getMinimumTrace(logs: Log[]
|
|
109
|
-
const minimumMessage = '
|
|
109
|
+
function getMinimumTrace(logs: Log[]): StructuredTrace {
|
|
110
|
+
const minimumMessage = 'Trace details:';
|
|
110
111
|
const minimumMessageIndex = logs.findIndex(log => log.message.includes(minimumMessage));
|
|
111
112
|
const candidateLogs = logs.slice(minimumMessageIndex - GATE_TYPES.length, minimumMessageIndex);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
|
|
114
|
+
const traceLogs = candidateLogs
|
|
115
|
+
.filter(log => GATE_TYPES.some(type => log.message.includes(type)))
|
|
116
|
+
.map(log => log.message.split(/\t|\n/))
|
|
117
|
+
.flat()
|
|
118
|
+
.map(log => log.replace(/\(mem: .*\)/, '').trim())
|
|
119
|
+
.filter(Boolean);
|
|
120
|
+
|
|
120
121
|
const traceSizes = traceLogs.map(log => {
|
|
121
122
|
const [gateType, gateSizeStr] = log
|
|
122
123
|
.replace(/\n.*\)$/, '')
|
|
@@ -127,6 +128,7 @@ function getMinimumTrace(logs: Log[], proverType: ProverType): StructuredTrace {
|
|
|
127
128
|
assert(GATE_TYPES.includes(gateType as GateType), `Gate type ${gateType} is not recognized`);
|
|
128
129
|
return { [gateType]: gateSize };
|
|
129
130
|
});
|
|
131
|
+
|
|
130
132
|
assert(traceSizes.length === GATE_TYPES.length, 'Decoded trace sizes do not match expected amount of gate types');
|
|
131
133
|
return traceSizes.reduce((acc, curr) => ({ ...acc, ...curr }), {}) as StructuredTrace;
|
|
132
134
|
}
|
|
@@ -156,23 +158,36 @@ async function main() {
|
|
|
156
158
|
const witnessStack = JSON.parse(witnesses.toString()).map((witnessMap: Record<string, string>) => {
|
|
157
159
|
return new Map<number, string>(Object.entries(witnessMap).map(([k, v]) => [Number(k), v]));
|
|
158
160
|
});
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
|
|
161
|
+
const profileFile = await readFile(join(ivcFolder, flow, 'profile.json'));
|
|
162
|
+
const profile = JSON.parse(profileFile.toString()) as {
|
|
163
|
+
syncTime: number;
|
|
164
|
+
steps: {
|
|
165
|
+
fnName: string;
|
|
166
|
+
gateCount: number;
|
|
167
|
+
timings: { witgen: number; gateCount: number };
|
|
168
|
+
}[];
|
|
169
|
+
};
|
|
170
|
+
const privateExecutionSteps: PrivateExecutionStep[] = profile.steps.map((step, i) => ({
|
|
162
171
|
functionName: step.fnName,
|
|
163
172
|
gateCount: step.gateCount,
|
|
164
173
|
bytecode: stepsFromFile[i].bytecode,
|
|
165
174
|
// TODO(AD) do we still want to take this from witness.json?
|
|
166
175
|
witness: witnessStack[i],
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
vk: stepsFromFile[i].vk,
|
|
177
|
+
timings: {
|
|
178
|
+
witgen: step.timings.witgen,
|
|
179
|
+
gateCount: step.timings.witgen,
|
|
180
|
+
},
|
|
169
181
|
}));
|
|
170
182
|
let stats: { duration: number; eventName: string; proofSize: number } | undefined;
|
|
171
183
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
172
184
|
let error: any | undefined;
|
|
173
185
|
let currentLogs: Log[] = [];
|
|
186
|
+
let provingTime;
|
|
174
187
|
try {
|
|
188
|
+
const provingTimer = new Timer();
|
|
175
189
|
await prover.createClientIvcProof(privateExecutionSteps);
|
|
190
|
+
provingTime = provingTimer.ms();
|
|
176
191
|
} catch (e) {
|
|
177
192
|
userLog.error(`Failed to generate client ivc proof for ${flow}`, e);
|
|
178
193
|
error = (e as Error).message;
|
|
@@ -185,9 +200,9 @@ async function main() {
|
|
|
185
200
|
stats = currentLogs[0].data as { duration: number; eventName: string; proofSize: number };
|
|
186
201
|
}
|
|
187
202
|
|
|
188
|
-
const minimumTrace = getMinimumTrace(currentLogs
|
|
203
|
+
const minimumTrace = getMinimumTrace(currentLogs);
|
|
189
204
|
|
|
190
|
-
const steps =
|
|
205
|
+
const steps = profile.steps.reduce<Step[]>((acc, step, i) => {
|
|
191
206
|
const previousAccGateCount = i === 0 ? 0 : acc[i - 1].accGateCount!;
|
|
192
207
|
return [
|
|
193
208
|
...acc,
|
|
@@ -195,11 +210,16 @@ async function main() {
|
|
|
195
210
|
fnName: step.fnName,
|
|
196
211
|
gateCount: step.gateCount,
|
|
197
212
|
accGateCount: previousAccGateCount + step.gateCount,
|
|
213
|
+
timings: {
|
|
214
|
+
witgen: step.timings.witgen,
|
|
215
|
+
},
|
|
198
216
|
},
|
|
199
217
|
];
|
|
200
218
|
}, []);
|
|
201
219
|
const totalGateCount = steps[steps.length - 1].accGateCount;
|
|
202
220
|
const benchmark = {
|
|
221
|
+
syncTime: profile.syncTime,
|
|
222
|
+
provingTime,
|
|
203
223
|
proverType,
|
|
204
224
|
minimumTrace: minimumTrace,
|
|
205
225
|
totalGateCount,
|
package/src/bench/utils.ts
CHANGED
|
@@ -136,7 +136,7 @@ export async function sendTxs(
|
|
|
136
136
|
): Promise<SentTx[]> {
|
|
137
137
|
const calls = times(txCount, index => makeCall(index, context, contract, heavyPublicCompute));
|
|
138
138
|
context.logger.info(`Creating ${txCount} txs`);
|
|
139
|
-
const provenTxs = await Promise.all(calls.map(call => call.prove(
|
|
139
|
+
const provenTxs = await Promise.all(calls.map(call => call.prove()));
|
|
140
140
|
context.logger.info(`Sending ${txCount} txs`);
|
|
141
141
|
return provenTxs.map(tx => tx.send());
|
|
142
142
|
}
|
|
@@ -349,16 +349,15 @@ export class FeesTest {
|
|
|
349
349
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
350
350
|
expect((await context.pxe.getContractMetadata(feeJuiceContract.address)).isContractPubliclyDeployed).toBe(true);
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
this.logger.info(`SponsoredFPC
|
|
352
|
+
const sponsoredFPC = await setupSponsoredFPC(context.pxe);
|
|
353
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
354
354
|
|
|
355
355
|
return {
|
|
356
|
-
sponsoredFPCAddress:
|
|
356
|
+
sponsoredFPCAddress: sponsoredFPC.address,
|
|
357
357
|
};
|
|
358
358
|
},
|
|
359
359
|
async data => {
|
|
360
|
-
|
|
361
|
-
this.sponsoredFPC = sponsoredFPC;
|
|
360
|
+
this.sponsoredFPC = await SponsoredFPCContract.at(data.sponsoredFPCAddress, this.aliceWallet);
|
|
362
361
|
},
|
|
363
362
|
);
|
|
364
363
|
}
|
package/src/e2e_p2p/shared.ts
CHANGED
|
@@ -22,9 +22,7 @@ export const submitComplexTxsTo = async (
|
|
|
22
22
|
const seed = 1234n;
|
|
23
23
|
const spamCount = 15;
|
|
24
24
|
for (let i = 0; i < numTxs; i++) {
|
|
25
|
-
const tx = spamContract.methods
|
|
26
|
-
.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic)
|
|
27
|
-
.send({ skipPublicSimulation: true });
|
|
25
|
+
const tx = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic).send();
|
|
28
26
|
const txHash = await tx.getTxHash();
|
|
29
27
|
|
|
30
28
|
logger.info(`Tx sent with hash ${txHash}`);
|
|
@@ -84,7 +82,7 @@ export async function createPXEServiceAndPrepareTransactions(
|
|
|
84
82
|
const contract = await TestContract.at(testContractInstance.address, wallet);
|
|
85
83
|
|
|
86
84
|
const txs = await timesAsync(numTxs, async () => {
|
|
87
|
-
const tx = await contract.methods.emit_nullifier(Fr.random()).prove(
|
|
85
|
+
const tx = await contract.methods.emit_nullifier(Fr.random()).prove();
|
|
88
86
|
const txHash = await tx.getTxHash();
|
|
89
87
|
logger.info(`Tx prepared with hash ${txHash}`);
|
|
90
88
|
return tx;
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
type ContractMethod,
|
|
17
17
|
type Logger,
|
|
18
18
|
type PXE,
|
|
19
|
-
SignerlessWallet,
|
|
20
19
|
type Wallet,
|
|
21
20
|
createAztecNodeClient,
|
|
22
21
|
createLogger,
|
|
@@ -25,12 +24,10 @@ import {
|
|
|
25
24
|
waitForPXE,
|
|
26
25
|
} from '@aztec/aztec.js';
|
|
27
26
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
28
|
-
import { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee/testing';
|
|
29
27
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
30
28
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
31
29
|
import { type BlobSinkServer, createBlobSinkServer } from '@aztec/blob-sink/server';
|
|
32
30
|
import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
33
|
-
import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multicall';
|
|
34
31
|
import {
|
|
35
32
|
type DeployL1ContractsArgs,
|
|
36
33
|
type DeployL1ContractsReturnType,
|
|
@@ -752,22 +749,13 @@ export async function getSponsoredFPCAddress() {
|
|
|
752
749
|
* Deploy a sponsored FPC contract to a running instance.
|
|
753
750
|
*/
|
|
754
751
|
export async function setupSponsoredFPC(pxe: PXE) {
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
.send({
|
|
763
|
-
contractAddressSalt: new Fr(SPONSORED_FPC_SALT),
|
|
764
|
-
universalDeploy: true,
|
|
765
|
-
fee: { paymentMethod },
|
|
766
|
-
})
|
|
767
|
-
.deployed();
|
|
768
|
-
|
|
769
|
-
getLogger().info(`SponsoredFPC: ${deployed.address}`);
|
|
770
|
-
return deployed;
|
|
752
|
+
const instance = await getContractInstanceFromDeployParams(SponsoredFPCContract.artifact, {
|
|
753
|
+
salt: new Fr(SPONSORED_FPC_SALT),
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
await pxe.registerContract({ instance, artifact: SponsoredFPCContract.artifact });
|
|
757
|
+
getLogger().info(`SponsoredFPC: ${instance.address}`);
|
|
758
|
+
return instance;
|
|
771
759
|
}
|
|
772
760
|
|
|
773
761
|
export async function waitForProvenChain(node: AztecNode, targetBlock?: number, timeoutSec = 60, intervalSec = 1) {
|
|
@@ -44,9 +44,16 @@ export async function capturePrivateExecutionStepsIfEnvSet(
|
|
|
44
44
|
if (profileMode === 'full') {
|
|
45
45
|
// If we have gate counts, write the steps in human-readable format.
|
|
46
46
|
await fs.writeFile(
|
|
47
|
-
path.join(resultsDirectory, '
|
|
47
|
+
path.join(resultsDirectory, 'profile.json'),
|
|
48
48
|
JSON.stringify(
|
|
49
|
-
|
|
49
|
+
{
|
|
50
|
+
syncTime: result.syncTime,
|
|
51
|
+
steps: result.executionSteps.map(step => ({
|
|
52
|
+
fnName: step.functionName,
|
|
53
|
+
gateCount: step.gateCount,
|
|
54
|
+
timings: step.timings,
|
|
55
|
+
})),
|
|
56
|
+
},
|
|
50
57
|
null,
|
|
51
58
|
2,
|
|
52
59
|
),
|