@aztec/end-to-end 0.0.1-commit.04852196a → 0.0.1-commit.04d373f
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/README.md +27 -0
- package/dest/bench/client_flows/benchmark.d.ts +15 -1
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +17 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +27 -38
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +2 -0
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +5 -4
- 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 +14 -5
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +15 -4
- 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 +39 -7
- package/dest/e2e_deploy_contract/deploy_test.d.ts +3 -3
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +2 -1
- package/dest/e2e_epochs/epochs_test.d.ts +25 -2
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +88 -14
- package/dest/e2e_fees/fees_test.d.ts +5 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +32 -6
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +3 -3
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +2 -1
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +5 -3
- package/dest/e2e_p2p/p2p_network.d.ts +10 -9
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +46 -27
- package/dest/e2e_p2p/reqresp/utils.d.ts +1 -1
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
- package/dest/e2e_p2p/reqresp/utils.js +42 -13
- package/dest/e2e_p2p/shared.d.ts +16 -12
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +57 -57
- package/dest/e2e_token_contract/token_contract_test.d.ts +3 -3
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +4 -2
- package/dest/fixtures/authwit_proxy.d.ts +1 -1
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -1
- package/dest/fixtures/authwit_proxy.js +4 -0
- package/dest/fixtures/e2e_prover_test.d.ts +6 -5
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +9 -13
- package/dest/fixtures/fixtures.d.ts +73 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +68 -0
- 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 +5 -5
- package/dest/fixtures/ha_setup.d.ts +2 -2
- package/dest/fixtures/ha_setup.d.ts.map +1 -1
- package/dest/fixtures/ha_setup.js +1 -1
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
- package/dest/fixtures/setup.d.ts +43 -11
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +135 -26
- package/dest/fixtures/setup_p2p_test.d.ts +10 -6
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +8 -8
- package/dest/fixtures/token_utils.d.ts +1 -1
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +2 -5
- package/dest/fixtures/utils.d.ts +2 -2
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +1 -1
- package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
- package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
- package/dest/forward-compatibility/wallet_service.d.ts +3 -0
- package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_service.js +109 -0
- package/dest/install_legacy_contracts.d.cts +10 -0
- package/dest/install_legacy_contracts.d.cts.map +1 -0
- package/dest/legacy-jest-resolver.d.cts +3 -0
- package/dest/legacy-jest-resolver.d.cts.map +1 -0
- package/dest/shared/cross_chain_test_harness.d.ts +4 -2
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +9 -5
- package/dest/shared/gas_portal_test_harness.d.ts +8 -5
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +17 -8
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +55 -34
- package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
- package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
- package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
- package/dest/simulators/lending_simulator.d.ts +10 -3
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +24 -12
- package/dest/simulators/token_simulator.js +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +4 -2
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +73 -41
- package/dest/spartan/tx_metrics.d.ts +18 -4
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +73 -20
- package/dest/spartan/utils/config.d.ts +9 -32
- package/dest/spartan/utils/config.d.ts.map +1 -1
- package/dest/spartan/utils/config.js +1 -0
- package/dest/spartan/utils/index.d.ts +2 -1
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +2 -0
- package/dest/spartan/utils/nodes.js +2 -2
- package/dest/spartan/utils/pod_logs.d.ts +25 -0
- package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
- package/dest/spartan/utils/pod_logs.js +74 -0
- package/dest/test-wallet/test_wallet.d.ts +25 -23
- package/dest/test-wallet/test_wallet.d.ts.map +1 -1
- package/dest/test-wallet/test_wallet.js +146 -87
- package/dest/test-wallet/utils.d.ts +3 -3
- package/dest/test-wallet/utils.d.ts.map +1 -1
- package/dest/test-wallet/utils.js +2 -7
- package/dest/test-wallet/wallet_worker_script.js +2 -2
- package/dest/test-wallet/worker_wallet.d.ts +5 -4
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet.js +5 -1
- package/dest/test-wallet/worker_wallet_schema.d.ts +110 -224
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet_schema.js +14 -2
- package/package.json +46 -42
- package/src/bench/client_flows/benchmark.ts +19 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +64 -53
- package/src/bench/utils.ts +2 -1
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +24 -10
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +49 -11
- package/src/e2e_deploy_contract/deploy_test.ts +3 -2
- package/src/e2e_epochs/epochs_test.ts +99 -11
- package/src/e2e_fees/fees_test.ts +37 -4
- package/src/e2e_nested_contract/nested_contract_test.ts +3 -1
- package/src/e2e_p2p/inactivity_slash_test.ts +5 -3
- package/src/e2e_p2p/p2p_network.ts +57 -39
- package/src/e2e_p2p/reqresp/utils.ts +51 -12
- package/src/e2e_p2p/shared.ts +57 -72
- package/src/e2e_token_contract/token_contract_test.ts +12 -2
- package/src/fixtures/authwit_proxy.ts +4 -0
- package/src/fixtures/e2e_prover_test.ts +15 -18
- package/src/fixtures/fixtures.ts +86 -0
- package/src/fixtures/get_bb_config.ts +7 -6
- package/src/fixtures/ha_setup.ts +4 -2
- package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
- package/src/fixtures/setup.ts +171 -31
- package/src/fixtures/setup_p2p_test.ts +13 -9
- package/src/fixtures/token_utils.ts +1 -4
- package/src/fixtures/utils.ts +2 -0
- package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
- package/src/forward-compatibility/wallet_service.ts +104 -0
- package/src/guides/up_quick_start.sh +0 -2
- package/src/install_legacy_contracts.cjs +75 -0
- package/src/legacy-jest-resolver.cjs +112 -0
- package/src/shared/cross_chain_test_harness.ts +14 -4
- package/src/shared/gas_portal_test_harness.ts +20 -10
- package/src/shared/uniswap_l1_l2.ts +71 -46
- package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
- package/src/simulators/lending_simulator.ts +28 -12
- package/src/simulators/token_simulator.ts +1 -1
- package/src/spartan/setup_test_wallets.ts +98 -37
- package/src/spartan/tx_metrics.ts +81 -23
- package/src/spartan/utils/config.ts +1 -0
- package/src/spartan/utils/index.ts +3 -0
- package/src/spartan/utils/nodes.ts +2 -2
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/test-wallet/test_wallet.ts +174 -104
- package/src/test-wallet/utils.ts +3 -7
- package/src/test-wallet/wallet_worker_script.ts +2 -2
- package/src/test-wallet/worker_wallet.ts +9 -4
- package/src/test-wallet/worker_wallet_schema.ts +2 -2
|
@@ -5,6 +5,18 @@ import { Tx } from '@aztec/stdlib/tx';
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
/** Schema for the WorkerWallet API — extends WalletSchema with proveTx and registerAccount. */ export const WorkerWalletSchema = {
|
|
7
7
|
...WalletSchema,
|
|
8
|
-
proveTx: z.function(
|
|
9
|
-
|
|
8
|
+
proveTx: z.function({
|
|
9
|
+
input: z.tuple([
|
|
10
|
+
ExecutionPayloadSchema,
|
|
11
|
+
SendOptionsSchema
|
|
12
|
+
]),
|
|
13
|
+
output: Tx.schema
|
|
14
|
+
}),
|
|
15
|
+
registerAccount: z.function({
|
|
16
|
+
input: z.tuple([
|
|
17
|
+
schemas.Fr,
|
|
18
|
+
schemas.Fr
|
|
19
|
+
]),
|
|
20
|
+
output: AztecAddress.schema
|
|
21
|
+
})
|
|
10
22
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.04d373f",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"exports":
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./dest/index.js",
|
|
7
|
+
"./*": "./dest/*"
|
|
8
|
+
},
|
|
6
9
|
"inherits": [
|
|
7
10
|
"../package.common.json",
|
|
8
11
|
"./package.local.json"
|
|
@@ -26,45 +29,45 @@
|
|
|
26
29
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
30
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
31
|
-
"@aztec/aztec": "0.0.1-commit.
|
|
32
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
33
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
34
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
35
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
36
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
37
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
38
|
-
"@aztec/bot": "0.0.1-commit.
|
|
39
|
-
"@aztec/cli": "0.0.1-commit.
|
|
40
|
-
"@aztec/constants": "0.0.1-commit.
|
|
41
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
42
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
43
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
44
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
45
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
46
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
47
|
-
"@aztec/
|
|
48
|
-
"@aztec/
|
|
49
|
-
"@aztec/noir-
|
|
50
|
-
"@aztec/noir-
|
|
51
|
-
"@aztec/noir-
|
|
52
|
-
"@aztec/
|
|
53
|
-
"@aztec/
|
|
54
|
-
"@aztec/
|
|
55
|
-
"@aztec/prover-
|
|
56
|
-
"@aztec/
|
|
57
|
-
"@aztec/
|
|
58
|
-
"@aztec/
|
|
59
|
-
"@aztec/
|
|
60
|
-
"@aztec/
|
|
61
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
62
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
63
|
-
"@aztec/validator-client": "0.0.1-commit.
|
|
64
|
-
"@aztec/validator-ha-signer": "0.0.1-commit.
|
|
65
|
-
"@aztec/wallet-sdk": "0.0.1-commit.
|
|
66
|
-
"@aztec/wallets": "0.0.1-commit.
|
|
67
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
32
|
+
"@aztec/accounts": "0.0.1-commit.04d373f",
|
|
33
|
+
"@aztec/archiver": "0.0.1-commit.04d373f",
|
|
34
|
+
"@aztec/aztec": "0.0.1-commit.04d373f",
|
|
35
|
+
"@aztec/aztec-node": "0.0.1-commit.04d373f",
|
|
36
|
+
"@aztec/aztec.js": "0.0.1-commit.04d373f",
|
|
37
|
+
"@aztec/bb-prover": "0.0.1-commit.04d373f",
|
|
38
|
+
"@aztec/bb.js": "0.0.1-commit.04d373f",
|
|
39
|
+
"@aztec/blob-client": "0.0.1-commit.04d373f",
|
|
40
|
+
"@aztec/blob-lib": "0.0.1-commit.04d373f",
|
|
41
|
+
"@aztec/bot": "0.0.1-commit.04d373f",
|
|
42
|
+
"@aztec/cli": "0.0.1-commit.04d373f",
|
|
43
|
+
"@aztec/constants": "0.0.1-commit.04d373f",
|
|
44
|
+
"@aztec/entrypoints": "0.0.1-commit.04d373f",
|
|
45
|
+
"@aztec/epoch-cache": "0.0.1-commit.04d373f",
|
|
46
|
+
"@aztec/ethereum": "0.0.1-commit.04d373f",
|
|
47
|
+
"@aztec/foundation": "0.0.1-commit.04d373f",
|
|
48
|
+
"@aztec/kv-store": "0.0.1-commit.04d373f",
|
|
49
|
+
"@aztec/l1-artifacts": "0.0.1-commit.04d373f",
|
|
50
|
+
"@aztec/node-keystore": "0.0.1-commit.04d373f",
|
|
51
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.04d373f",
|
|
52
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.04d373f",
|
|
53
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.04d373f",
|
|
54
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.04d373f",
|
|
55
|
+
"@aztec/p2p": "0.0.1-commit.04d373f",
|
|
56
|
+
"@aztec/protocol-contracts": "0.0.1-commit.04d373f",
|
|
57
|
+
"@aztec/prover-client": "0.0.1-commit.04d373f",
|
|
58
|
+
"@aztec/prover-node": "0.0.1-commit.04d373f",
|
|
59
|
+
"@aztec/pxe": "0.0.1-commit.04d373f",
|
|
60
|
+
"@aztec/sequencer-client": "0.0.1-commit.04d373f",
|
|
61
|
+
"@aztec/simulator": "0.0.1-commit.04d373f",
|
|
62
|
+
"@aztec/slasher": "0.0.1-commit.04d373f",
|
|
63
|
+
"@aztec/standard-contracts": "0.0.1-commit.04d373f",
|
|
64
|
+
"@aztec/stdlib": "0.0.1-commit.04d373f",
|
|
65
|
+
"@aztec/telemetry-client": "0.0.1-commit.04d373f",
|
|
66
|
+
"@aztec/validator-client": "0.0.1-commit.04d373f",
|
|
67
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.04d373f",
|
|
68
|
+
"@aztec/wallet-sdk": "0.0.1-commit.04d373f",
|
|
69
|
+
"@aztec/wallets": "0.0.1-commit.04d373f",
|
|
70
|
+
"@aztec/world-state": "0.0.1-commit.04d373f",
|
|
68
71
|
"@iarna/toml": "^2.2.5",
|
|
69
72
|
"@jest/globals": "^30.0.0",
|
|
70
73
|
"@noble/curves": "=1.0.0",
|
|
@@ -102,7 +105,7 @@
|
|
|
102
105
|
"typescript": "^5.3.3",
|
|
103
106
|
"util": "^0.12.5",
|
|
104
107
|
"viem": "npm:@aztec/viem@2.38.2",
|
|
105
|
-
"zod": "^
|
|
108
|
+
"zod": "^4"
|
|
106
109
|
},
|
|
107
110
|
"devDependencies": {
|
|
108
111
|
"0x": "^5.7.0",
|
|
@@ -160,6 +163,7 @@
|
|
|
160
163
|
"moduleNameMapper": {
|
|
161
164
|
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
|
|
162
165
|
},
|
|
166
|
+
"resolver": "<rootDir>/legacy-jest-resolver.cjs",
|
|
163
167
|
"testRegex": "./src/.*\\.test\\.(js|mjs|ts)$",
|
|
164
168
|
"rootDir": "./src",
|
|
165
169
|
"testTimeout": 120000,
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
type ProfileInteractionOptions,
|
|
6
6
|
} from '@aztec/aztec.js/contracts';
|
|
7
7
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
8
|
+
import { MAX_APPS_PER_KERNEL } from '@aztec/constants';
|
|
8
9
|
import { createLogger } from '@aztec/foundation/log';
|
|
9
10
|
import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
10
11
|
import type {
|
|
@@ -320,6 +321,24 @@ export function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): Git
|
|
|
320
321
|
return benches;
|
|
321
322
|
}
|
|
322
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Computes the expected number of `PrivateExecutionStep` entries the orchestrator will produce
|
|
326
|
+
* for a tx with `apps` private function calls.
|
|
327
|
+
*
|
|
328
|
+
* Step layout: `apps` app circuits + kernel iterations + 1 final reset + 1 tail + 1 hiding kernel.
|
|
329
|
+
* Each kernel iteration absorbs up to `MAX_APPS_PER_KERNEL` apps via the `init_K` / `inner_K`
|
|
330
|
+
* variants, so the kernel count is `ceil(apps / MAX_APPS_PER_KERNEL)`.
|
|
331
|
+
*
|
|
332
|
+
* Caveat: this assumes no mid-flow reset is triggered, which would split a batch into two kernels
|
|
333
|
+
* separated by a reset. For the flows currently exercised in this benchmark suite that holds, but
|
|
334
|
+
* a future flow that grows large enough to overflow per-tx limits before consuming all apps will
|
|
335
|
+
* not match this formula.
|
|
336
|
+
*/
|
|
337
|
+
export function expectedExecutionSteps(apps: number): number {
|
|
338
|
+
const kernels = Math.ceil(apps / MAX_APPS_PER_KERNEL);
|
|
339
|
+
return apps + kernels + 1 /* final reset */ + 1 /* tail */ + 1 /* hiding */;
|
|
340
|
+
}
|
|
341
|
+
|
|
323
342
|
export async function captureProfile(
|
|
324
343
|
label: string,
|
|
325
344
|
interaction: ContractFunctionInteraction | DeployMethod,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
1
2
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
3
|
import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
|
|
3
4
|
import { type FeePaymentMethod, PrivateFeePaymentMethod, SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
@@ -27,7 +28,7 @@ import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
|
27
28
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
28
29
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
29
30
|
|
|
30
|
-
import { MNEMONIC } from '../../fixtures/fixtures.js';
|
|
31
|
+
import { AUTOMINE_E2E_OPTS, MNEMONIC, getPaddedMaxFeesPerGas } from '../../fixtures/fixtures.js';
|
|
31
32
|
import { type EndToEndContext, type SetupOptions, deployAccounts, setup, teardown } from '../../fixtures/setup.js';
|
|
32
33
|
import { mintTokensToPrivate } from '../../fixtures/token_utils.js';
|
|
33
34
|
import { setupSponsoredFPC } from '../../fixtures/utils.js';
|
|
@@ -87,33 +88,35 @@ export class ClientFlowsBenchmark {
|
|
|
87
88
|
|
|
88
89
|
public realProofs = ['true', '1'].includes(process.env.REAL_PROOFS ?? '');
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
91
|
+
// `apps` is the number of private function calls contributed by this payment method.
|
|
92
|
+
// Each app produces one execution step at proving time; the orchestrator additionally produces
|
|
93
|
+
// one kernel step per batch of N apps (see `expectedExecutionSteps` in `benchmark.ts`).
|
|
94
|
+
public paymentMethods: Record<BenchmarkingFeePaymentMethod, { forWallet: FeePaymentMethodGetter; apps: number }> = {
|
|
95
|
+
// eslint-disable-next-line camelcase
|
|
96
|
+
bridged_fee_juice: {
|
|
97
|
+
forWallet: this.getBridgedFeeJuicePaymentMethodForWallet.bind(this),
|
|
98
|
+
apps: 1, // FeeJuice claim
|
|
99
|
+
},
|
|
100
|
+
// eslint-disable-next-line camelcase
|
|
101
|
+
private_fpc: {
|
|
102
|
+
forWallet: this.getPrivateFPCPaymentMethodForWallet.bind(this),
|
|
103
|
+
apps:
|
|
104
|
+
1 + // FPC entrypoint
|
|
105
|
+
1 + // BananaCoin transfer_to_public
|
|
106
|
+
1 + // Account verify_private_authwit
|
|
107
|
+
1, // BananaCoin prepare_private_balance_increase
|
|
108
|
+
},
|
|
109
|
+
// eslint-disable-next-line camelcase
|
|
110
|
+
sponsored_fpc: {
|
|
111
|
+
forWallet: this.getSponsoredFPCPaymentMethodForWallet.bind(this),
|
|
112
|
+
apps: 1, // Sponsored FPC sponsor_unconditionally
|
|
113
|
+
},
|
|
114
|
+
// eslint-disable-next-line camelcase
|
|
115
|
+
fee_juice: {
|
|
116
|
+
forWallet: () => Promise.resolve(undefined),
|
|
117
|
+
apps: 0,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
117
120
|
|
|
118
121
|
public config: ClientFlowsConfig;
|
|
119
122
|
|
|
@@ -122,7 +125,7 @@ export class ClientFlowsBenchmark {
|
|
|
122
125
|
|
|
123
126
|
constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {}) {
|
|
124
127
|
this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
|
|
125
|
-
this.setupOptions = { startProverNode: true, ...setupOptions };
|
|
128
|
+
this.setupOptions = { ...AUTOMINE_E2E_OPTS, startProverNode: true, ...setupOptions };
|
|
126
129
|
this.config = BENCHMARK_CONFIG === 'key_flows' ? KEY_FLOWS_CONFIG : FULL_FLOWS_CONFIG;
|
|
127
130
|
ProxyLogger.create();
|
|
128
131
|
this.proxyLogger = ProxyLogger.getInstance();
|
|
@@ -249,11 +252,14 @@ export class ClientFlowsBenchmark {
|
|
|
249
252
|
|
|
250
253
|
async applyDeployBananaToken() {
|
|
251
254
|
this.logger.info('Applying banana token deployment');
|
|
252
|
-
const {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
+
const { contract: bananaCoin, instance: bananaCoinInstance } = await BananaCoin.deploy(
|
|
256
|
+
this.adminWallet,
|
|
257
|
+
this.adminAddress,
|
|
258
|
+
'BC',
|
|
259
|
+
'BC',
|
|
260
|
+
18n,
|
|
261
|
+
).send({
|
|
255
262
|
from: this.adminAddress,
|
|
256
|
-
wait: { returnReceipt: true },
|
|
257
263
|
});
|
|
258
264
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
259
265
|
this.bananaCoin = bananaCoin;
|
|
@@ -262,11 +268,14 @@ export class ClientFlowsBenchmark {
|
|
|
262
268
|
|
|
263
269
|
async applyDeployCandyBarToken() {
|
|
264
270
|
this.logger.info('Applying candy bar token deployment');
|
|
265
|
-
const {
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
const { contract: candyBarCoin, instance: candyBarCoinInstance } = await TokenContract.deploy(
|
|
272
|
+
this.adminWallet,
|
|
273
|
+
this.adminAddress,
|
|
274
|
+
'CBC',
|
|
275
|
+
'CBC',
|
|
276
|
+
18n,
|
|
277
|
+
).send({
|
|
268
278
|
from: this.adminAddress,
|
|
269
|
-
wait: { returnReceipt: true },
|
|
270
279
|
});
|
|
271
280
|
this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
|
|
272
281
|
this.candyBarCoin = candyBarCoin;
|
|
@@ -279,11 +288,12 @@ export class ClientFlowsBenchmark {
|
|
|
279
288
|
expect((await this.context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
280
289
|
|
|
281
290
|
const bananaCoin = this.bananaCoin;
|
|
282
|
-
const {
|
|
283
|
-
|
|
284
|
-
|
|
291
|
+
const { contract: bananaFPC, instance: bananaFPCInstance } = await FPCContract.deploy(
|
|
292
|
+
this.adminWallet,
|
|
293
|
+
bananaCoin.address,
|
|
294
|
+
this.adminAddress,
|
|
295
|
+
).send({
|
|
285
296
|
from: this.adminAddress,
|
|
286
|
-
wait: { returnReceipt: true },
|
|
287
297
|
});
|
|
288
298
|
|
|
289
299
|
this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
|
|
@@ -333,13 +343,13 @@ export class ClientFlowsBenchmark {
|
|
|
333
343
|
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(benchysAddress);
|
|
334
344
|
const behchysDeployMethod = await benchysAccountManager.getDeployMethod();
|
|
335
345
|
await behchysDeployMethod.send({
|
|
336
|
-
from:
|
|
346
|
+
from: NO_FROM,
|
|
337
347
|
fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
|
|
338
348
|
});
|
|
339
349
|
// Register benchy on the user's Wallet, where we're going to be interacting from
|
|
340
350
|
const accountManager = await this.userWallet.createAccount({
|
|
341
351
|
secret: benchysAccount.getSecretKey(),
|
|
342
|
-
salt: new Fr(
|
|
352
|
+
salt: new Fr(benchysAccountManager.getInstance().salt),
|
|
343
353
|
contract: benchysAccountManager.getAccountContract(),
|
|
344
354
|
});
|
|
345
355
|
return accountManager.address;
|
|
@@ -347,20 +357,21 @@ export class ClientFlowsBenchmark {
|
|
|
347
357
|
|
|
348
358
|
public async applyDeployAmm() {
|
|
349
359
|
this.logger.info('Applying AMM deployment');
|
|
350
|
-
const {
|
|
351
|
-
|
|
352
|
-
|
|
360
|
+
const { contract: liquidityToken, instance: liquidityTokenInstance } = await TokenContract.deploy(
|
|
361
|
+
this.adminWallet,
|
|
362
|
+
this.adminAddress,
|
|
363
|
+
'LPT',
|
|
364
|
+
'LPT',
|
|
365
|
+
18n,
|
|
366
|
+
).send({
|
|
353
367
|
from: this.adminAddress,
|
|
354
|
-
wait: { returnReceipt: true },
|
|
355
368
|
});
|
|
356
|
-
const {
|
|
357
|
-
receipt: { contract: amm, instance: ammInstance },
|
|
358
|
-
} = await AMMContract.deploy(
|
|
369
|
+
const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
|
|
359
370
|
this.adminWallet,
|
|
360
371
|
this.bananaCoin.address,
|
|
361
372
|
this.candyBarCoin.address,
|
|
362
373
|
liquidityToken.address,
|
|
363
|
-
).send({ from: this.adminAddress
|
|
374
|
+
).send({ from: this.adminAddress });
|
|
364
375
|
this.logger.info(`AMM deployed at ${amm.address}`);
|
|
365
376
|
await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress });
|
|
366
377
|
this.liquidityToken = liquidityToken;
|
|
@@ -377,8 +388,8 @@ export class ClientFlowsBenchmark {
|
|
|
377
388
|
public async getPrivateFPCPaymentMethodForWallet(wallet: Wallet, sender: AztecAddress) {
|
|
378
389
|
// The private fee paying method assembled on the app side requires knowledge of the maximum
|
|
379
390
|
// fee the user is willing to pay
|
|
380
|
-
const maxFeesPerGas =
|
|
381
|
-
const gasSettings = GasSettings.
|
|
391
|
+
const maxFeesPerGas = await getPaddedMaxFeesPerGas(this.aztecNode);
|
|
392
|
+
const gasSettings = GasSettings.fallback({ maxFeesPerGas });
|
|
382
393
|
return new PrivateFeePaymentMethod(this.bananaFPC.address, sender, wallet, gasSettings);
|
|
383
394
|
}
|
|
384
395
|
|
package/src/bench/utils.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { BenchmarkDataPoint, BenchmarkMetricsType, BenchmarkTelemetryClient
|
|
|
11
11
|
import { mkdirSync, writeFileSync } from 'fs';
|
|
12
12
|
import path from 'path';
|
|
13
13
|
|
|
14
|
+
import { PIPELINING_SETUP_OPTS } from '../fixtures/fixtures.js';
|
|
14
15
|
import { type EndToEndContext, type SetupOptions, setup } from '../fixtures/utils.js';
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -23,7 +24,7 @@ export async function benchmarkSetup(
|
|
|
23
24
|
benchOutput?: string;
|
|
24
25
|
},
|
|
25
26
|
) {
|
|
26
|
-
const context = await setup(1, { ...opts, telemetryConfig: { benchmark: true } });
|
|
27
|
+
const context = await setup(1, { ...PIPELINING_SETUP_OPTS, ...opts, telemetryConfig: { benchmark: true } });
|
|
27
28
|
const defaultAccountAddress = context.accounts[0];
|
|
28
29
|
const { contract } = await BenchmarkingContract.deploy(context.wallet).send({ from: defaultAccountAddress });
|
|
29
30
|
context.logger.info(`Deployed benchmarking contract at ${contract.address}`);
|
|
@@ -10,10 +10,19 @@ import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist'
|
|
|
10
10
|
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
11
11
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
12
12
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
13
|
+
import type { AztecNodeDebug } from '@aztec/stdlib/interfaces/client';
|
|
13
14
|
|
|
14
15
|
import { jest } from '@jest/globals';
|
|
15
16
|
|
|
16
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
type EndToEndContext,
|
|
19
|
+
type SetupOptions,
|
|
20
|
+
deployAccounts,
|
|
21
|
+
ensureAuthRegistryPublished,
|
|
22
|
+
publicDeployAccounts,
|
|
23
|
+
setup,
|
|
24
|
+
teardown,
|
|
25
|
+
} from '../fixtures/setup.js';
|
|
17
26
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
18
27
|
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
19
28
|
|
|
@@ -57,7 +66,7 @@ export class BlacklistTokenContractTest {
|
|
|
57
66
|
authwitProxy!: GenericProxyContract;
|
|
58
67
|
cheatCodes!: CheatCodes;
|
|
59
68
|
sequencer!: SequencerClient;
|
|
60
|
-
aztecNode!: AztecNode;
|
|
69
|
+
aztecNode!: AztecNode & AztecNodeDebug;
|
|
61
70
|
|
|
62
71
|
adminAddress!: AztecAddress;
|
|
63
72
|
otherAddress!: AztecAddress;
|
|
@@ -68,11 +77,13 @@ export class BlacklistTokenContractTest {
|
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
async crossTimestampOfChange() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
// Under AUTOMINE_E2E_OPTS, the 86400s warp crosses many epochs without any proofs being
|
|
81
|
+
// submitted. Mark current pending checkpoints as proven first so the rollup contract's
|
|
82
|
+
// pruning window doesn't reset the chain tip to genesis (which would make the warp's
|
|
83
|
+
// own empty-checkpoint propose fail with Rollup__InvalidArchive). See the AutomineSequencer
|
|
84
|
+
// README "Epoch proving caveat" and the equivalent pattern in lending_simulator.progressSlots.
|
|
85
|
+
await this.cheatCodes.rollup.markAsProven();
|
|
86
|
+
await this.cheatCodes.warpL2TimeAtLeastBy(this.aztecNode, BlacklistTokenContractTest.CHANGE_ROLES_DELAY);
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
/**
|
|
@@ -81,8 +92,9 @@ export class BlacklistTokenContractTest {
|
|
|
81
92
|
* 2. Publicly deploy accounts, deploy token contract and a "bad account".
|
|
82
93
|
*/
|
|
83
94
|
async applyBaseSetup() {
|
|
84
|
-
//
|
|
85
|
-
|
|
95
|
+
// Bumped from 2 min: pipelined cadence (~24s/dependent-tx) makes the 3-account deploy plus token/bad-account/
|
|
96
|
+
// proxy deploys exceed the original window.
|
|
97
|
+
jest.setTimeout(600_000);
|
|
86
98
|
|
|
87
99
|
this.logger.info('Deploying 3 accounts');
|
|
88
100
|
const { deployedAccounts } = await deployAccounts(
|
|
@@ -102,6 +114,7 @@ export class BlacklistTokenContractTest {
|
|
|
102
114
|
this.blacklistedAddress = deployedAccounts[2].address;
|
|
103
115
|
|
|
104
116
|
this.logger.info('Setting up blacklist token contract');
|
|
117
|
+
await ensureAuthRegistryPublished(this.wallet, this.adminAddress);
|
|
105
118
|
// Create the token contract state.
|
|
106
119
|
this.logger.verbose(`Public deploy accounts...`);
|
|
107
120
|
await publicDeployAccounts(this.wallet, [this.adminAddress, this.otherAddress, this.blacklistedAddress]);
|
|
@@ -142,9 +155,10 @@ export class BlacklistTokenContractTest {
|
|
|
142
155
|
).toEqual(new Role().withAdmin().toNoirStruct());
|
|
143
156
|
}
|
|
144
157
|
|
|
145
|
-
async setup() {
|
|
158
|
+
async setup(opts: Partial<SetupOptions> = {}) {
|
|
146
159
|
this.logger.info('Setting up fresh context');
|
|
147
160
|
this.context = await setup(0, {
|
|
161
|
+
...opts,
|
|
148
162
|
fundSponsoredFPC: true,
|
|
149
163
|
skipAccountDeployment: true,
|
|
150
164
|
});
|
|
@@ -4,7 +4,7 @@ import { waitForProven } from '@aztec/aztec.js/contracts';
|
|
|
4
4
|
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
5
5
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
6
6
|
import type { TxReceipt } from '@aztec/aztec.js/tx';
|
|
7
|
-
import { CheatCodes } from '@aztec/aztec/testing';
|
|
7
|
+
import { CheatCodes, EpochTestSettler } from '@aztec/aztec/testing';
|
|
8
8
|
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
9
9
|
import { InboxContract, OutboxContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
10
10
|
import type {
|
|
@@ -12,12 +12,14 @@ import type {
|
|
|
12
12
|
DeployAztecL1ContractsReturnType,
|
|
13
13
|
} from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
14
14
|
import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
|
|
15
|
+
import { pickL1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
15
16
|
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
16
17
|
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
17
18
|
import { sleep } from '@aztec/foundation/sleep';
|
|
18
19
|
import { TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
|
|
19
20
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
21
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
22
|
+
import type { PXEConfig } from '@aztec/pxe/server';
|
|
21
23
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
24
|
|
|
23
25
|
import { MNEMONIC } from '../fixtures/fixtures.js';
|
|
@@ -25,6 +27,7 @@ import {
|
|
|
25
27
|
type EndToEndContext,
|
|
26
28
|
type SetupOptions,
|
|
27
29
|
deployAccounts,
|
|
30
|
+
ensureAuthRegistryPublished,
|
|
28
31
|
publicDeployAccounts,
|
|
29
32
|
setup,
|
|
30
33
|
teardown,
|
|
@@ -36,6 +39,7 @@ export class CrossChainMessagingTest {
|
|
|
36
39
|
private requireEpochProven: boolean;
|
|
37
40
|
private setupOptions: SetupOptions;
|
|
38
41
|
private deployL1ContractsArgs: Partial<DeployAztecL1ContractsArgs>;
|
|
42
|
+
private pxeOpts: Partial<PXEConfig>;
|
|
39
43
|
logger: Logger;
|
|
40
44
|
context!: EndToEndContext;
|
|
41
45
|
aztecNode!: AztecNode;
|
|
@@ -58,12 +62,23 @@ export class CrossChainMessagingTest {
|
|
|
58
62
|
outbox!: OutboxContract;
|
|
59
63
|
cheatCodes!: CheatCodes;
|
|
60
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Background loop that marks each completed epoch as proven on L1. Started in `applyBaseSetup`
|
|
67
|
+
* when the test runs without a real prover node, because the e2e fixture uses L1 interval mining
|
|
68
|
+
* and the AnvilTestWatcher's auto-prove loop only runs under L1 automine. Without this, L1's
|
|
69
|
+
* `aztecProofSubmissionEpochs` window expires mid-test and triggers a chain prune that drops
|
|
70
|
+
* in-flight wallet txs. Tests that intentionally pause proving (e.g. inbox drift tests) can
|
|
71
|
+
* stop it via `await t.epochTestSettler?.stop()`.
|
|
72
|
+
*/
|
|
73
|
+
epochTestSettler?: EpochTestSettler;
|
|
74
|
+
|
|
61
75
|
deployL1ContractsValues!: DeployAztecL1ContractsReturnType;
|
|
62
76
|
|
|
63
77
|
constructor(
|
|
64
78
|
testName: string,
|
|
65
79
|
opts: SetupOptions = {},
|
|
66
80
|
deployL1ContractsArgs: Partial<DeployAztecL1ContractsArgs> = {},
|
|
81
|
+
pxeOpts: Partial<PXEConfig> = {},
|
|
67
82
|
) {
|
|
68
83
|
this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
|
|
69
84
|
this.setupOptions = opts;
|
|
@@ -71,17 +86,25 @@ export class CrossChainMessagingTest {
|
|
|
71
86
|
initialValidators: [],
|
|
72
87
|
...deployL1ContractsArgs,
|
|
73
88
|
};
|
|
89
|
+
this.pxeOpts = pxeOpts;
|
|
74
90
|
this.requireEpochProven = opts.startProverNode ?? false;
|
|
75
91
|
}
|
|
76
92
|
|
|
77
|
-
async setup() {
|
|
93
|
+
async setup(opts: Partial<SetupOptions> = {}, pxeOpts: Partial<PXEConfig> = {}) {
|
|
78
94
|
this.logger.info('Setting up cross chain messaging test');
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
// Recompute requireEpochProven from the merged options so per-call startProverNode is honored.
|
|
96
|
+
this.requireEpochProven = opts.startProverNode ?? this.setupOptions.startProverNode ?? false;
|
|
97
|
+
this.context = await setup(
|
|
98
|
+
0,
|
|
99
|
+
{
|
|
100
|
+
...this.setupOptions,
|
|
101
|
+
...opts,
|
|
102
|
+
fundSponsoredFPC: true,
|
|
103
|
+
skipAccountDeployment: true,
|
|
104
|
+
l1ContractsArgs: { ...this.deployL1ContractsArgs, ...opts.l1ContractsArgs },
|
|
105
|
+
},
|
|
106
|
+
{ ...this.pxeOpts, ...pxeOpts },
|
|
107
|
+
);
|
|
85
108
|
await this.applyBaseSetup();
|
|
86
109
|
}
|
|
87
110
|
|
|
@@ -98,12 +121,13 @@ export class CrossChainMessagingTest {
|
|
|
98
121
|
|
|
99
122
|
async catchUpProvenChain() {
|
|
100
123
|
const bn = await this.aztecNode.getBlockNumber();
|
|
101
|
-
while ((await this.aztecNode.
|
|
124
|
+
while ((await this.aztecNode.getBlockNumber('proven')) < bn) {
|
|
102
125
|
await sleep(1000);
|
|
103
126
|
}
|
|
104
127
|
}
|
|
105
128
|
|
|
106
129
|
async teardown() {
|
|
130
|
+
await this.epochTestSettler?.stop();
|
|
107
131
|
await teardown(this.context);
|
|
108
132
|
}
|
|
109
133
|
|
|
@@ -119,6 +143,19 @@ export class CrossChainMessagingTest {
|
|
|
119
143
|
if (this.requireEpochProven) {
|
|
120
144
|
// Turn off the watcher to prevent it from keep marking blocks as proven.
|
|
121
145
|
this.context.watcher.setIsMarkingAsProven(false);
|
|
146
|
+
} else {
|
|
147
|
+
// When no real prover is running, the L1 proof window (aztecProofSubmissionEpochs) would
|
|
148
|
+
// otherwise expire mid-test and trigger a chain prune. The AnvilTestWatcher's auto-prove
|
|
149
|
+
// loop is dormant under L1 interval mining (it gates on `isAutoMining`), so start an
|
|
150
|
+
// EpochTestSettler to mark each completed epoch as proven on L1.
|
|
151
|
+
this.epochTestSettler = new EpochTestSettler(
|
|
152
|
+
this.context.ethCheatCodes,
|
|
153
|
+
this.context.deployL1ContractsValues.l1ContractAddresses.rollupAddress,
|
|
154
|
+
this.context.aztecNodeService.getBlockSource(),
|
|
155
|
+
this.logger.createChild('epoch-settler'),
|
|
156
|
+
{ pollingIntervalMs: 500 },
|
|
157
|
+
);
|
|
158
|
+
await this.epochTestSettler.start();
|
|
122
159
|
}
|
|
123
160
|
|
|
124
161
|
// Deploy 3 accounts
|
|
@@ -135,6 +172,7 @@ export class CrossChainMessagingTest {
|
|
|
135
172
|
// Set up cross chain messaging
|
|
136
173
|
this.logger.info('Applying e2e_cross_chain_messaging setup');
|
|
137
174
|
|
|
175
|
+
await ensureAuthRegistryPublished(this.wallet, this.ownerAddress);
|
|
138
176
|
// Create the token contract state.
|
|
139
177
|
this.logger.verbose(`Public deploy accounts...`);
|
|
140
178
|
await publicDeployAccounts(this.wallet, [this.ownerAddress, this.user1Address, this.user2Address]);
|
|
@@ -171,7 +209,7 @@ export class CrossChainMessagingTest {
|
|
|
171
209
|
const l1Client = createExtendedL1Client(this.aztecNodeConfig.l1RpcUrls, MNEMONIC);
|
|
172
210
|
this.l1Client = l1Client;
|
|
173
211
|
|
|
174
|
-
const l1Contracts = this.aztecNodeConfig
|
|
212
|
+
const l1Contracts = pickL1ContractAddresses(this.aztecNodeConfig);
|
|
175
213
|
this.rollup = new RollupContract(l1Client, l1Contracts.rollupAddress.toString());
|
|
176
214
|
this.inbox = new InboxContract(l1Client, l1Contracts.inboxAddress.toString());
|
|
177
215
|
this.outbox = new OutboxContract(l1Client, l1Contracts.outboxAddress.toString());
|
|
@@ -185,7 +223,7 @@ export class CrossChainMessagingTest {
|
|
|
185
223
|
tokenPortalAddress,
|
|
186
224
|
crossChainContext.underlying,
|
|
187
225
|
l1Client,
|
|
188
|
-
this.aztecNodeConfig
|
|
226
|
+
pickL1ContractAddresses(this.aztecNodeConfig),
|
|
189
227
|
this.wallet,
|
|
190
228
|
this.ownerAddress,
|
|
191
229
|
);
|
|
@@ -9,7 +9,7 @@ import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
|
9
9
|
import type { StatefulTestContract } from '@aztec/noir-test-contracts.js/StatefulTest';
|
|
10
10
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
11
11
|
|
|
12
|
-
import { type EndToEndContext, deployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
12
|
+
import { type EndToEndContext, type SetupOptions, deployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
13
13
|
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
14
14
|
|
|
15
15
|
export class DeployTest {
|
|
@@ -24,9 +24,10 @@ export class DeployTest {
|
|
|
24
24
|
this.logger = createLogger(`e2e:e2e_deploy_contract:${testName}`);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async setup() {
|
|
27
|
+
async setup(opts: Partial<SetupOptions> = {}) {
|
|
28
28
|
this.logger.info('Setting up test environment');
|
|
29
29
|
this.context = await setup(0, {
|
|
30
|
+
...opts,
|
|
30
31
|
fundSponsoredFPC: true,
|
|
31
32
|
skipAccountDeployment: true,
|
|
32
33
|
});
|