@aztec/end-to-end 0.0.0-test.1 → 0.0.1-commit.24de95ac
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/benchmark.d.ts +61 -0
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/benchmark.js +261 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +73 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/client_flows_benchmark.js +311 -0
- package/dest/bench/client_flows/config.d.ts +14 -0
- package/dest/bench/client_flows/config.d.ts.map +1 -0
- package/dest/bench/client_flows/config.js +106 -0
- package/dest/bench/client_flows/data_extractor.d.ts +2 -0
- package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
- package/dest/bench/client_flows/data_extractor.js +99 -0
- package/dest/bench/utils.d.ts +10 -36
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +26 -66
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +20 -12
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +85 -57
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +18 -24
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +48 -69
- package/dest/e2e_deploy_contract/deploy_test.d.ts +14 -6
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +13 -19
- package/dest/e2e_epochs/epochs_test.d.ts +58 -17
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +224 -43
- package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
- package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
- package/dest/e2e_fees/bridging_race.notest.js +63 -0
- package/dest/e2e_fees/fees_test.d.ts +20 -9
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +98 -107
- package/dest/e2e_l1_publisher/write_json.d.ts +10 -0
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
- package/dest/e2e_l1_publisher/write_json.js +57 -0
- package/dest/e2e_multi_validator/utils.d.ts +12 -0
- package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
- package/dest/e2e_multi_validator/utils.js +214 -0
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +9 -6
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +22 -19
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
- package/dest/e2e_p2p/inactivity_slash_test.js +135 -0
- package/dest/e2e_p2p/p2p_network.d.ts +69 -22
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +180 -129
- package/dest/e2e_p2p/shared.d.ts +41 -5
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +163 -19
- package/dest/e2e_token_contract/token_contract_test.d.ts +11 -5
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +50 -26
- package/dest/{e2e_prover → fixtures}/e2e_prover_test.d.ts +14 -9
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
- package/dest/{e2e_prover → fixtures}/e2e_prover_test.js +95 -100
- package/dest/fixtures/fixtures.d.ts +5 -6
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +4 -3
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_acvm_config.js +2 -14
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +10 -17
- package/dest/fixtures/l1_to_l2_messaging.d.ts +8 -5
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +44 -18
- package/dest/fixtures/setup_l1_contracts.d.ts +3 -3
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +4 -4
- package/dest/fixtures/setup_p2p_test.d.ts +14 -13
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +73 -21
- package/dest/fixtures/snapshot_manager.d.ts +15 -7
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +147 -121
- package/dest/fixtures/token_utils.d.ts +6 -3
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +23 -10
- package/dest/fixtures/utils.d.ts +76 -37
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +464 -368
- package/dest/fixtures/web3signer.d.ts +5 -0
- package/dest/fixtures/web3signer.d.ts.map +1 -0
- package/dest/fixtures/web3signer.js +53 -0
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +41 -25
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +104 -50
- package/dest/shared/gas_portal_test_harness.d.ts +32 -24
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +50 -29
- package/dest/shared/jest_setup.js +1 -1
- package/dest/shared/submit-transactions.d.ts +5 -3
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +8 -7
- package/dest/shared/uniswap_l1_l2.d.ts +13 -11
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +138 -108
- package/dest/simulators/lending_simulator.d.ts +6 -6
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +13 -16
- package/dest/simulators/token_simulator.d.ts +5 -2
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +16 -13
- package/dest/spartan/setup_test_wallets.d.ts +23 -10
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +167 -58
- package/dest/spartan/utils.d.ts +106 -303
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +434 -130
- package/package.json +61 -56
- package/src/bench/client_flows/benchmark.ts +341 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +402 -0
- package/src/bench/client_flows/config.ts +61 -0
- package/src/bench/client_flows/data_extractor.ts +111 -0
- package/src/bench/utils.ts +22 -76
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +80 -77
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +63 -105
- package/src/e2e_deploy_contract/deploy_test.ts +23 -38
- package/src/e2e_epochs/epochs_test.ts +274 -54
- package/src/e2e_fees/bridging_race.notest.ts +80 -0
- package/src/e2e_fees/fees_test.ts +137 -136
- package/src/e2e_l1_publisher/write_json.ts +76 -0
- package/src/e2e_multi_validator/utils.ts +258 -0
- package/src/e2e_nested_contract/nested_contract_test.ts +27 -18
- package/src/e2e_p2p/inactivity_slash_test.ts +178 -0
- package/src/e2e_p2p/p2p_network.ts +272 -166
- package/src/e2e_p2p/shared.ts +244 -29
- package/src/e2e_token_contract/token_contract_test.ts +43 -39
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/{e2e_prover → fixtures}/e2e_prover_test.ts +101 -145
- package/src/fixtures/fixtures.ts +4 -3
- package/src/fixtures/get_acvm_config.ts +3 -11
- package/src/fixtures/get_bb_config.ts +18 -13
- package/src/fixtures/l1_to_l2_messaging.ts +53 -23
- package/src/fixtures/setup_l1_contracts.ts +6 -7
- package/src/fixtures/setup_p2p_test.ts +112 -38
- package/src/fixtures/snapshot_manager.ts +187 -139
- package/src/fixtures/token_utils.ts +29 -12
- package/src/fixtures/utils.ts +552 -425
- package/src/fixtures/web3signer.ts +63 -0
- package/src/guides/up_quick_start.sh +6 -14
- package/src/quality_of_service/alert_checker.ts +1 -1
- package/src/shared/cross_chain_test_harness.ts +108 -79
- package/src/shared/gas_portal_test_harness.ts +58 -49
- package/src/shared/jest_setup.ts +1 -1
- package/src/shared/submit-transactions.ts +12 -8
- package/src/shared/uniswap_l1_l2.ts +173 -176
- package/src/simulators/lending_simulator.ts +12 -15
- package/src/simulators/token_simulator.ts +21 -13
- package/src/spartan/DEVELOP.md +121 -0
- package/src/spartan/setup_test_wallets.ts +215 -93
- package/src/spartan/utils.ts +490 -130
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
- package/dest/sample-dapp/connect.js +0 -12
- package/dest/sample-dapp/contracts.js +0 -10
- package/dest/sample-dapp/deploy.js +0 -35
- package/dest/sample-dapp/index.js +0 -98
- package/src/sample-dapp/connect.mjs +0 -16
- package/src/sample-dapp/contracts.mjs +0 -14
- package/src/sample-dapp/deploy.mjs +0 -40
- package/src/sample-dapp/index.mjs +0 -128
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
|
|
3
|
+
import { PrivateFeePaymentMethod, SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
4
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
5
|
+
import { RollupContract, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
|
|
6
|
+
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
7
|
+
import { randomBytes } from '@aztec/foundation/crypto';
|
|
8
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
10
|
+
import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
11
|
+
import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
|
|
12
|
+
import { AMMContract } from '@aztec/noir-contracts.js/AMM';
|
|
13
|
+
import { FPCContract } from '@aztec/noir-contracts.js/FPC';
|
|
14
|
+
import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
|
|
15
|
+
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
16
|
+
import { TokenContract as BananaCoin, TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
17
|
+
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
18
|
+
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
19
|
+
import { getPXEConfig } from '@aztec/pxe/server';
|
|
20
|
+
import { GasSettings } from '@aztec/stdlib/gas';
|
|
21
|
+
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
22
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
23
|
+
import { MNEMONIC } from '../../fixtures/fixtures.js';
|
|
24
|
+
import { createSnapshotManager, deployAccounts } from '../../fixtures/snapshot_manager.js';
|
|
25
|
+
import { mintTokensToPrivate } from '../../fixtures/token_utils.js';
|
|
26
|
+
import { setupSponsoredFPC } from '../../fixtures/utils.js';
|
|
27
|
+
import { CrossChainTestHarness } from '../../shared/cross_chain_test_harness.js';
|
|
28
|
+
import { FeeJuicePortalTestingHarnessFactory } from '../../shared/gas_portal_test_harness.js';
|
|
29
|
+
import { ProxyLogger } from './benchmark.js';
|
|
30
|
+
import { FULL_FLOWS_CONFIG, KEY_FLOWS_CONFIG } from './config.js';
|
|
31
|
+
const { E2E_DATA_PATH: dataPath, BENCHMARK_CONFIG } = process.env;
|
|
32
|
+
export class ClientFlowsBenchmark {
|
|
33
|
+
snapshotManager;
|
|
34
|
+
logger;
|
|
35
|
+
aztecNode;
|
|
36
|
+
cheatCodes;
|
|
37
|
+
context;
|
|
38
|
+
chainMonitor;
|
|
39
|
+
feeJuiceBridgeTestHarness;
|
|
40
|
+
adminWallet;
|
|
41
|
+
// The admin that aids in the setup of the test
|
|
42
|
+
adminAddress;
|
|
43
|
+
// Aztec Node config
|
|
44
|
+
sequencerAddress;
|
|
45
|
+
coinbase;
|
|
46
|
+
// Contracts
|
|
47
|
+
feeJuiceContract;
|
|
48
|
+
// Asset in which fees are paid via FPC
|
|
49
|
+
bananaCoin;
|
|
50
|
+
bananaFPC;
|
|
51
|
+
// Random asset we want to trade
|
|
52
|
+
candyBarCoin;
|
|
53
|
+
// AMM contract
|
|
54
|
+
amm;
|
|
55
|
+
// Liquidity token for AMM
|
|
56
|
+
liquidityToken;
|
|
57
|
+
// Sponsored FPC contract
|
|
58
|
+
sponsoredFPC;
|
|
59
|
+
// PXE and Wallet used by the benchmarking user. It can be set up with client-side proving enabled
|
|
60
|
+
userWallet;
|
|
61
|
+
realProofs = [
|
|
62
|
+
'true',
|
|
63
|
+
'1'
|
|
64
|
+
].includes(process.env.REAL_PROOFS ?? '');
|
|
65
|
+
paymentMethods = {
|
|
66
|
+
// eslint-disable-next-line camelcase
|
|
67
|
+
bridged_fee_juice: {
|
|
68
|
+
forWallet: this.getBridgedFeeJuicePaymentMethodForWallet.bind(this),
|
|
69
|
+
circuits: 2
|
|
70
|
+
},
|
|
71
|
+
// eslint-disable-next-line camelcase
|
|
72
|
+
private_fpc: {
|
|
73
|
+
forWallet: this.getPrivateFPCPaymentMethodForWallet.bind(this),
|
|
74
|
+
circuits: 2 + // FPC entrypoint + kernel inner
|
|
75
|
+
2 + // BananaCoin transfer_to_public + kernel inner
|
|
76
|
+
2 + // Account verify_private_authwit + kernel inner
|
|
77
|
+
2
|
|
78
|
+
},
|
|
79
|
+
// eslint-disable-next-line camelcase
|
|
80
|
+
sponsored_fpc: {
|
|
81
|
+
forWallet: this.getSponsoredFPCPaymentMethodForWallet.bind(this),
|
|
82
|
+
circuits: 2
|
|
83
|
+
},
|
|
84
|
+
// eslint-disable-next-line camelcase
|
|
85
|
+
fee_juice: {
|
|
86
|
+
forWallet: ()=>Promise.resolve(undefined),
|
|
87
|
+
circuits: 0
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
config;
|
|
91
|
+
proxyLogger;
|
|
92
|
+
constructor(testName, setupOptions = {}){
|
|
93
|
+
this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
|
|
94
|
+
this.snapshotManager = createSnapshotManager(`bench_client_flows${testName ? `/${testName}` : ''}`, dataPath, {
|
|
95
|
+
startProverNode: true,
|
|
96
|
+
...setupOptions
|
|
97
|
+
}, {
|
|
98
|
+
...setupOptions
|
|
99
|
+
});
|
|
100
|
+
this.config = BENCHMARK_CONFIG === 'key_flows' ? KEY_FLOWS_CONFIG : FULL_FLOWS_CONFIG;
|
|
101
|
+
ProxyLogger.create();
|
|
102
|
+
this.proxyLogger = ProxyLogger.getInstance();
|
|
103
|
+
}
|
|
104
|
+
async setup() {
|
|
105
|
+
const context = await this.snapshotManager.setup();
|
|
106
|
+
await context.aztecNode.setConfig({
|
|
107
|
+
feeRecipient: this.sequencerAddress,
|
|
108
|
+
coinbase: this.coinbase
|
|
109
|
+
});
|
|
110
|
+
const rollupContract = RollupContract.getFromConfig(context.aztecNodeConfig);
|
|
111
|
+
this.chainMonitor = new ChainMonitor(rollupContract, context.dateProvider, this.logger, 200).start();
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
async teardown() {
|
|
115
|
+
await this.chainMonitor.stop();
|
|
116
|
+
await this.snapshotManager.teardown();
|
|
117
|
+
}
|
|
118
|
+
async mintAndBridgeFeeJuice(address) {
|
|
119
|
+
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(address);
|
|
120
|
+
const { claimSecret: secret, messageLeafIndex: index } = claim;
|
|
121
|
+
await this.feeJuiceContract.methods.claim(address, claim.claimAmount, secret, index).send({
|
|
122
|
+
from: this.adminAddress
|
|
123
|
+
}).wait();
|
|
124
|
+
}
|
|
125
|
+
/** Admin mints bananaCoin tokens privately to the target address and redeems them. */ async mintPrivateBananas(amount, address) {
|
|
126
|
+
const balanceBefore = await this.bananaCoin.methods.balance_of_private(address).simulate({
|
|
127
|
+
from: this.adminAddress
|
|
128
|
+
});
|
|
129
|
+
await mintTokensToPrivate(this.bananaCoin, this.adminAddress, address, amount);
|
|
130
|
+
const balanceAfter = await this.bananaCoin.methods.balance_of_private(address).simulate({
|
|
131
|
+
from: this.adminAddress
|
|
132
|
+
});
|
|
133
|
+
expect(balanceAfter).toEqual(balanceBefore + amount);
|
|
134
|
+
}
|
|
135
|
+
createBenchmarkingAccountManager(wallet, type) {
|
|
136
|
+
const benchysSecret = Fr.random();
|
|
137
|
+
const salt = Fr.random();
|
|
138
|
+
let benchysPrivateSigningKey;
|
|
139
|
+
if (type === 'schnorr') {
|
|
140
|
+
benchysPrivateSigningKey = deriveSigningKey(benchysSecret);
|
|
141
|
+
return wallet.createSchnorrAccount(benchysSecret, salt, benchysPrivateSigningKey);
|
|
142
|
+
} else if (type === 'ecdsar1') {
|
|
143
|
+
benchysPrivateSigningKey = randomBytes(32);
|
|
144
|
+
return wallet.createECDSARAccount(benchysSecret, salt, benchysPrivateSigningKey);
|
|
145
|
+
} else {
|
|
146
|
+
throw new Error(`Unknown account type: ${type}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async applyBaseSnapshots() {
|
|
150
|
+
await this.applyInitialAccountsSnapshot();
|
|
151
|
+
await this.applySetupFeeJuiceSnapshot();
|
|
152
|
+
}
|
|
153
|
+
async applyInitialAccountsSnapshot() {
|
|
154
|
+
await this.snapshotManager.snapshot('initial_accounts', deployAccounts(2, this.logger), async ({ deployedAccounts: [{ address: adminAddress }, { address: sequencerAddress }] }, { wallet, aztecNode, cheatCodes })=>{
|
|
155
|
+
this.adminWallet = wallet;
|
|
156
|
+
this.aztecNode = aztecNode;
|
|
157
|
+
this.cheatCodes = cheatCodes;
|
|
158
|
+
this.adminAddress = adminAddress;
|
|
159
|
+
this.sequencerAddress = sequencerAddress;
|
|
160
|
+
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
161
|
+
this.feeJuiceContract = await FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
|
|
162
|
+
this.coinbase = EthAddress.random();
|
|
163
|
+
const userPXEConfig = getPXEConfig();
|
|
164
|
+
const userPXEConfigWithContracts = {
|
|
165
|
+
...userPXEConfig,
|
|
166
|
+
proverEnabled: this.realProofs
|
|
167
|
+
};
|
|
168
|
+
this.userWallet = await TestWallet.create(this.aztecNode, userPXEConfigWithContracts, {
|
|
169
|
+
loggers: {
|
|
170
|
+
prover: this.proxyLogger.createLogger('pxe:bb:wasm:bundle:proxied')
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async applySetupFeeJuiceSnapshot() {
|
|
176
|
+
await this.snapshotManager.snapshot('setup_fee_juice', async ()=>{}, async (_data, context)=>{
|
|
177
|
+
this.context = context;
|
|
178
|
+
this.feeJuiceContract = await FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
|
|
179
|
+
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
180
|
+
aztecNode: context.aztecNode,
|
|
181
|
+
aztecNodeAdmin: context.aztecNode,
|
|
182
|
+
l1Client: context.deployL1ContractsValues.l1Client,
|
|
183
|
+
wallet: this.adminWallet,
|
|
184
|
+
logger: this.logger
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
async applyDeployBananaTokenSnapshot() {
|
|
189
|
+
await this.snapshotManager.snapshot('deploy_banana_token', async ()=>{
|
|
190
|
+
const bananaCoin = await BananaCoin.deploy(this.adminWallet, this.adminAddress, 'BC', 'BC', 18n).send({
|
|
191
|
+
from: this.adminAddress
|
|
192
|
+
}).deployed();
|
|
193
|
+
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
194
|
+
return {
|
|
195
|
+
bananaCoinAddress: bananaCoin.address
|
|
196
|
+
};
|
|
197
|
+
}, async ({ bananaCoinAddress })=>{
|
|
198
|
+
this.bananaCoin = await BananaCoin.at(bananaCoinAddress, this.adminWallet);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
async applyDeployCandyBarTokenSnapshot() {
|
|
202
|
+
await this.snapshotManager.snapshot('deploy_candy_bar_token', async ()=>{
|
|
203
|
+
const candyBarCoin = await TokenContract.deploy(this.adminWallet, this.adminAddress, 'CBC', 'CBC', 18n).send({
|
|
204
|
+
from: this.adminAddress
|
|
205
|
+
}).deployed();
|
|
206
|
+
this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
|
|
207
|
+
return {
|
|
208
|
+
candyBarCoinAddress: candyBarCoin.address
|
|
209
|
+
};
|
|
210
|
+
}, async ({ candyBarCoinAddress })=>{
|
|
211
|
+
this.candyBarCoin = await TokenContract.at(candyBarCoinAddress, this.adminWallet);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
async applyFPCSetupSnapshot() {
|
|
215
|
+
await this.snapshotManager.snapshot('fpc_setup', async (context)=>{
|
|
216
|
+
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
217
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
218
|
+
const bananaCoin = this.bananaCoin;
|
|
219
|
+
const bananaFPC = await FPCContract.deploy(this.adminWallet, bananaCoin.address, this.adminAddress).send({
|
|
220
|
+
from: this.adminAddress
|
|
221
|
+
}).deployed();
|
|
222
|
+
this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
|
|
223
|
+
await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.adminAddress);
|
|
224
|
+
return {
|
|
225
|
+
bananaFPCAddress: bananaFPC.address
|
|
226
|
+
};
|
|
227
|
+
}, async (data)=>{
|
|
228
|
+
this.bananaFPC = await FPCContract.at(data.bananaFPCAddress, this.adminWallet);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
async applyDeploySponsoredFPCSnapshot() {
|
|
232
|
+
await this.snapshotManager.snapshot('deploy_sponsored_fpc', async ()=>{
|
|
233
|
+
const sponsoredFPC = await setupSponsoredFPC(this.adminWallet);
|
|
234
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
235
|
+
return {
|
|
236
|
+
sponsoredFPCAddress: sponsoredFPC.address
|
|
237
|
+
};
|
|
238
|
+
}, async ({ sponsoredFPCAddress })=>{
|
|
239
|
+
this.sponsoredFPC = await SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
async createCrossChainTestHarness(owner) {
|
|
243
|
+
const l1Client = createExtendedL1Client(this.context.aztecNodeConfig.l1RpcUrls, MNEMONIC);
|
|
244
|
+
const underlyingERC20Address = await deployL1Contract(l1Client, TestERC20Abi, TestERC20Bytecode, [
|
|
245
|
+
'Underlying',
|
|
246
|
+
'UND',
|
|
247
|
+
l1Client.account.address
|
|
248
|
+
]).then(({ address })=>address);
|
|
249
|
+
this.logger.verbose(`Setting up cross chain harness...`);
|
|
250
|
+
const crossChainTestHarness = await CrossChainTestHarness.new(this.aztecNode, l1Client, this.adminWallet, owner, this.logger, underlyingERC20Address);
|
|
251
|
+
this.logger.verbose(`L2 token deployed to: ${crossChainTestHarness.l2Token.address}`);
|
|
252
|
+
return crossChainTestHarness;
|
|
253
|
+
}
|
|
254
|
+
async createAndFundBenchmarkingAccountOnUserWallet(accountType) {
|
|
255
|
+
const benchysAccountManager = await this.createBenchmarkingAccountManager(this.adminWallet, accountType);
|
|
256
|
+
const benchysAccount = await benchysAccountManager.getAccount();
|
|
257
|
+
const benchysAddress = benchysAccountManager.address;
|
|
258
|
+
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(benchysAddress);
|
|
259
|
+
const behchysDeployMethod = await benchysAccountManager.getDeployMethod();
|
|
260
|
+
await behchysDeployMethod.send({
|
|
261
|
+
from: AztecAddress.ZERO,
|
|
262
|
+
fee: {
|
|
263
|
+
paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim)
|
|
264
|
+
}
|
|
265
|
+
}).wait();
|
|
266
|
+
// Register benchy on the user's Wallet, where we're going to be interacting from
|
|
267
|
+
const accountManager = await this.userWallet.createAccount({
|
|
268
|
+
secret: benchysAccount.getSecretKey(),
|
|
269
|
+
salt: new Fr(benchysAccount.salt),
|
|
270
|
+
contract: benchysAccountManager.getAccountContract()
|
|
271
|
+
});
|
|
272
|
+
return accountManager.address;
|
|
273
|
+
}
|
|
274
|
+
async applyDeployAmmSnapshot() {
|
|
275
|
+
await this.snapshotManager.snapshot('deploy_amm', async ()=>{
|
|
276
|
+
const liquidityToken = await TokenContract.deploy(this.adminWallet, this.adminAddress, 'LPT', 'LPT', 18n).send({
|
|
277
|
+
from: this.adminAddress
|
|
278
|
+
}).deployed();
|
|
279
|
+
const amm = await AMMContract.deploy(this.adminWallet, this.bananaCoin.address, this.candyBarCoin.address, liquidityToken.address).send({
|
|
280
|
+
from: this.adminAddress
|
|
281
|
+
}).deployed();
|
|
282
|
+
this.logger.info(`AMM deployed at ${amm.address}`);
|
|
283
|
+
await liquidityToken.methods.set_minter(amm.address, true).send({
|
|
284
|
+
from: this.adminAddress
|
|
285
|
+
}).wait();
|
|
286
|
+
return {
|
|
287
|
+
ammAddress: amm.address,
|
|
288
|
+
liquidityTokenAddress: liquidityToken.address
|
|
289
|
+
};
|
|
290
|
+
}, async ({ ammAddress, liquidityTokenAddress })=>{
|
|
291
|
+
this.liquidityToken = await TokenContract.at(liquidityTokenAddress, this.adminWallet);
|
|
292
|
+
this.amm = await AMMContract.at(ammAddress, this.adminWallet);
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
async getBridgedFeeJuicePaymentMethodForWallet(_wallet, sender) {
|
|
296
|
+
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(sender);
|
|
297
|
+
return new FeeJuicePaymentMethodWithClaim(sender, claim);
|
|
298
|
+
}
|
|
299
|
+
async getPrivateFPCPaymentMethodForWallet(wallet, sender) {
|
|
300
|
+
// The private fee paying method assembled on the app side requires knowledge of the maximum
|
|
301
|
+
// fee the user is willing to pay
|
|
302
|
+
const maxFeesPerGas = (await this.aztecNode.getCurrentBaseFees()).mul(1.5);
|
|
303
|
+
const gasSettings = GasSettings.default({
|
|
304
|
+
maxFeesPerGas
|
|
305
|
+
});
|
|
306
|
+
return new PrivateFeePaymentMethod(this.bananaFPC.address, sender, wallet, gasSettings);
|
|
307
|
+
}
|
|
308
|
+
getSponsoredFPCPaymentMethodForWallet(_wallet, _sender) {
|
|
309
|
+
return Promise.resolve(new SponsoredFeePaymentMethod(this.sponsoredFPC.address));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AccountType, BenchmarkingFeePaymentMethod } from './client_flows_benchmark.js';
|
|
2
|
+
export type ClientFlowConfig = {
|
|
3
|
+
accounts: AccountType[];
|
|
4
|
+
feePaymentMethods: BenchmarkingFeePaymentMethod[];
|
|
5
|
+
recursions?: number[];
|
|
6
|
+
};
|
|
7
|
+
type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
8
|
+
export type ClientFlowsConfig = {
|
|
9
|
+
[key in ClientFlows]: ClientFlowConfig;
|
|
10
|
+
};
|
|
11
|
+
export declare const KEY_FLOWS_CONFIG: ClientFlowsConfig;
|
|
12
|
+
export declare const FULL_FLOWS_CONFIG: ClientFlowsConfig;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export const KEY_FLOWS_CONFIG = {
|
|
2
|
+
accountDeployments: {
|
|
3
|
+
accounts: [
|
|
4
|
+
'ecdsar1',
|
|
5
|
+
'schnorr'
|
|
6
|
+
],
|
|
7
|
+
feePaymentMethods: [
|
|
8
|
+
'sponsored_fpc'
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
deployments: {
|
|
12
|
+
accounts: [
|
|
13
|
+
'ecdsar1',
|
|
14
|
+
'schnorr'
|
|
15
|
+
],
|
|
16
|
+
feePaymentMethods: [
|
|
17
|
+
'sponsored_fpc'
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
amm: {
|
|
21
|
+
accounts: [
|
|
22
|
+
'ecdsar1'
|
|
23
|
+
],
|
|
24
|
+
feePaymentMethods: [
|
|
25
|
+
'sponsored_fpc'
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
bridging: {
|
|
29
|
+
accounts: [
|
|
30
|
+
'ecdsar1'
|
|
31
|
+
],
|
|
32
|
+
feePaymentMethods: [
|
|
33
|
+
'sponsored_fpc'
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
transfers: {
|
|
37
|
+
accounts: [
|
|
38
|
+
'ecdsar1'
|
|
39
|
+
],
|
|
40
|
+
feePaymentMethods: [
|
|
41
|
+
'sponsored_fpc',
|
|
42
|
+
'private_fpc'
|
|
43
|
+
],
|
|
44
|
+
recursions: [
|
|
45
|
+
0,
|
|
46
|
+
1
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
};
|
|
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
|
+
},
|
|
61
|
+
deployments: {
|
|
62
|
+
accounts: [
|
|
63
|
+
'ecdsar1',
|
|
64
|
+
'schnorr'
|
|
65
|
+
],
|
|
66
|
+
feePaymentMethods: [
|
|
67
|
+
'bridged_fee_juice',
|
|
68
|
+
'sponsored_fpc'
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
amm: {
|
|
72
|
+
accounts: [
|
|
73
|
+
'ecdsar1',
|
|
74
|
+
'schnorr'
|
|
75
|
+
],
|
|
76
|
+
feePaymentMethods: [
|
|
77
|
+
'sponsored_fpc',
|
|
78
|
+
'private_fpc'
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
bridging: {
|
|
82
|
+
accounts: [
|
|
83
|
+
'ecdsar1',
|
|
84
|
+
'schnorr'
|
|
85
|
+
],
|
|
86
|
+
feePaymentMethods: [
|
|
87
|
+
'sponsored_fpc',
|
|
88
|
+
'private_fpc'
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
transfers: {
|
|
92
|
+
accounts: [
|
|
93
|
+
'ecdsar1',
|
|
94
|
+
'schnorr'
|
|
95
|
+
],
|
|
96
|
+
feePaymentMethods: [
|
|
97
|
+
'sponsored_fpc',
|
|
98
|
+
'private_fpc'
|
|
99
|
+
],
|
|
100
|
+
recursions: [
|
|
101
|
+
0,
|
|
102
|
+
1,
|
|
103
|
+
2
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data_extractor.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/data_extractor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
2
|
+
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
3
|
+
import { createLogger, logger } from '@aztec/foundation/log';
|
|
4
|
+
import { Timer } from '@aztec/foundation/timer';
|
|
5
|
+
import { WASMSimulator } from '@aztec/simulator/client';
|
|
6
|
+
import { Decoder } from 'msgpackr';
|
|
7
|
+
import { readFile, readdir, writeFile } from 'node:fs/promises';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { ProxyLogger, generateBenchmark } from './benchmark.js';
|
|
10
|
+
async function createProver(config = {}, log) {
|
|
11
|
+
const simulator = new WASMSimulator();
|
|
12
|
+
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
13
|
+
return {
|
|
14
|
+
prover: new BBWASMBundlePrivateKernelProver(simulator, 16, log),
|
|
15
|
+
type: 'wasm'
|
|
16
|
+
};
|
|
17
|
+
} else {
|
|
18
|
+
const bbConfig = config;
|
|
19
|
+
return {
|
|
20
|
+
prover: await BBNativePrivateKernelProver.new({
|
|
21
|
+
bbSkipCleanup: false,
|
|
22
|
+
numConcurrentIVCVerifiers: 1,
|
|
23
|
+
bbIVCConcurrency: 1,
|
|
24
|
+
...bbConfig
|
|
25
|
+
}, simulator, log),
|
|
26
|
+
type: 'native'
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async function main() {
|
|
31
|
+
ProxyLogger.create();
|
|
32
|
+
const proxyLogger = ProxyLogger.getInstance();
|
|
33
|
+
const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
|
|
34
|
+
if (!ivcFolder) {
|
|
35
|
+
throw new Error('CAPTURE_IVC_FOLDER is not set');
|
|
36
|
+
}
|
|
37
|
+
const flows = await readdir(ivcFolder);
|
|
38
|
+
logger.info(`Flows in ${ivcFolder}: \n${flows.map((flowName)=>`\t- ${flowName}`).join('\n')}`);
|
|
39
|
+
const { prover, type: proverType } = await createProver({
|
|
40
|
+
bbBinaryPath: process.env.BB_BINARY_PATH,
|
|
41
|
+
bbWorkingDirectory: process.env.BB_WORKING_DIRECTORY
|
|
42
|
+
}, proxyLogger.createLogger('bb:prover'));
|
|
43
|
+
const userLog = createLogger('chonk_flows:data_processor');
|
|
44
|
+
for (const flow of flows){
|
|
45
|
+
userLog.info(`Processing flow ${flow}`);
|
|
46
|
+
const ivcInputs = await readFile(join(ivcFolder, flow, 'ivc-inputs.msgpack'));
|
|
47
|
+
const stepsFromFile = new Decoder({
|
|
48
|
+
useRecords: false
|
|
49
|
+
}).unpack(ivcInputs);
|
|
50
|
+
const witnesses = await readFile(join(ivcFolder, flow, 'witnesses.json'));
|
|
51
|
+
const witnessStack = JSON.parse(witnesses.toString()).map((witnessMap)=>{
|
|
52
|
+
return new Map(Object.entries(witnessMap).map(([k, v])=>[
|
|
53
|
+
Number(k),
|
|
54
|
+
v
|
|
55
|
+
]));
|
|
56
|
+
});
|
|
57
|
+
const profileFile = await readFile(join(ivcFolder, flow, 'profile.json'));
|
|
58
|
+
const profile = JSON.parse(profileFile.toString());
|
|
59
|
+
const privateExecutionSteps = profile.steps.map((step, i)=>({
|
|
60
|
+
functionName: step.functionName,
|
|
61
|
+
gateCount: step.gateCount,
|
|
62
|
+
bytecode: stepsFromFile[i].bytecode,
|
|
63
|
+
// TODO(AD) do we still want to take this from witness.json?
|
|
64
|
+
witness: witnessStack[i],
|
|
65
|
+
vk: stepsFromFile[i].vk,
|
|
66
|
+
timings: {
|
|
67
|
+
witgen: step.timings.witgen,
|
|
68
|
+
gateCount: step.timings.gateCount
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
let error;
|
|
72
|
+
let currentLogs = [];
|
|
73
|
+
let provingTime;
|
|
74
|
+
try {
|
|
75
|
+
const provingTimer = new Timer();
|
|
76
|
+
await prover.createChonkProof(privateExecutionSteps);
|
|
77
|
+
provingTime = provingTimer.ms();
|
|
78
|
+
} catch (e) {
|
|
79
|
+
userLog.error(`Failed to generate chonk proof for ${flow}`, e);
|
|
80
|
+
error = e.message;
|
|
81
|
+
}
|
|
82
|
+
// Extract logs from this run from the proxy and write them to disk unconditionally
|
|
83
|
+
currentLogs = proxyLogger.getLogs();
|
|
84
|
+
await writeFile(join(ivcFolder, flow, 'logs.json'), JSON.stringify(currentLogs, null, 2));
|
|
85
|
+
if (!profile.stats.timings.proving) {
|
|
86
|
+
profile.stats.timings.proving = provingTime;
|
|
87
|
+
}
|
|
88
|
+
const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, proverType, error);
|
|
89
|
+
await writeFile(join(ivcFolder, flow, 'benchmark.json'), JSON.stringify(benchmark, null, 2));
|
|
90
|
+
proxyLogger.flushLogs();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
await main();
|
|
95
|
+
} catch (e) {
|
|
96
|
+
// eslint-disable-next-line no-console
|
|
97
|
+
console.error(e);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
package/dest/bench/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking';
|
|
3
|
-
import { type PXEService } from '@aztec/pxe/server';
|
|
1
|
+
import { type SentTx, type WaitOpts } from '@aztec/aztec.js/contracts';
|
|
2
|
+
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
|
|
4
3
|
import type { MetricsType } from '@aztec/telemetry-client';
|
|
5
4
|
import type { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
6
5
|
import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
|
|
@@ -23,30 +22,13 @@ type MetricFilter = {
|
|
|
23
22
|
name: string;
|
|
24
23
|
unit?: string;
|
|
25
24
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* Returns the size in disk of a folder.
|
|
34
|
-
* @param path - Path to the folder.
|
|
35
|
-
* @returns Size in bytes.
|
|
36
|
-
*/
|
|
37
|
-
export declare function getFolderSize(path: string): number;
|
|
38
|
-
/**
|
|
39
|
-
* Returns a call to the benchmark contract. Each call has a private execution (account entrypoint),
|
|
40
|
-
* a nested private call (create_note), a public call (increment_balance), and a nested public
|
|
41
|
-
* call (broadcast). These include emitting one private note and one public log, two storage
|
|
42
|
-
* reads and one write.
|
|
43
|
-
* @param index - Index of the call within a block.
|
|
44
|
-
* @param context - End to end context.
|
|
45
|
-
* @param contract - Benchmarking contract.
|
|
46
|
-
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
47
|
-
* @returns A BatchCall instance.
|
|
48
|
-
*/
|
|
49
|
-
export declare function makeCall(index: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute: boolean): Promise<BatchCall>;
|
|
25
|
+
export type GithubActionBenchmarkResult = {
|
|
26
|
+
name: string;
|
|
27
|
+
value: number;
|
|
28
|
+
range?: string;
|
|
29
|
+
unit: string;
|
|
30
|
+
extra?: string;
|
|
31
|
+
};
|
|
50
32
|
/**
|
|
51
33
|
* Assembles and sends multiple transactions simultaneously to the node in context.
|
|
52
34
|
* Each tx is the result of calling makeCall.
|
|
@@ -56,15 +38,7 @@ export declare function makeCall(index: number, context: EndToEndContext, contra
|
|
|
56
38
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
57
39
|
* @returns Array of sent txs.
|
|
58
40
|
*/
|
|
59
|
-
export declare function sendTxs(txCount: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute?: boolean):
|
|
41
|
+
export declare function sendTxs(txCount: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute?: boolean): SentTx[];
|
|
60
42
|
export declare function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpts?: WaitOpts): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Creates a new PXE
|
|
63
|
-
* @param node - Node to connect the pxe to.
|
|
64
|
-
* @param contract - Benchmark contract to add to the pxe.
|
|
65
|
-
* @param startingBlock - First l2 block to process.
|
|
66
|
-
* @returns The new PXE.
|
|
67
|
-
*/
|
|
68
|
-
export declare function createNewPXE(node: AztecNode, contract: BenchmarkingContract, startingBlock?: number): Promise<PXEService>;
|
|
69
43
|
export {};
|
|
70
44
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAA4C,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKxH,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;;;;;GAyBF;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;AAGF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6DF;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,kBAAkB,GAAE,OAAe,GAClC,MAAM,EAAE,CAMV;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,QAAQ,iBAI3F"}
|