@aztec/end-to-end 0.0.0-test.1 → 0.0.1-commit.001888fc
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 +62 -0
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/benchmark.js +281 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +79 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/client_flows_benchmark.js +329 -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 +124 -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 +79 -0
- package/dest/bench/utils.d.ts +16 -41
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +44 -72
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +28 -19
- 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 +125 -103
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +32 -32
- 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 +105 -104
- package/dest/e2e_deploy_contract/deploy_test.d.ts +19 -10
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +26 -27
- package/dest/e2e_epochs/epochs_test.d.ts +75 -24
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +290 -58
- 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 +61 -0
- package/dest/e2e_fees/fees_test.d.ts +38 -23
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +169 -183
- package/dest/e2e_l1_publisher/write_json.d.ts +11 -0
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
- package/dest/e2e_l1_publisher/write_json.js +56 -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 +15 -15
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +36 -42
- 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 +136 -0
- package/dest/e2e_p2p/p2p_network.d.ts +282 -27
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +255 -176
- package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
- package/dest/e2e_p2p/reqresp/utils.js +190 -0
- package/dest/e2e_p2p/shared.d.ts +64 -8
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +200 -27
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
- package/dest/e2e_token_contract/token_contract_test.d.ts +29 -14
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +107 -75
- package/dest/fixtures/authwit_proxy.d.ts +15 -0
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
- package/dest/fixtures/authwit_proxy.js +30 -0
- package/dest/fixtures/e2e_prover_test.d.ts +55 -0
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
- package/dest/fixtures/e2e_prover_test.js +271 -0
- package/dest/fixtures/elu_monitor.d.ts +21 -0
- package/dest/fixtures/elu_monitor.d.ts.map +1 -0
- package/dest/fixtures/elu_monitor.js +102 -0
- package/dest/fixtures/fixtures.d.ts +10 -8
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +11 -5
- package/dest/fixtures/get_acvm_config.d.ts +2 -2
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_acvm_config.js +3 -15
- package/dest/fixtures/get_bb_config.d.ts +2 -2
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +10 -17
- package/dest/fixtures/ha_setup.d.ts +71 -0
- package/dest/fixtures/ha_setup.d.ts.map +1 -0
- package/dest/fixtures/ha_setup.js +116 -0
- package/dest/fixtures/index.d.ts +2 -1
- package/dest/fixtures/index.d.ts.map +1 -1
- package/dest/fixtures/index.js +1 -0
- package/dest/fixtures/l1_to_l2_messaging.d.ts +11 -7
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +45 -19
- package/dest/fixtures/logging.d.ts +1 -1
- package/dest/fixtures/setup.d.ts +239 -0
- package/dest/fixtures/setup.d.ts.map +1 -0
- package/dest/fixtures/setup.js +606 -0
- package/dest/fixtures/setup_p2p_test.d.ts +23 -15
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +102 -31
- package/dest/fixtures/token_utils.d.ts +10 -4
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +33 -13
- package/dest/fixtures/utils.d.ts +5 -153
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +4 -552
- 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/fixtures/with_telemetry_utils.d.ts +2 -2
- package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
- package/dest/fixtures/with_telemetry_utils.js +2 -2
- package/dest/index.d.ts +1 -1
- package/dest/quality_of_service/grafana_client.d.ts +41 -0
- package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
- package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
- package/dest/quality_of_service/prometheus_client.d.ts +38 -0
- package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
- package/dest/quality_of_service/prometheus_client.js +67 -0
- package/dest/shared/cross_chain_test_harness.d.ts +44 -27
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +107 -53
- package/dest/shared/gas_portal_test_harness.d.ts +33 -25
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +51 -30
- package/dest/shared/index.d.ts +3 -2
- package/dest/shared/index.d.ts.map +1 -1
- package/dest/shared/index.js +1 -0
- package/dest/shared/jest_setup.d.ts +1 -1
- package/dest/shared/jest_setup.js +42 -2
- package/dest/shared/mock_state_view.d.ts +86 -0
- package/dest/shared/mock_state_view.d.ts.map +1 -0
- package/dest/shared/mock_state_view.js +186 -0
- package/dest/shared/submit-transactions.d.ts +6 -4
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +15 -16
- package/dest/shared/uniswap_l1_l2.d.ts +3 -25
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +175 -126
- package/dest/simulators/index.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts +7 -7
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +17 -18
- package/dest/simulators/token_simulator.d.ts +6 -3
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +12 -30
- package/dest/spartan/setup_test_wallets.d.ts +36 -11
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +276 -62
- package/dest/spartan/tx_metrics.d.ts +88 -0
- package/dest/spartan/tx_metrics.d.ts.map +1 -0
- package/dest/spartan/tx_metrics.js +422 -0
- package/dest/spartan/utils/bot.d.ts +28 -0
- package/dest/spartan/utils/bot.d.ts.map +1 -0
- package/dest/spartan/utils/bot.js +142 -0
- package/dest/spartan/utils/chaos.d.ts +79 -0
- package/dest/spartan/utils/chaos.d.ts.map +1 -0
- package/dest/spartan/utils/chaos.js +142 -0
- package/dest/spartan/utils/clients.d.ts +39 -0
- package/dest/spartan/utils/clients.d.ts.map +1 -0
- package/dest/spartan/utils/clients.js +90 -0
- package/dest/spartan/utils/config.d.ts +45 -0
- package/dest/spartan/utils/config.d.ts.map +1 -0
- package/dest/spartan/utils/config.js +23 -0
- package/dest/spartan/utils/health.d.ts +63 -0
- package/dest/spartan/utils/health.d.ts.map +1 -0
- package/dest/spartan/utils/health.js +202 -0
- package/dest/spartan/utils/helm.d.ts +15 -0
- package/dest/spartan/utils/helm.d.ts.map +1 -0
- package/dest/spartan/utils/helm.js +47 -0
- package/dest/spartan/utils/index.d.ts +11 -0
- package/dest/spartan/utils/index.d.ts.map +1 -0
- package/dest/spartan/utils/index.js +22 -0
- package/dest/spartan/utils/k8s.d.ts +128 -0
- package/dest/spartan/utils/k8s.d.ts.map +1 -0
- package/dest/spartan/utils/k8s.js +381 -0
- package/dest/spartan/utils/nodes.d.ts +40 -0
- package/dest/spartan/utils/nodes.d.ts.map +1 -0
- package/dest/spartan/utils/nodes.js +461 -0
- 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/spartan/utils/scripts.d.ts +30 -0
- package/dest/spartan/utils/scripts.d.ts.map +1 -0
- package/dest/spartan/utils/scripts.js +81 -0
- package/dest/spartan/utils.d.ts +2 -415
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +1 -445
- package/dest/test-wallet/test_wallet.d.ts +83 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +214 -0
- package/dest/test-wallet/utils.d.ts +41 -0
- package/dest/test-wallet/utils.d.ts.map +1 -0
- package/dest/test-wallet/utils.js +71 -0
- package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
- package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
- package/dest/test-wallet/wallet_worker_script.js +48 -0
- package/dest/test-wallet/worker_wallet.d.ts +52 -0
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet.js +151 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts +274 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet_schema.js +10 -0
- package/package.json +72 -62
- package/src/bench/client_flows/benchmark.ts +363 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +388 -0
- package/src/bench/client_flows/config.ts +69 -0
- package/src/bench/client_flows/data_extractor.ts +89 -0
- package/src/bench/utils.ts +47 -86
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +149 -171
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +155 -182
- package/src/e2e_deploy_contract/deploy_test.ts +40 -48
- package/src/e2e_epochs/epochs_test.ts +364 -93
- package/src/e2e_fees/bridging_race.notest.ts +74 -0
- package/src/e2e_fees/fees_test.ts +213 -259
- package/src/e2e_l1_publisher/write_json.ts +77 -0
- package/src/e2e_multi_validator/utils.ts +258 -0
- package/src/e2e_nested_contract/nested_contract_test.ts +48 -59
- package/src/e2e_p2p/inactivity_slash_test.ts +179 -0
- package/src/e2e_p2p/p2p_network.ts +367 -234
- package/src/e2e_p2p/reqresp/utils.ts +256 -0
- package/src/e2e_p2p/shared.ts +315 -39
- package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
- package/src/e2e_token_contract/token_contract_test.ts +132 -126
- package/src/fixtures/authwit_proxy.ts +50 -0
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +332 -0
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +15 -7
- package/src/fixtures/get_acvm_config.ts +4 -12
- package/src/fixtures/get_bb_config.ts +18 -13
- package/src/fixtures/ha_setup.ts +186 -0
- package/src/fixtures/index.ts +1 -0
- package/src/fixtures/l1_to_l2_messaging.ts +56 -24
- package/src/fixtures/setup.ts +903 -0
- package/src/fixtures/setup_p2p_test.ts +134 -50
- package/src/fixtures/token_utils.ts +37 -16
- package/src/fixtures/utils.ts +27 -820
- package/src/fixtures/web3signer.ts +63 -0
- package/src/fixtures/with_telemetry_utils.ts +2 -2
- package/src/guides/up_quick_start.sh +9 -17
- package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +2 -2
- package/src/quality_of_service/prometheus_client.ts +113 -0
- package/src/shared/cross_chain_test_harness.ts +110 -94
- package/src/shared/gas_portal_test_harness.ts +59 -50
- package/src/shared/index.ts +2 -1
- package/src/shared/jest_setup.ts +52 -2
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +19 -20
- package/src/shared/uniswap_l1_l2.ts +207 -226
- package/src/simulators/lending_simulator.ts +18 -17
- package/src/simulators/token_simulator.ts +18 -34
- package/src/spartan/DEVELOP.md +128 -0
- package/src/spartan/setup_test_wallets.ts +393 -95
- package/src/spartan/tx_metrics.ts +376 -0
- package/src/spartan/utils/bot.ts +188 -0
- package/src/spartan/utils/chaos.ts +253 -0
- package/src/spartan/utils/clients.ts +100 -0
- package/src/spartan/utils/config.ts +29 -0
- package/src/spartan/utils/health.ts +255 -0
- package/src/spartan/utils/helm.ts +84 -0
- package/src/spartan/utils/index.ts +71 -0
- package/src/spartan/utils/k8s.ts +535 -0
- package/src/spartan/utils/nodes.ts +543 -0
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/spartan/utils/scripts.ts +99 -0
- package/src/spartan/utils.ts +1 -582
- package/src/test-wallet/test_wallet.ts +306 -0
- package/src/test-wallet/utils.ts +112 -0
- package/src/test-wallet/wallet_worker_script.ts +60 -0
- package/src/test-wallet/worker_wallet.ts +213 -0
- package/src/test-wallet/worker_wallet_schema.ts +13 -0
- package/dest/e2e_prover/e2e_prover_test.d.ts +0 -56
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
- package/dest/e2e_prover/e2e_prover_test.js +0 -291
- package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
- package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
- package/dest/fixtures/setup_l1_contracts.js +0 -17
- package/dest/fixtures/snapshot_manager.d.ts +0 -87
- package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
- package/dest/fixtures/snapshot_manager.js +0 -479
- package/dest/quality_of_service/alert_checker.d.ts +0 -41
- package/dest/quality_of_service/alert_checker.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/e2e_prover/e2e_prover_test.ts +0 -418
- package/src/fixtures/setup_l1_contracts.ts +0 -27
- package/src/fixtures/snapshot_manager.ts +0 -617
- 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
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import { AztecNodeService } from '@aztec/aztec-node';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { getTimestampRangeForEpoch } from '@aztec/aztec.js/block';
|
|
3
|
+
import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
|
|
4
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
5
|
+
import { MerkleTreeId } from '@aztec/aztec.js/trees';
|
|
6
|
+
import { EpochCache } from '@aztec/epoch-cache';
|
|
7
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
8
|
+
import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
|
|
4
9
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
5
|
-
import { waitUntilL1Timestamp } from '@aztec/ethereum/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
10
|
+
import { createDelayer, waitUntilL1Timestamp, wrapClientWithDelayer } from '@aztec/ethereum/l1-tx-utils';
|
|
11
|
+
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
12
|
+
import { CheckpointNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
13
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
14
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
15
|
+
import { withLoggerBindings } from '@aztec/foundation/log/server';
|
|
16
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
17
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
18
|
+
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
19
|
+
import { TestContract } from '@aztec/noir-test-contracts.js/Test';
|
|
20
|
+
import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
21
|
+
import { SequencerState } from '@aztec/sequencer-client';
|
|
22
|
+
import { EthAddress } from '@aztec/stdlib/block';
|
|
23
|
+
import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
24
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
9
25
|
import { join } from 'path';
|
|
26
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
10
27
|
import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
|
|
11
|
-
|
|
12
|
-
export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
|
|
13
|
-
export const EPOCH_DURATION_IN_L2_SLOTS = 4;
|
|
14
|
-
export const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
|
|
15
|
-
export const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
28
|
+
export const WORLD_STATE_CHECKPOINT_HISTORY = 2;
|
|
16
29
|
export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
17
30
|
export const ARCHIVER_POLL_INTERVAL = 50;
|
|
31
|
+
export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8;
|
|
18
32
|
/**
|
|
19
33
|
* Tests building of epochs using fast block times and short epochs.
|
|
20
34
|
* Spawns an aztec node and a prover node with fake proofs.
|
|
@@ -26,39 +40,68 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
26
40
|
constants;
|
|
27
41
|
logger;
|
|
28
42
|
monitor;
|
|
43
|
+
epochCache;
|
|
29
44
|
proverDelayer;
|
|
30
45
|
sequencerDelayer;
|
|
31
46
|
proverNodes = [];
|
|
32
47
|
nodes = [];
|
|
48
|
+
epochDuration;
|
|
49
|
+
L1_BLOCK_TIME_IN_S;
|
|
50
|
+
L2_SLOT_DURATION_IN_S;
|
|
33
51
|
static async setup(opts = {}) {
|
|
34
52
|
const test = new EpochsTestContext();
|
|
35
53
|
await test.setup(opts);
|
|
36
54
|
return test;
|
|
37
55
|
}
|
|
56
|
+
static getSlotDurations(opts = {}) {
|
|
57
|
+
const envEthereumSlotDuration = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : DEFAULT_L1_BLOCK_TIME;
|
|
58
|
+
const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
|
|
59
|
+
const aztecSlotDuration = opts.aztecSlotDuration ?? (opts.aztecSlotDurationInL1Slots ?? 2) * ethereumSlotDuration;
|
|
60
|
+
const aztecEpochDuration = opts.aztecEpochDuration ?? 6;
|
|
61
|
+
const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
|
|
62
|
+
const l1PublishingTime = opts.l1PublishingTime ?? 1;
|
|
63
|
+
return {
|
|
64
|
+
l1PublishingTime,
|
|
65
|
+
ethereumSlotDuration,
|
|
66
|
+
aztecSlotDuration,
|
|
67
|
+
aztecEpochDuration,
|
|
68
|
+
aztecProofSubmissionEpochs
|
|
69
|
+
};
|
|
70
|
+
}
|
|
38
71
|
async setup(opts = {}) {
|
|
72
|
+
const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs, l1PublishingTime } = EpochsTestContext.getSlotDurations(opts);
|
|
73
|
+
this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
|
|
74
|
+
this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
|
|
39
75
|
// Set up system without any account nor protocol contracts
|
|
40
76
|
// and with faster block times and shorter epochs.
|
|
41
|
-
const context = await setup(0, {
|
|
77
|
+
const context = await setup(opts.numberOfAccounts ?? 0, {
|
|
78
|
+
automineL1Setup: true,
|
|
42
79
|
checkIntervalMs: 50,
|
|
43
80
|
archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
|
|
44
81
|
worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
aztecProofSubmissionWindow: EPOCH_DURATION_IN_L2_SLOTS * 2 - 1,
|
|
82
|
+
aztecEpochDuration,
|
|
83
|
+
aztecSlotDuration,
|
|
84
|
+
ethereumSlotDuration,
|
|
85
|
+
aztecProofSubmissionEpochs,
|
|
86
|
+
aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
|
|
51
87
|
minTxsPerBlock: 0,
|
|
52
88
|
realProofs: false,
|
|
53
89
|
startProverNode: true,
|
|
90
|
+
proverTestDelayMs: opts.proverTestDelayMs ?? 0,
|
|
54
91
|
// We use numeric incremental prover ids for simplicity, but we can switch to
|
|
55
92
|
// using the prover's eth address if the proverId is used for something in the rollup contract
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
93
|
+
// Use numeric EthAddress for deterministic prover id
|
|
94
|
+
proverId: EthAddress.fromNumber(1),
|
|
95
|
+
worldStateCheckpointHistory: WORLD_STATE_CHECKPOINT_HISTORY,
|
|
96
|
+
exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
97
|
+
slasherFlavor: 'none',
|
|
98
|
+
l1PublishingTime,
|
|
61
99
|
...opts
|
|
100
|
+
}, // Use checkpointed chain tip for PXE by default to avoid issues with blocks being dropped due to pruned anchor blocks.
|
|
101
|
+
// Can be overridden via opts.pxeOpts.
|
|
102
|
+
{
|
|
103
|
+
syncChainTip: 'checkpointed',
|
|
104
|
+
...opts.pxeOpts
|
|
62
105
|
});
|
|
63
106
|
this.context = context;
|
|
64
107
|
this.proverNodes = context.proverNode ? [
|
|
@@ -68,51 +111,109 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
68
111
|
context.aztecNode
|
|
69
112
|
] : [];
|
|
70
113
|
this.logger = context.logger;
|
|
71
|
-
this.l1Client = context.deployL1ContractsValues.
|
|
114
|
+
this.l1Client = context.deployL1ContractsValues.l1Client;
|
|
72
115
|
this.rollup = RollupContract.getFromConfig(context.config);
|
|
116
|
+
this.epochCache = await EpochCache.create(this.rollup, context.config, {
|
|
117
|
+
dateProvider: context.dateProvider
|
|
118
|
+
});
|
|
73
119
|
// Loop that tracks L1 and L2 block numbers and logs whenever there's a new one.
|
|
74
|
-
this.monitor = new ChainMonitor(this.rollup, this.logger).start();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
this.proverDelayer
|
|
78
|
-
this.sequencerDelayer = context.sequencer.sequencer.publisher.l1TxUtils.delayer;
|
|
79
|
-
if (context.proverNode && !this.proverDelayer || !this.sequencerDelayer) {
|
|
120
|
+
this.monitor = new ChainMonitor(this.rollup, context.dateProvider, this.logger).start();
|
|
121
|
+
this.proverDelayer = context.proverDelayer;
|
|
122
|
+
this.sequencerDelayer = context.sequencerDelayer;
|
|
123
|
+
if (context.proverNode && !this.proverDelayer || context.sequencer && !this.sequencerDelayer) {
|
|
80
124
|
throw new Error(`Could not find prover or sequencer delayer`);
|
|
81
125
|
}
|
|
82
126
|
// Constants used for time calculation
|
|
127
|
+
this.epochDuration = aztecEpochDuration;
|
|
83
128
|
this.constants = {
|
|
84
|
-
epochDuration:
|
|
85
|
-
slotDuration:
|
|
129
|
+
epochDuration: aztecEpochDuration,
|
|
130
|
+
slotDuration: aztecSlotDuration,
|
|
86
131
|
l1StartBlock: await this.rollup.getL1StartBlock(),
|
|
87
132
|
l1GenesisTime: await this.rollup.getL1GenesisTime(),
|
|
88
|
-
ethereumSlotDuration
|
|
133
|
+
ethereumSlotDuration,
|
|
134
|
+
proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs()),
|
|
135
|
+
targetCommitteeSize: await this.rollup.getTargetCommitteeSize(),
|
|
136
|
+
rollupManaLimit: Number(await this.rollup.getManaLimit())
|
|
89
137
|
};
|
|
90
138
|
this.logger.info(`L2 genesis at L1 block ${this.constants.l1StartBlock} (timestamp ${this.constants.l1GenesisTime})`);
|
|
91
139
|
}
|
|
92
140
|
async teardown() {
|
|
93
|
-
this.monitor.stop();
|
|
94
|
-
await Promise.all(this.proverNodes.map((node)=>node.
|
|
95
|
-
await Promise.all(this.nodes.map((node)=>node.
|
|
141
|
+
await this.monitor.stop();
|
|
142
|
+
await Promise.all(this.proverNodes.map((node)=>tryStop(node, this.logger)));
|
|
143
|
+
await Promise.all(this.nodes.map((node)=>tryStop(node, this.logger)));
|
|
96
144
|
await this.context.teardown();
|
|
97
145
|
}
|
|
98
|
-
async createProverNode() {
|
|
146
|
+
async createProverNode(opts = {}) {
|
|
99
147
|
this.logger.warn('Creating and syncing a simulated prover node...');
|
|
100
148
|
const proverNodePrivateKey = this.getNextPrivateKey();
|
|
101
|
-
const
|
|
102
|
-
const
|
|
149
|
+
const proverIndex = this.proverNodes.length + 1;
|
|
150
|
+
const { mockGossipSubNetwork } = this.context;
|
|
151
|
+
const { proverNode } = await withLoggerBindings({
|
|
152
|
+
actor: `prover-${proverIndex}`
|
|
153
|
+
}, ()=>createAndSyncProverNode(proverNodePrivateKey, {
|
|
103
154
|
...this.context.config,
|
|
104
|
-
|
|
105
|
-
|
|
155
|
+
p2pEnabled: this.context.config.p2pEnabled || mockGossipSubNetwork !== undefined,
|
|
156
|
+
proverId: EthAddress.fromNumber(proverIndex),
|
|
157
|
+
dontStart: opts.dontStart,
|
|
158
|
+
...opts
|
|
159
|
+
}, {
|
|
160
|
+
dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex'))
|
|
161
|
+
}, {
|
|
162
|
+
dateProvider: this.context.dateProvider,
|
|
163
|
+
p2pClientDeps: {
|
|
164
|
+
p2pServiceFactory: mockGossipSubNetwork ? getMockPubSubP2PServiceFactory(mockGossipSubNetwork) : undefined,
|
|
165
|
+
rpcTxProviders: [
|
|
166
|
+
this.context.aztecNode
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}, {
|
|
170
|
+
prefilledPublicData: this.context.prefilledPublicData ?? [],
|
|
171
|
+
dontStart: opts.dontStart
|
|
172
|
+
}));
|
|
106
173
|
this.proverNodes.push(proverNode);
|
|
107
174
|
return proverNode;
|
|
108
175
|
}
|
|
109
|
-
|
|
176
|
+
createNonValidatorNode(opts = {}) {
|
|
110
177
|
this.logger.warn('Creating and syncing a node without a validator...');
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
178
|
+
return this.createNode({
|
|
179
|
+
...opts,
|
|
180
|
+
disableValidator: true
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
createValidatorNode(privateKeys, opts = {}) {
|
|
184
|
+
this.logger.warn('Creating and syncing a validator node...');
|
|
185
|
+
return this.createNode({
|
|
186
|
+
...opts,
|
|
187
|
+
disableValidator: false,
|
|
188
|
+
validatorPrivateKeys: new SecretValue(privateKeys)
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
async createNode(opts = {}) {
|
|
192
|
+
const nodeIndex = this.nodes.length + 1;
|
|
193
|
+
const actorPrefix = opts.disableValidator ? 'node' : 'validator';
|
|
194
|
+
const { mockGossipSubNetwork } = this.context;
|
|
195
|
+
const resolvedConfig = {
|
|
196
|
+
...this.context.config,
|
|
197
|
+
...opts
|
|
198
|
+
};
|
|
199
|
+
const p2pEnabled = resolvedConfig.p2pEnabled || mockGossipSubNetwork !== undefined;
|
|
200
|
+
const p2pIp = resolvedConfig.p2pIp ?? (p2pEnabled ? '127.0.0.1' : undefined);
|
|
201
|
+
const node = await withLoggerBindings({
|
|
202
|
+
actor: `${actorPrefix}-${nodeIndex}`
|
|
203
|
+
}, ()=>AztecNodeService.createAndSync({
|
|
204
|
+
...resolvedConfig,
|
|
205
|
+
dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex')),
|
|
206
|
+
validatorPrivateKeys: opts.validatorPrivateKeys ?? new SecretValue([]),
|
|
207
|
+
p2pEnabled,
|
|
208
|
+
p2pIp
|
|
209
|
+
}, {
|
|
210
|
+
dateProvider: this.context.dateProvider,
|
|
211
|
+
p2pClientDeps: {
|
|
212
|
+
p2pServiceFactory: mockGossipSubNetwork ? getMockPubSubP2PServiceFactory(mockGossipSubNetwork) : undefined
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
prefilledPublicData: this.context.prefilledPublicData,
|
|
216
|
+
...opts
|
|
116
217
|
}));
|
|
117
218
|
this.nodes.push(node);
|
|
118
219
|
return node;
|
|
@@ -122,34 +223,165 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
122
223
|
return `0x${key.toString('hex')}`;
|
|
123
224
|
}
|
|
124
225
|
/** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */ async waitUntilEpochStarts(epoch) {
|
|
125
|
-
const [start] = getTimestampRangeForEpoch(
|
|
226
|
+
const [start] = getTimestampRangeForEpoch(EpochNumber(epoch), this.constants);
|
|
126
227
|
this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
|
|
127
|
-
await waitUntilL1Timestamp(this.l1Client, start - BigInt(L1_BLOCK_TIME_IN_S));
|
|
228
|
+
await waitUntilL1Timestamp(this.l1Client, start - BigInt(this.L1_BLOCK_TIME_IN_S), undefined, 30 * this.epochDuration);
|
|
128
229
|
return start;
|
|
129
230
|
}
|
|
130
|
-
/** Waits until the given
|
|
131
|
-
await retryUntil(()=>Promise.resolve(target
|
|
231
|
+
/** Waits until the given checkpoint number is mined. */ async waitUntilCheckpointNumber(target, timeout = 120) {
|
|
232
|
+
await retryUntil(()=>Promise.resolve(target <= this.monitor.checkpointNumber), `Wait until checkpoint ${target}`, timeout, 0.1);
|
|
233
|
+
}
|
|
234
|
+
/** Waits until the given checkpoint number is marked as proven. */ async waitUntilProvenCheckpointNumber(target, timeout = 120) {
|
|
235
|
+
await retryUntil(()=>Promise.resolve(target <= this.monitor.provenCheckpointNumber), `Wait proven checkpoint ${target}`, timeout, 0.1);
|
|
236
|
+
return this.monitor.provenCheckpointNumber;
|
|
132
237
|
}
|
|
133
|
-
/** Waits until the
|
|
134
|
-
|
|
238
|
+
/** Waits until the last slot of the proof submission window for a given epoch. */ async waitUntilLastSlotOfProofSubmissionWindow(epochNumber) {
|
|
239
|
+
const deadline = getProofSubmissionDeadlineTimestamp(EpochNumber.fromBigInt(BigInt(epochNumber)), this.constants);
|
|
240
|
+
const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
|
|
241
|
+
const date = new Date(Number(oneSlotBefore) * 1000);
|
|
242
|
+
this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
|
|
243
|
+
oneSlotBefore
|
|
244
|
+
});
|
|
245
|
+
// Use a timeout that accounts for the full proof submission window
|
|
246
|
+
const proofSubmissionWindowDuration = this.constants.proofSubmissionEpochs * this.epochDuration * this.L2_SLOT_DURATION_IN_S;
|
|
247
|
+
await waitUntilL1Timestamp(this.l1Client, oneSlotBefore, undefined, proofSubmissionWindowDuration * 2);
|
|
135
248
|
}
|
|
136
249
|
/** Waits for the aztec node to sync to the target block number. */ async waitForNodeToSync(blockNumber, type) {
|
|
137
250
|
const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
|
|
138
251
|
let synched = false;
|
|
139
252
|
while(!synched){
|
|
140
253
|
await sleep(waitTime);
|
|
141
|
-
const syncState = await
|
|
142
|
-
|
|
143
|
-
|
|
254
|
+
const [syncState, tips] = await Promise.all([
|
|
255
|
+
this.context.aztecNode.getWorldStateSyncStatus(),
|
|
256
|
+
await this.context.aztecNode.getL2Tips()
|
|
257
|
+
]);
|
|
258
|
+
this.logger.info(`Wait for node synch ${blockNumber} ${type}`, {
|
|
259
|
+
blockNumber,
|
|
260
|
+
type,
|
|
261
|
+
syncState,
|
|
262
|
+
tips
|
|
263
|
+
});
|
|
264
|
+
if (type === 'proven') {
|
|
265
|
+
synched = tips.proven.block.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
|
|
266
|
+
} else if (type === 'finalized') {
|
|
267
|
+
synched = syncState.finalizedBlockNumber >= blockNumber;
|
|
144
268
|
} else {
|
|
145
269
|
synched = syncState.oldestHistoricBlockNumber >= blockNumber;
|
|
146
270
|
}
|
|
147
271
|
}
|
|
148
272
|
}
|
|
273
|
+
/** Registers the SpamContract on the given wallet. */ async registerSpamContract(wallet, salt = Fr.ZERO) {
|
|
274
|
+
const instance = await getContractInstanceFromInstantiationParams(SpamContract.artifact, {
|
|
275
|
+
constructorArgs: [],
|
|
276
|
+
constructorArtifact: undefined,
|
|
277
|
+
salt,
|
|
278
|
+
publicKeys: undefined,
|
|
279
|
+
deployer: undefined
|
|
280
|
+
});
|
|
281
|
+
await wallet.registerContract(instance, SpamContract.artifact);
|
|
282
|
+
return SpamContract.at(instance.address, wallet);
|
|
283
|
+
}
|
|
284
|
+
/** Registers the TestContract on the given wallet. */ async registerTestContract(wallet, salt = Fr.ZERO) {
|
|
285
|
+
const instance = await getContractInstanceFromInstantiationParams(TestContract.artifact, {
|
|
286
|
+
constructorArgs: [],
|
|
287
|
+
constructorArtifact: undefined,
|
|
288
|
+
salt,
|
|
289
|
+
publicKeys: undefined,
|
|
290
|
+
deployer: undefined
|
|
291
|
+
});
|
|
292
|
+
await wallet.registerContract(instance, TestContract.artifact);
|
|
293
|
+
return TestContract.at(instance.address, wallet);
|
|
294
|
+
}
|
|
295
|
+
/** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */ async createL1Client() {
|
|
296
|
+
const rawClient = createExtendedL1Client([
|
|
297
|
+
...this.l1Client.chain.rpcUrls.default.http
|
|
298
|
+
], privateKeyToAccount(this.getNextPrivateKey()), this.l1Client.chain);
|
|
299
|
+
const delayer = createDelayer(this.context.dateProvider, {
|
|
300
|
+
ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S
|
|
301
|
+
}, {});
|
|
302
|
+
const client = wrapClientWithDelayer(rawClient, delayer);
|
|
303
|
+
expect(await client.getBalance({
|
|
304
|
+
address: client.account.address
|
|
305
|
+
})).toBeGreaterThan(0n);
|
|
306
|
+
return {
|
|
307
|
+
client,
|
|
308
|
+
delayer
|
|
309
|
+
};
|
|
310
|
+
}
|
|
149
311
|
/** Verifies whether the given block number is found on the aztec node. */ async verifyHistoricBlock(blockNumber, expectedSuccess) {
|
|
150
|
-
|
|
151
|
-
|
|
312
|
+
// We use `findLeavesIndexes` here, but could use any function that queries the world-state
|
|
313
|
+
// at a particular block, so we know whether that historic block is available or has been
|
|
314
|
+
// pruned. Note that `getBlock` would not work here, since it only hits the archiver.
|
|
315
|
+
const result = await this.context.aztecNode.findLeavesIndexes(blockNumber, MerkleTreeId.NULLIFIER_TREE, [
|
|
316
|
+
Fr.ZERO
|
|
152
317
|
]).then((_)=>true).catch((_)=>false);
|
|
153
318
|
expect(result).toBe(expectedSuccess);
|
|
154
319
|
}
|
|
320
|
+
/** Verifies at least one checkpoint has the target number of blocks (for MBPS validation). */ async assertMultipleBlocksPerSlot(targetBlockCount) {
|
|
321
|
+
const archiver = this.context.aztecNode.getBlockSource();
|
|
322
|
+
const checkpoints = await archiver.getCheckpoints(CheckpointNumber(1), 50);
|
|
323
|
+
this.logger.warn(`Retrieved ${checkpoints.length} checkpoints from archiver`, {
|
|
324
|
+
checkpoints: checkpoints.map((pc)=>pc.checkpoint.getStats())
|
|
325
|
+
});
|
|
326
|
+
let expectedBlockNumber = checkpoints[0].checkpoint.blocks[0].number;
|
|
327
|
+
let targetFound = false;
|
|
328
|
+
for (const checkpoint of checkpoints){
|
|
329
|
+
const blockCount = checkpoint.checkpoint.blocks.length;
|
|
330
|
+
targetFound = targetFound || blockCount >= targetBlockCount;
|
|
331
|
+
this.logger.verbose(`Checkpoint ${checkpoint.checkpoint.number} has ${blockCount} blocks`, {
|
|
332
|
+
checkpoint: checkpoint.checkpoint.getStats()
|
|
333
|
+
});
|
|
334
|
+
for(let i = 0; i < blockCount; i++){
|
|
335
|
+
const block = checkpoint.checkpoint.blocks[i];
|
|
336
|
+
expect(block.indexWithinCheckpoint).toBe(i);
|
|
337
|
+
expect(block.checkpointNumber).toBe(checkpoint.checkpoint.number);
|
|
338
|
+
expect(block.number).toBe(expectedBlockNumber);
|
|
339
|
+
expectedBlockNumber++;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
expect(targetFound).toBe(true);
|
|
343
|
+
}
|
|
344
|
+
watchSequencerEvents(sequencers, getMetadata = ()=>({})) {
|
|
345
|
+
const stateChanges = [];
|
|
346
|
+
const failEvents = [];
|
|
347
|
+
// Note we do not include the 'block-tx-count-check-failed' event here, since it is fine if we dont build
|
|
348
|
+
// due to lack of txs available.
|
|
349
|
+
const failEventsKeys = [
|
|
350
|
+
'block-build-failed',
|
|
351
|
+
'checkpoint-publish-failed',
|
|
352
|
+
'proposer-rollup-check-failed'
|
|
353
|
+
];
|
|
354
|
+
const makeEvent = (i, eventName, args)=>({
|
|
355
|
+
...args,
|
|
356
|
+
type: eventName,
|
|
357
|
+
sequencerIndex: i + 2,
|
|
358
|
+
...getMetadata(i)
|
|
359
|
+
});
|
|
360
|
+
sequencers.forEach((sequencer, i)=>{
|
|
361
|
+
const sequencerIndex = i + 2;
|
|
362
|
+
sequencer.getSequencer().on('state-changed', (args)=>{
|
|
363
|
+
const noisyStates = [
|
|
364
|
+
SequencerState.IDLE,
|
|
365
|
+
SequencerState.PROPOSER_CHECK,
|
|
366
|
+
SequencerState.SYNCHRONIZING
|
|
367
|
+
];
|
|
368
|
+
if (!noisyStates.includes(args.newState)) {
|
|
369
|
+
const evt = makeEvent(i, 'state-changed', args);
|
|
370
|
+
stateChanges.push(evt);
|
|
371
|
+
this.logger.verbose(`Sequencer ${sequencerIndex} transitioned from state ${args.oldState} to state ${args.newState}`, evt);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
failEventsKeys.forEach((eventName)=>{
|
|
375
|
+
sequencer.getSequencer().on(eventName, (args)=>{
|
|
376
|
+
const evt = makeEvent(i, eventName, args);
|
|
377
|
+
failEvents.push(evt);
|
|
378
|
+
this.logger.error(`Failed event ${eventName} from sequencer ${sequencerIndex}`, undefined, evt);
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
return {
|
|
383
|
+
failEvents,
|
|
384
|
+
stateChanges
|
|
385
|
+
};
|
|
386
|
+
}
|
|
155
387
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridging_race.notest.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/bridging_race.notest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
2
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
+
import { Fq } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
5
|
+
import { jest } from '@jest/globals';
|
|
6
|
+
import { FeesTest } from './fees_test.js';
|
|
7
|
+
jest.setTimeout(300_000);
|
|
8
|
+
// Regression for https://github.com/AztecProtocol/aztec-packages/issues/12366
|
|
9
|
+
// Similar to e2e_fees/account_init but with no automine
|
|
10
|
+
describe('e2e_fees bridging_race', ()=>{
|
|
11
|
+
const ETHEREUM_SLOT_DURATION = 4;
|
|
12
|
+
const AZTEC_SLOT_DURATION = ETHEREUM_SLOT_DURATION * 2;
|
|
13
|
+
const t = new FeesTest('bridging_race', 1, {
|
|
14
|
+
ethereumSlotDuration: ETHEREUM_SLOT_DURATION,
|
|
15
|
+
aztecSlotDuration: AZTEC_SLOT_DURATION,
|
|
16
|
+
minTxsPerBlock: 0
|
|
17
|
+
});
|
|
18
|
+
beforeAll(async ()=>{
|
|
19
|
+
await t.setup();
|
|
20
|
+
({ wallet, logger } = t);
|
|
21
|
+
});
|
|
22
|
+
afterAll(async ()=>{
|
|
23
|
+
await t.teardown();
|
|
24
|
+
});
|
|
25
|
+
let logger;
|
|
26
|
+
let bobsAddress;
|
|
27
|
+
let wallet;
|
|
28
|
+
beforeEach(async ()=>{
|
|
29
|
+
const bobsSecretKey = Fr.random();
|
|
30
|
+
const bobsPrivateSigningKey = Fq.random();
|
|
31
|
+
const bobsSalt = Fr.random();
|
|
32
|
+
const bobsAccountManager = await wallet.createAccount({
|
|
33
|
+
secret: bobsSecretKey,
|
|
34
|
+
salt: bobsSalt,
|
|
35
|
+
contract: new SchnorrAccountContract(bobsPrivateSigningKey)
|
|
36
|
+
});
|
|
37
|
+
bobsAddress = bobsAccountManager.address;
|
|
38
|
+
});
|
|
39
|
+
it('Alice bridges funds to Bob', async ()=>{
|
|
40
|
+
// Tweak the token manager so the bridging happens immediately before the end of the current L2 slot
|
|
41
|
+
// This caused the message to be "not in state" when tried to be used
|
|
42
|
+
const l1TokenManager = t.feeJuiceBridgeTestHarness.l1TokenManager;
|
|
43
|
+
const origApprove = l1TokenManager.approve.bind(l1TokenManager);
|
|
44
|
+
l1TokenManager.approve = async (amount, address, addressName = '')=>{
|
|
45
|
+
await origApprove(amount, address, addressName);
|
|
46
|
+
const sleepTime = (Number(t.chainMonitor.checkpointTimestamp) + AZTEC_SLOT_DURATION) * 1000 - Date.now() - 500;
|
|
47
|
+
logger.info(`Sleeping for ${sleepTime}ms until near end of L2 slot before sending L1 fee juice to L2 inbox`);
|
|
48
|
+
await sleep(sleepTime);
|
|
49
|
+
};
|
|
50
|
+
// Waiting for the archiver to sync the message _before_ waiting for the mandatory 2 L2 blocks to pass fixed it
|
|
51
|
+
// This was added everywhere we wait for two blocks, which is spread across three different places in the codebase
|
|
52
|
+
// Yes, we need to REFACTOR it at some point
|
|
53
|
+
const claim = await t.feeJuiceBridgeTestHarness.prepareTokensOnL1(bobsAddress);
|
|
54
|
+
const { claimSecret: secret, messageLeafIndex: index } = claim;
|
|
55
|
+
await t.feeJuiceContract.methods.claim(bobsAddress, claim.claimAmount, secret, index).send({
|
|
56
|
+
from: bobsAddress
|
|
57
|
+
});
|
|
58
|
+
const [balance] = await t.getGasBalanceFn(bobsAddress);
|
|
59
|
+
expect(balance).toEqual(claim.claimAmount);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -1,73 +1,88 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { type Logger } from '@aztec/aztec.js/log';
|
|
3
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
4
|
+
import { CheatCodes } from '@aztec/aztec/testing';
|
|
5
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
6
|
+
import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
7
|
+
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
8
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
9
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
10
|
import { AppSubscriptionContract } from '@aztec/noir-contracts.js/AppSubscription';
|
|
5
|
-
import { CounterContract } from '@aztec/noir-contracts.js/Counter';
|
|
6
11
|
import { FPCContract } from '@aztec/noir-contracts.js/FPC';
|
|
7
12
|
import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
|
|
13
|
+
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
8
14
|
import { TokenContract as BananaCoin } from '@aztec/noir-contracts.js/Token';
|
|
15
|
+
import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
|
|
9
16
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
10
|
-
import {
|
|
11
|
-
import { type
|
|
17
|
+
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
18
|
+
import { type EndToEndContext, type SetupOptions } from '../fixtures/setup.js';
|
|
19
|
+
import { type BalancesFn } from '../fixtures/utils.js';
|
|
12
20
|
import { type GasBridgingTestHarness } from '../shared/gas_portal_test_harness.js';
|
|
21
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
13
22
|
/**
|
|
14
|
-
* Test fixture for testing fees. Provides the following
|
|
23
|
+
* Test fixture for testing fees. Provides the following setup steps:
|
|
15
24
|
* InitialAccounts: Initializes 3 Schnorr account contracts.
|
|
16
25
|
* PublicDeployAccounts: Deploys the accounts publicly.
|
|
17
26
|
* DeployFeeJuice: Deploys the Fee Juice contract.
|
|
18
27
|
* FPCSetup: Deploys BananaCoin and FPC contracts, and bridges gas from L1.
|
|
28
|
+
* SponsoredFPCSetup: Deploys Sponsored FPC contract, and bridges gas from L1.
|
|
19
29
|
* FundAlice: Mints private and public bananas to Alice.
|
|
20
30
|
* SetupSubscription: Deploys a counter contract and a subscription contract, and mints Fee Juice to the subscription contract.
|
|
21
31
|
*/
|
|
22
32
|
export declare class FeesTest {
|
|
23
33
|
private numberOfAccounts;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
34
|
+
private setupOptions;
|
|
35
|
+
private accounts;
|
|
36
|
+
context: EndToEndContext;
|
|
26
37
|
logger: Logger;
|
|
27
|
-
pxe: PXE;
|
|
28
38
|
aztecNode: AztecNode;
|
|
39
|
+
aztecNodeAdmin: AztecNodeAdmin;
|
|
29
40
|
cheatCodes: CheatCodes;
|
|
30
|
-
|
|
41
|
+
wallet: TestWallet;
|
|
31
42
|
aliceAddress: AztecAddress;
|
|
32
|
-
bobWallet: AccountWallet;
|
|
33
43
|
bobAddress: AztecAddress;
|
|
34
44
|
sequencerAddress: AztecAddress;
|
|
35
45
|
coinbase: EthAddress;
|
|
36
46
|
fpcAdmin: AztecAddress;
|
|
37
47
|
gasSettings: GasSettings;
|
|
48
|
+
rollupContract: RollupContract;
|
|
38
49
|
feeJuiceContract: FeeJuiceContract;
|
|
39
50
|
bananaCoin: BananaCoin;
|
|
40
51
|
bananaFPC: FPCContract;
|
|
52
|
+
sponsoredFPC: SponsoredFPCContract;
|
|
41
53
|
counterContract: CounterContract;
|
|
42
54
|
subscriptionContract: AppSubscriptionContract;
|
|
43
55
|
feeJuiceBridgeTestHarness: GasBridgingTestHarness;
|
|
44
|
-
context: SubsystemsContext;
|
|
45
56
|
chainMonitor: ChainMonitor;
|
|
46
57
|
getCoinbaseBalance: () => Promise<bigint>;
|
|
47
58
|
getCoinbaseSequencerRewards: () => Promise<bigint>;
|
|
48
59
|
getGasBalanceFn: BalancesFn;
|
|
49
60
|
getBananaPublicBalanceFn: BalancesFn;
|
|
50
61
|
getBananaPrivateBalanceFn: BalancesFn;
|
|
51
|
-
getProverFee: (blockNumber:
|
|
62
|
+
getProverFee: (blockNumber: BlockNumber) => Promise<bigint>;
|
|
52
63
|
readonly ALICE_INITIAL_BANANAS: bigint;
|
|
53
64
|
readonly SUBSCRIPTION_AMOUNT: bigint;
|
|
54
65
|
readonly APP_SPONSORED_TX_GAS_LIMIT: bigint;
|
|
55
|
-
constructor(testName: string, numberOfAccounts?: number, setupOptions?: Partial<SetupOptions &
|
|
66
|
+
constructor(testName: string, numberOfAccounts?: number, setupOptions?: Partial<SetupOptions & DeployAztecL1ContractsArgs>);
|
|
56
67
|
setup(): Promise<this>;
|
|
57
68
|
teardown(): Promise<void>;
|
|
58
69
|
setIsMarkingAsProven(b: boolean): void;
|
|
59
70
|
catchUpProvenChain(): Promise<void>;
|
|
60
|
-
|
|
71
|
+
getBlockRewards(): Promise<{
|
|
72
|
+
sequencerBlockRewards: bigint;
|
|
73
|
+
proverBlockRewards: bigint;
|
|
74
|
+
}>;
|
|
75
|
+
mintAndBridgeFeeJuice(minter: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
61
76
|
/** Alice mints bananaCoin tokens privately to the target address and redeems them. */
|
|
62
77
|
mintPrivateBananas(amount: bigint, address: AztecAddress): Promise<void>;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
applyBaseSetup(): Promise<void>;
|
|
79
|
+
applyInitialAccounts(): Promise<void>;
|
|
80
|
+
applyPublicDeployAccounts(): Promise<void>;
|
|
81
|
+
applySetupFeeJuice(): Promise<void>;
|
|
82
|
+
applyDeployBananaToken(): Promise<void>;
|
|
83
|
+
applyFPCSetup(): Promise<void>;
|
|
84
|
+
applySponsoredFPCSetup(): Promise<void>;
|
|
69
85
|
applyFundAliceWithBananas(): Promise<void>;
|
|
70
86
|
applyFundAliceWithPrivateBananas(): Promise<void>;
|
|
71
|
-
applySetupSubscription(): Promise<void>;
|
|
72
87
|
}
|
|
73
|
-
//# sourceMappingURL=
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlc190ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZTJlX2ZlZXMvZmVlc190ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzlELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSxxQkFBcUIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsVUFBVSxFQUFpQyxNQUFNLHNCQUFzQixDQUFDO0FBRWpGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRCxPQUFPLEtBQUssRUFBRSwwQkFBMEIsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBQzVGLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNwRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDOUQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRzNELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBDQUEwQyxDQUFDO0FBQ25GLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUNyRSxPQUFPLEVBQUUsb0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sQ0FBQyxDQUFDLEVBQUUsT0FBTyxRQUU5QjtJQUVLLGtCQUFrQixrQkFLdkI7SUFFSyxlQUFlOzs7T0FXcEI7SUFFSyxxQkFBcUIsQ0FBQyxNQUFNLEVBQUUsWUFBWSxFQUFFLFNBQVMsRUFBRSxZQUFZLGlCQUl4RTtJQUVELHNGQUFzRjtJQUNoRixrQkFBa0IsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sRUFBRSxZQUFZLGlCQVc3RDtJQUVZLGNBQWMsa0JBSzFCO0lBRUssb0JBQW9CLGtCQXlCekI7SUFFSyx5QkFBeUIsa0JBRzlCO0lBRUssa0JBQWtCLGtCQWN2QjtJQUVLLHNCQUFzQixrQkFlM0I7SUFFWSxhQUFhLGtCQXdEekI7SUFFWSxzQkFBc0Isa0JBVWxDO0lBRVkseUJBQXlCLGtCQU9yQztJQUVZLGdDQUFnQyxrQkFJNUM7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/fees_test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/fees_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAiC,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9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