@aztec/end-to-end 0.0.1-commit.86469d5 → 0.0.1-commit.8655d4a
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 +3 -3
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +36 -39
- package/dest/bench/client_flows/config.d.ts +2 -2
- package/dest/bench/client_flows/config.d.ts.map +1 -1
- package/dest/bench/client_flows/config.js +18 -0
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +8 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +8 -5
- 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 +36 -17
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +16 -5
- 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 +42 -9
- package/dest/e2e_deploy_contract/deploy_test.d.ts +4 -4
- 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 +33 -8
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +143 -44
- package/dest/e2e_fees/fees_test.d.ts +6 -3
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +50 -17
- 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 +6 -7
- 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 +14 -12
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +70 -34
- package/dest/e2e_p2p/reqresp/utils.d.ts +3 -3
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
- package/dest/e2e_p2p/reqresp/utils.js +67 -14
- package/dest/e2e_p2p/shared.d.ts +26 -8
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +78 -51
- 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 +6 -4
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +23 -11
- 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 +34 -0
- package/dest/fixtures/e2e_prover_test.d.ts +9 -8
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +39 -50
- 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 +77 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +74 -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 +4 -2
- 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 +80 -32
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +186 -167
- package/dest/fixtures/setup_p2p_test.d.ts +22 -10
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +23 -17
- package/dest/fixtures/token_utils.d.ts +2 -2
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +5 -7
- 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 +22 -18
- 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 +19 -10
- package/dest/shared/index.d.ts +2 -1
- package/dest/shared/index.d.ts.map +1 -1
- package/dest/shared/index.js +1 -0
- package/dest/shared/jest_setup.js +41 -1
- 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 +2 -2
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +1 -1
- 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 +62 -39
- 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 +26 -14
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +3 -24
- package/dest/spartan/setup_test_wallets.d.ts +12 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +103 -40
- 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 +74 -21
- package/dest/spartan/utils/bot.d.ts +3 -2
- package/dest/spartan/utils/bot.d.ts.map +1 -1
- package/dest/spartan/utils/bot.js +2 -1
- package/dest/spartan/utils/config.d.ts +11 -28
- package/dest/spartan/utils/config.d.ts.map +1 -1
- package/dest/spartan/utils/config.js +4 -1
- package/dest/spartan/utils/index.d.ts +5 -3
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +5 -1
- package/dest/spartan/utils/k8s.d.ts +3 -1
- package/dest/spartan/utils/k8s.d.ts.map +1 -1
- package/dest/spartan/utils/k8s.js +6 -0
- package/dest/spartan/utils/nodes.d.ts +4 -5
- package/dest/spartan/utils/nodes.d.ts.map +1 -1
- package/dest/spartan/utils/nodes.js +11 -11
- 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 +18 -4
- package/dest/spartan/utils/scripts.d.ts.map +1 -1
- package/dest/spartan/utils/scripts.js +19 -4
- package/dest/test-wallet/test_wallet.d.ts +85 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +273 -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 +66 -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 +53 -0
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet.js +155 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts +160 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet_schema.js +22 -0
- package/package.json +49 -45
- package/src/bench/client_flows/benchmark.ts +19 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +64 -49
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/utils.ts +10 -4
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +52 -25
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +56 -19
- package/src/e2e_deploy_contract/deploy_test.ts +6 -5
- package/src/e2e_epochs/epochs_test.ts +166 -68
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +57 -32
- package/src/e2e_nested_contract/nested_contract_test.ts +10 -6
- package/src/e2e_p2p/inactivity_slash_test.ts +9 -7
- package/src/e2e_p2p/p2p_network.ts +93 -49
- package/src/e2e_p2p/reqresp/utils.ts +84 -17
- package/src/e2e_p2p/shared.ts +95 -65
- 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 +38 -11
- package/src/fixtures/authwit_proxy.ts +54 -0
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +49 -56
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +96 -0
- package/src/fixtures/get_bb_config.ts +7 -6
- package/src/fixtures/ha_setup.ts +7 -3
- package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
- package/src/fixtures/setup.ts +251 -231
- package/src/fixtures/setup_p2p_test.ts +37 -32
- package/src/fixtures/token_utils.ts +3 -3
- 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 +3 -5
- package/src/install_legacy_contracts.cjs +75 -0
- package/src/legacy-jest-resolver.cjs +112 -0
- package/src/shared/cross_chain_test_harness.ts +27 -13
- package/src/shared/gas_portal_test_harness.ts +21 -11
- package/src/shared/index.ts +1 -0
- package/src/shared/jest_setup.ts +51 -1
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +3 -2
- package/src/shared/uniswap_l1_l2.ts +80 -55
- package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
- package/src/simulators/lending_simulator.ts +32 -14
- package/src/simulators/token_simulator.ts +6 -30
- package/src/spartan/setup_test_wallets.ts +142 -34
- package/src/spartan/tx_metrics.ts +82 -24
- package/src/spartan/utils/bot.ts +4 -1
- package/src/spartan/utils/config.ts +3 -0
- package/src/spartan/utils/index.ts +8 -1
- package/src/spartan/utils/k8s.ts +8 -0
- package/src/spartan/utils/nodes.ts +17 -12
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/spartan/utils/scripts.ts +43 -7
- package/src/test-wallet/test_wallet.ts +376 -0
- package/src/test-wallet/utils.ts +108 -0
- package/src/test-wallet/wallet_worker_script.ts +60 -0
- package/src/test-wallet/worker_wallet.ts +218 -0
- package/src/test-wallet/worker_wallet_schema.ts +13 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAA2B,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAc,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAG5B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,UAAU,EAAE,MAA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MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAuBrG;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;EAyBxB,CAAC;AAEJ;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,YAAY,EAAE,EAChC,eAAe,UAAQ,EACvB,IAAI,CAAC,EAAE,SAAS,iBAwBjB;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,iBAKlE;AAGD,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC"}
|
package/dest/fixtures/setup.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
|
|
2
|
-
import { generateSchnorrAccounts
|
|
3
|
-
import { createArchiver } from '@aztec/archiver';
|
|
2
|
+
import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
4
3
|
import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
5
|
-
import {
|
|
4
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
5
|
+
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
6
6
|
import { BatchCall, getContractClassFromArtifact, waitForProven } from '@aztec/aztec.js/contracts';
|
|
7
7
|
import { publishContractClass, publishInstance } from '@aztec/aztec.js/deployment';
|
|
8
8
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
9
9
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
10
|
-
import { createAztecNodeClient, waitForNode } from '@aztec/aztec.js/node';
|
|
11
10
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
|
|
12
|
-
import { createBlobClientWithFileStores } from '@aztec/blob-client/client';
|
|
13
11
|
import { SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
14
12
|
import { isAnvilTestChain } from '@aztec/ethereum/chain';
|
|
15
13
|
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
@@ -17,7 +15,7 @@ import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
|
17
15
|
import { NULL_KEY } from '@aztec/ethereum/constants';
|
|
18
16
|
import { deployMulticall3 } from '@aztec/ethereum/contracts';
|
|
19
17
|
import { deployAztecL1Contracts } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
20
|
-
import {
|
|
18
|
+
import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
21
19
|
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
22
20
|
import { SecretValue } from '@aztec/foundation/config';
|
|
23
21
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
@@ -25,32 +23,33 @@ import { tryRmDir } from '@aztec/foundation/fs';
|
|
|
25
23
|
import { withLoggerBindings } from '@aztec/foundation/log/server';
|
|
26
24
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
27
25
|
import { sleep } from '@aztec/foundation/sleep';
|
|
28
|
-
import {
|
|
26
|
+
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
29
27
|
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
30
28
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
31
29
|
import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
32
30
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
33
|
-
import { createProverNode } from '@aztec/prover-node';
|
|
34
31
|
import { getPXEConfig } from '@aztec/pxe/server';
|
|
32
|
+
import { AuthRegistryArtifact, getStandardAuthRegistry } from '@aztec/standard-contracts/auth-registry';
|
|
33
|
+
import { PublicChecksArtifact, getStandardPublicChecks } from '@aztec/standard-contracts/public-checks';
|
|
34
|
+
import { ARTIFACT_VERSION_BEFORE_INJECTION } from '@aztec/stdlib/abi';
|
|
35
35
|
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
36
36
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
37
37
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
38
38
|
import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
39
|
-
import {
|
|
39
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
40
40
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
41
41
|
import fs from 'fs/promises';
|
|
42
42
|
import { tmpdir } from 'os';
|
|
43
43
|
import path from 'path';
|
|
44
44
|
import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
|
|
45
45
|
import { foundry } from 'viem/chains';
|
|
46
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
46
47
|
import { MNEMONIC, TEST_MAX_PENDING_TX_POOL_COUNT, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
|
|
47
48
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
48
49
|
import { getBBConfig } from './get_bb_config.js';
|
|
49
50
|
import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js';
|
|
50
51
|
import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
|
|
51
52
|
export { startAnvil };
|
|
52
|
-
const { AZTEC_NODE_URL = '' } = process.env;
|
|
53
|
-
const getAztecUrl = ()=>AZTEC_NODE_URL;
|
|
54
53
|
let telemetry = undefined;
|
|
55
54
|
async function getTelemetryClient(partialConfig = {}) {
|
|
56
55
|
if (!telemetry) {
|
|
@@ -111,63 +110,23 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
111
110
|
};
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
logger.verbose(`Retrieving contract addresses from ${aztecNodeUrl}`);
|
|
122
|
-
const { l1ContractAddresses, rollupVersion } = await aztecNode.getNodeInfo();
|
|
123
|
-
const l1Client = createExtendedL1Client(config.l1RpcUrls, account, foundry);
|
|
124
|
-
const deployL1ContractsValues = {
|
|
125
|
-
l1ContractAddresses,
|
|
126
|
-
l1Client,
|
|
127
|
-
rollupVersion
|
|
128
|
-
};
|
|
129
|
-
const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls, new DateProvider());
|
|
130
|
-
const wallet = await TestWallet.create(aztecNode);
|
|
131
|
-
if (config.walletMinFeePadding !== undefined) {
|
|
132
|
-
wallet.setMinFeePadding(config.walletMinFeePadding);
|
|
113
|
+
* When CONTRACT_ARTIFACTS_VERSION is set (backwards compatibility testing), asserts that the loaded artifact's
|
|
114
|
+
* aztecVersion matches the expected version. This is a sanity check verifying that the legacy artifact resolver
|
|
115
|
+
* actually swapped in the correct version.
|
|
116
|
+
*/ function assertContractArtifactsVersion() {
|
|
117
|
+
const expected = process.env.CONTRACT_ARTIFACTS_VERSION;
|
|
118
|
+
if (!expected) {
|
|
119
|
+
return;
|
|
133
120
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
121
|
+
const { aztecVersion } = SponsoredFPCContract.artifact;
|
|
122
|
+
// TODO(F-557): Remove this bypass once pre-version artifacts are no longer tested.
|
|
123
|
+
if (aztecVersion === ARTIFACT_VERSION_BEFORE_INJECTION) {
|
|
124
|
+
createLogger('e2e:setup').info(`Skipping artifact version check: artifact predates version injection (CONTRACT_ARTIFACTS_VERSION=${expected})`);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (aztecVersion !== expected) {
|
|
128
|
+
throw new Error(`Artifact version mismatch: expected ${expected} but got ${aztecVersion}. ` + `The legacy artifact resolver may not have swapped in the correct version.`);
|
|
140
129
|
}
|
|
141
|
-
const testAccounts = await Promise.all(initialFundedAccounts.slice(0, numberOfAccounts).map(async (account)=>{
|
|
142
|
-
const accountManager = await wallet.createSchnorrAccount(account.secret, account.salt, account.signingKey);
|
|
143
|
-
return accountManager.address;
|
|
144
|
-
}));
|
|
145
|
-
return {
|
|
146
|
-
anvil: undefined,
|
|
147
|
-
aztecNode,
|
|
148
|
-
aztecNodeService: undefined,
|
|
149
|
-
aztecNodeAdmin: undefined,
|
|
150
|
-
sequencer: undefined,
|
|
151
|
-
proverNode: undefined,
|
|
152
|
-
deployL1ContractsValues,
|
|
153
|
-
config,
|
|
154
|
-
aztecNodeConfig: config,
|
|
155
|
-
initialFundedAccounts,
|
|
156
|
-
wallet,
|
|
157
|
-
accounts: testAccounts,
|
|
158
|
-
logger,
|
|
159
|
-
cheatCodes,
|
|
160
|
-
ethCheatCodes,
|
|
161
|
-
prefilledPublicData: undefined,
|
|
162
|
-
mockGossipSubNetwork: undefined,
|
|
163
|
-
watcher: undefined,
|
|
164
|
-
dateProvider: undefined,
|
|
165
|
-
telemetryClient: undefined,
|
|
166
|
-
acvmConfig: undefined,
|
|
167
|
-
bbConfig: undefined,
|
|
168
|
-
directoryToCleanup: undefined,
|
|
169
|
-
teardown
|
|
170
|
-
};
|
|
171
130
|
}
|
|
172
131
|
/**
|
|
173
132
|
* Sets up the environment for the end-to-end tests.
|
|
@@ -175,10 +134,11 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
175
134
|
* @param opts - Options to pass to the node initialization and to the setup script.
|
|
176
135
|
* @param pxeOpts - Options to pass to the PXE initialization.
|
|
177
136
|
*/ export async function setup(numberOfAccounts = 1, opts = {}, pxeOpts = {}, chain = foundry) {
|
|
137
|
+
assertContractArtifactsVersion();
|
|
178
138
|
let anvil;
|
|
179
139
|
try {
|
|
180
140
|
opts.aztecTargetCommitteeSize ??= 0;
|
|
181
|
-
opts.
|
|
141
|
+
opts.slasherEnabled ??= false;
|
|
182
142
|
const config = {
|
|
183
143
|
...getConfigEnvVars(),
|
|
184
144
|
...opts
|
|
@@ -191,7 +151,10 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
191
151
|
config.realProofs = !!opts.realProofs;
|
|
192
152
|
// Only enforce the time table if requested
|
|
193
153
|
config.enforceTimeTable = !!opts.enforceTimeTable;
|
|
154
|
+
// Enable the tx delayer for tests (default config has it disabled, so we force-enable it here)
|
|
155
|
+
config.enableDelayer = true;
|
|
194
156
|
config.listenAddress = '127.0.0.1';
|
|
157
|
+
config.minTxPoolAgeMs = opts.minTxPoolAgeMs ?? 0;
|
|
195
158
|
const logger = getLogger();
|
|
196
159
|
// Create a temp directory for any services that need it and cleanup later
|
|
197
160
|
const directoryToCleanup = path.join(tmpdir(), randomBytes(8).toString('hex'));
|
|
@@ -201,17 +164,17 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
201
164
|
if (!config.dataDirectory) {
|
|
202
165
|
config.dataDirectory = directoryToCleanup;
|
|
203
166
|
}
|
|
167
|
+
const dateProvider = new TestDateProvider();
|
|
204
168
|
if (!config.l1RpcUrls?.length) {
|
|
205
169
|
if (!isAnvilTestChain(chain.id)) {
|
|
206
170
|
throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
|
|
207
171
|
}
|
|
208
|
-
if (AZTEC_NODE_URL) {
|
|
209
|
-
throw new Error(`AZTEC_NODE_URL provided but no ETHEREUM_HOSTS set. Refusing to run, please set both variables so tests can deploy L1 contracts to the same Anvil instance`);
|
|
210
|
-
}
|
|
211
172
|
const res = await startAnvil({
|
|
212
173
|
l1BlockTime: opts.ethereumSlotDuration,
|
|
213
174
|
accounts: opts.anvilAccounts,
|
|
214
|
-
port: opts.anvilPort ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : undefined)
|
|
175
|
+
port: opts.anvilPort ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : undefined),
|
|
176
|
+
slotsInAnEpoch: opts.anvilSlotsInAnEpoch,
|
|
177
|
+
dateProvider
|
|
215
178
|
});
|
|
216
179
|
anvil = res.anvil;
|
|
217
180
|
config.l1RpcUrls = [
|
|
@@ -224,7 +187,6 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
224
187
|
logger.info(`Logging metrics to ${filename}`);
|
|
225
188
|
setupMetricsLogger(filename);
|
|
226
189
|
}
|
|
227
|
-
const dateProvider = new TestDateProvider();
|
|
228
190
|
const ethCheatCodes = new EthCheatCodesWithState(config.l1RpcUrls, dateProvider);
|
|
229
191
|
if (opts.stateLoad) {
|
|
230
192
|
await ethCheatCodes.loadChainState(opts.stateLoad);
|
|
@@ -239,8 +201,8 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
239
201
|
if (opts.l1PublisherKey && opts.l1PublisherKey.getValue() && opts.l1PublisherKey.getValue() != NULL_KEY) {
|
|
240
202
|
publisherPrivKeyHex = opts.l1PublisherKey.getValue();
|
|
241
203
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
242
|
-
} else if (config.
|
|
243
|
-
publisherPrivKeyHex = config.
|
|
204
|
+
} else if (config.sequencerPublisherPrivateKeys && config.sequencerPublisherPrivateKeys.length > 0 && config.sequencerPublisherPrivateKeys[0].getValue() != NULL_KEY) {
|
|
205
|
+
publisherPrivKeyHex = config.sequencerPublisherPrivateKeys[0].getValue();
|
|
244
206
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
245
207
|
} else if (!MNEMONIC) {
|
|
246
208
|
throw new Error(`Mnemonic not provided and no publisher private key`);
|
|
@@ -251,17 +213,13 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
251
213
|
const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
|
|
252
214
|
const publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
253
215
|
publisherPrivKeyHex = `0x${publisherPrivKey.toString('hex')}`;
|
|
254
|
-
config.
|
|
216
|
+
config.sequencerPublisherPrivateKeys = [
|
|
255
217
|
new SecretValue(publisherPrivKeyHex)
|
|
256
218
|
];
|
|
257
219
|
}
|
|
258
220
|
if (config.coinbase === undefined) {
|
|
259
221
|
config.coinbase = EthAddress.fromString(publisherHdAccount.address);
|
|
260
222
|
}
|
|
261
|
-
if (AZTEC_NODE_URL) {
|
|
262
|
-
// we are setting up against a remote environment, l1 contracts are assumed to already be deployed
|
|
263
|
-
return await setupWithRemoteEnvironment(publisherHdAccount, config, logger, numberOfAccounts);
|
|
264
|
-
}
|
|
265
223
|
// Determine which addresses to fund in genesis
|
|
266
224
|
const initialFundedAccounts = opts.initialFundedAccounts ?? await generateSchnorrAccounts(opts.numberOfInitialFundedAccounts ?? Math.max(numberOfAccounts, 10));
|
|
267
225
|
const addressesToFund = initialFundedAccounts.map((a)=>a.address);
|
|
@@ -270,7 +228,8 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
270
228
|
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
271
229
|
addressesToFund.push(sponsoredFPCAddress);
|
|
272
230
|
}
|
|
273
|
-
const
|
|
231
|
+
const genesisTimestamp = BigInt(Math.floor(Date.now() / 1000));
|
|
232
|
+
const { genesisArchiveRoot, genesis, fundingNeeded } = await getGenesisValues(addressesToFund, opts.initialAccountFeeJuice, opts.genesisPublicData, genesisTimestamp);
|
|
274
233
|
const wasAutomining = await ethCheatCodes.isAutoMining();
|
|
275
234
|
const enableAutomine = opts.automineL1Setup && !wasAutomining && isAnvilTestChain(chain.id);
|
|
276
235
|
if (enableAutomine) {
|
|
@@ -295,19 +254,41 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
295
254
|
feeJuicePortalInitialBalance: fundingNeeded,
|
|
296
255
|
realVerifier: false
|
|
297
256
|
});
|
|
298
|
-
config
|
|
257
|
+
Object.assign(config, deployL1ContractsValues.l1ContractAddresses);
|
|
299
258
|
config.rollupVersion = deployL1ContractsValues.rollupVersion;
|
|
259
|
+
// Propagate L1-contracts-config overrides back to the node config so the archiver's
|
|
260
|
+
// `l1Constants` (and any other node-side consumer) agrees with what was actually deployed.
|
|
261
|
+
// Without this, a per-test override like `aztecEpochDuration: 4` lands on the rollup contract
|
|
262
|
+
// but the node config keeps the default (32), so `archiver.isEpochComplete(0)` computes
|
|
263
|
+
// `endSlot=31` and `EpochTestSettler`/`EpochMonitor` never fires — letting the
|
|
264
|
+
// `aztecProofSubmissionEpochs` window expire mid-test and prune the pending chain.
|
|
265
|
+
// Skip undefined values: callers (e.g. `P2PNetworkTest`) sometimes build `l1ContractsArgs`
|
|
266
|
+
// by spreading a partial `AztecNodeConfig`, which leaves unset fields (notably `dataDirectory`)
|
|
267
|
+
// as `undefined`. A blind Object.assign would then clobber the temp `dataDirectory` set earlier
|
|
268
|
+
// in this function and crash `setupSharedBlobStorage`.
|
|
269
|
+
if (opts.l1ContractsArgs) {
|
|
270
|
+
for (const [key, value] of Object.entries(opts.l1ContractsArgs)){
|
|
271
|
+
if (value !== undefined) {
|
|
272
|
+
config[key] = value;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
300
276
|
if (enableAutomine) {
|
|
301
277
|
await ethCheatCodes.setAutomine(false);
|
|
302
278
|
await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
|
|
303
|
-
|
|
279
|
+
}
|
|
280
|
+
// In compose mode (no local anvil), sync dateProvider to L1 time since it may have drifted
|
|
281
|
+
// ahead of system time due to the local-network watcher warping time forward on each filled slot.
|
|
282
|
+
// When running with a local anvil, the dateProvider is kept in sync via the stdout listener.
|
|
283
|
+
if (!anvil) {
|
|
284
|
+
dateProvider.setTime(await ethCheatCodes.lastBlockTimestamp() * 1000);
|
|
304
285
|
}
|
|
305
286
|
if (opts.l2StartTime) {
|
|
306
287
|
await ethCheatCodes.warp(opts.l2StartTime, {
|
|
307
288
|
resetBlockInterval: true
|
|
308
289
|
});
|
|
309
290
|
}
|
|
310
|
-
const watcher = new AnvilTestWatcher(new EthCheatCodesWithState(config.l1RpcUrls, dateProvider), deployL1ContractsValues.l1ContractAddresses.rollupAddress, deployL1ContractsValues.l1Client, dateProvider);
|
|
291
|
+
const watcher = new AnvilTestWatcher(new EthCheatCodesWithState(config.l1RpcUrls, dateProvider), deployL1ContractsValues.l1ContractAddresses.rollupAddress, deployL1ContractsValues.l1Client, dateProvider, opts.anvilTestWatcherOpts);
|
|
311
292
|
if (!opts.disableAnvilTestWatcher) {
|
|
312
293
|
await watcher.start();
|
|
313
294
|
}
|
|
@@ -328,7 +309,7 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
328
309
|
let mockGossipSubNetwork;
|
|
329
310
|
let p2pClientDeps = undefined;
|
|
330
311
|
if (opts.mockGossipSubNetwork) {
|
|
331
|
-
mockGossipSubNetwork = new MockGossipSubNetwork();
|
|
312
|
+
mockGossipSubNetwork = new MockGossipSubNetwork(opts.mockGossipSubNetworkLatency);
|
|
332
313
|
p2pClientDeps = {
|
|
333
314
|
p2pServiceFactory: getMockPubSubP2PServiceFactory(mockGossipSubNetwork)
|
|
334
315
|
};
|
|
@@ -345,7 +326,11 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
345
326
|
const shouldDeployAccounts = numberOfAccounts > 0 && !opts.skipAccountDeployment;
|
|
346
327
|
// Only set minTxsPerBlock=0 if we need an empty block (no accounts at all, not skipped deployment)
|
|
347
328
|
const needsEmptyBlock = numberOfAccounts === 0 && !opts.skipAccountDeployment;
|
|
348
|
-
|
|
329
|
+
// Under proposer pipelining the sequencer builds during slot N-1 for slot N. A tx submitted at
|
|
330
|
+
// slot N start is too late -- it arrives after the build. Forcing minTxsPerBlock=1 then stalls
|
|
331
|
+
// the chain on alternating slots, so allow empty checkpoints under pipelining.
|
|
332
|
+
const accountsDeployMinTxs = config.enableProposerPipelining ? 0 : 1;
|
|
333
|
+
config.minTxsPerBlock = shouldDeployAccounts ? accountsDeployMinTxs : needsEmptyBlock ? 0 : originalMinTxsPerBlock;
|
|
349
334
|
config.p2pEnabled = opts.mockGossipSubNetwork || config.p2pEnabled;
|
|
350
335
|
config.p2pIp = opts.p2pIp ?? config.p2pIp ?? '127.0.0.1';
|
|
351
336
|
if (!config.disableValidator) {
|
|
@@ -355,33 +340,53 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
355
340
|
]);
|
|
356
341
|
}
|
|
357
342
|
}
|
|
343
|
+
// When skipInitialSequencer is set, the initial node is a lightweight RPC-only node.
|
|
344
|
+
// We apply these overrides to a copy so they don't leak into the returned config.
|
|
345
|
+
// Keep P2P enabled if mockGossipSubNetwork is used (needed for tx propagation to validators).
|
|
346
|
+
const initialNodeConfig = opts.skipInitialSequencer ? {
|
|
347
|
+
...config,
|
|
348
|
+
disableValidator: true,
|
|
349
|
+
...opts.mockGossipSubNetwork ? {} : {
|
|
350
|
+
p2pEnabled: false,
|
|
351
|
+
bootstrapNodes: []
|
|
352
|
+
}
|
|
353
|
+
} : config;
|
|
358
354
|
const aztecNodeService = await withLoggerBindings({
|
|
359
355
|
actor: 'node-0'
|
|
360
|
-
}, ()=>AztecNodeService.createAndSync(
|
|
356
|
+
}, ()=>AztecNodeService.createAndSync(initialNodeConfig, {
|
|
361
357
|
dateProvider,
|
|
362
358
|
telemetry: telemetryClient,
|
|
363
359
|
p2pClientDeps
|
|
364
360
|
}, {
|
|
365
|
-
|
|
361
|
+
genesis,
|
|
362
|
+
dontStartSequencer: opts.skipInitialSequencer
|
|
366
363
|
}));
|
|
367
364
|
const sequencerClient = aztecNodeService.getSequencer();
|
|
368
|
-
if (sequencerClient) {
|
|
369
|
-
const publisher = sequencerClient.sequencer.publisher;
|
|
370
|
-
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration, l1Client);
|
|
371
|
-
}
|
|
372
365
|
let proverNode = undefined;
|
|
373
366
|
if (opts.startProverNode) {
|
|
374
367
|
logger.verbose('Creating and syncing a simulated prover node...');
|
|
375
368
|
const proverNodePrivateKey = getPrivateKeyFromIndex(2);
|
|
376
369
|
const proverNodePrivateKeyHex = `0x${proverNodePrivateKey.toString('hex')}`;
|
|
377
370
|
const proverNodeDataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
371
|
+
const p2pClientDeps = {
|
|
372
|
+
p2pServiceFactory: mockGossipSubNetwork && getMockPubSubP2PServiceFactory(mockGossipSubNetwork),
|
|
373
|
+
rpcTxProviders: [
|
|
374
|
+
aztecNodeService
|
|
375
|
+
]
|
|
382
376
|
};
|
|
383
|
-
proverNode = await createAndSyncProverNode(proverNodePrivateKeyHex, config,
|
|
377
|
+
({ proverNode } = await createAndSyncProverNode(proverNodePrivateKeyHex, config, {
|
|
378
|
+
...config.proverNodeConfig,
|
|
379
|
+
dataDirectory: proverNodeDataDirectory
|
|
380
|
+
}, {
|
|
381
|
+
dateProvider,
|
|
382
|
+
p2pClientDeps,
|
|
383
|
+
telemetry: telemetryClient
|
|
384
|
+
}, {
|
|
385
|
+
genesis
|
|
386
|
+
}));
|
|
384
387
|
}
|
|
388
|
+
const sequencerDelayer = sequencerClient?.getDelayer();
|
|
389
|
+
const proverDelayer = proverNode?.getProverNode()?.getDelayer();
|
|
385
390
|
logger.verbose('Creating a pxe...');
|
|
386
391
|
const pxeConfig = {
|
|
387
392
|
...getPXEConfig(),
|
|
@@ -391,12 +396,13 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
391
396
|
// For tests we only want proving enabled if specifically requested
|
|
392
397
|
pxeConfig.proverEnabled = !!pxeOpts.proverEnabled;
|
|
393
398
|
const wallet = await TestWallet.create(aztecNodeService, pxeConfig, {
|
|
394
|
-
loggerActorLabel: 'pxe-0'
|
|
399
|
+
loggerActorLabel: 'pxe-0',
|
|
400
|
+
...opts.pxeCreationOptions
|
|
395
401
|
});
|
|
396
402
|
if (opts.walletMinFeePadding !== undefined) {
|
|
397
403
|
wallet.setMinFeePadding(opts.walletMinFeePadding);
|
|
398
404
|
}
|
|
399
|
-
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNodeService, dateProvider);
|
|
405
|
+
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNodeService, dateProvider, aztecNodeService.getAutomineSequencer());
|
|
400
406
|
if (opts.aztecTargetCommitteeSize && opts.aztecTargetCommitteeSize > 0 || opts.initialValidators && opts.initialValidators.length > 0) {
|
|
401
407
|
// We need to advance such that the committee is set up.
|
|
402
408
|
await cheatCodes.rollup.advanceToEpoch(EpochNumber.fromBigInt(BigInt(await cheatCodes.rollup.getEpoch()) + BigInt(config.lagInEpochsForValidatorSet + 1)));
|
|
@@ -404,13 +410,20 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
404
410
|
await cheatCodes.rollup.debugRollup();
|
|
405
411
|
}
|
|
406
412
|
let accounts = [];
|
|
407
|
-
if (
|
|
413
|
+
if (opts.skipInitialSequencer) {
|
|
414
|
+
logger.info('Sequencer not started on initial node, skipping block progression');
|
|
415
|
+
} else if (shouldDeployAccounts) {
|
|
408
416
|
logger.info(`${numberOfAccounts} accounts are being deployed. Reliably progressing past genesis by setting minTxsPerBlock to 1 and waiting for the accounts to be deployed`);
|
|
409
417
|
const accountsData = initialFundedAccounts.slice(0, numberOfAccounts);
|
|
410
418
|
const accountManagers = await deployFundedSchnorrAccounts(wallet, accountsData);
|
|
411
419
|
accounts = accountManagers.map((accountManager)=>accountManager.address);
|
|
412
420
|
} else if (needsEmptyBlock) {
|
|
413
421
|
logger.info('No accounts are being deployed, waiting for an empty block 1 to be mined');
|
|
422
|
+
// AutomineSequencer only builds on tx arrival; explicitly request an empty block.
|
|
423
|
+
const automine = aztecNodeService.getAutomineSequencer();
|
|
424
|
+
if (automine) {
|
|
425
|
+
await automine.buildEmptyBlock();
|
|
426
|
+
}
|
|
414
427
|
while(await aztecNodeService.getBlockNumber() === 0){
|
|
415
428
|
await sleep(2000);
|
|
416
429
|
}
|
|
@@ -443,7 +456,7 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
443
456
|
logger.error(`Error during e2e test teardown`, err);
|
|
444
457
|
} finally{
|
|
445
458
|
try {
|
|
446
|
-
await telemetryClient
|
|
459
|
+
await telemetryClient.stop();
|
|
447
460
|
} catch (err) {
|
|
448
461
|
logger.error(`Error during telemetry client stop`, err);
|
|
449
462
|
}
|
|
@@ -463,8 +476,10 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
463
476
|
initialFundedAccounts,
|
|
464
477
|
logger,
|
|
465
478
|
mockGossipSubNetwork,
|
|
466
|
-
|
|
479
|
+
genesis,
|
|
467
480
|
proverNode,
|
|
481
|
+
sequencerDelayer,
|
|
482
|
+
proverDelayer,
|
|
468
483
|
sequencer: sequencerClient,
|
|
469
484
|
teardown,
|
|
470
485
|
telemetryClient,
|
|
@@ -523,79 +538,43 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
523
538
|
}
|
|
524
539
|
export async function waitForProvenChain(node, targetBlock, timeoutSec = 60, intervalSec = 1) {
|
|
525
540
|
targetBlock ??= await node.getBlockNumber();
|
|
526
|
-
await retryUntil(async ()=>await node.
|
|
541
|
+
await retryUntil(async ()=>await node.getBlockNumber('proven') >= targetBlock, 'proven chain status', timeoutSec, intervalSec);
|
|
527
542
|
}
|
|
528
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Creates an AztecNodeService with the prover node enabled as a subsystem.
|
|
545
|
+
* Returns both the aztec node service (for lifecycle management) and the prover node (for test internals access).
|
|
546
|
+
*/ export function createAndSyncProverNode(proverNodePrivateKey, baseConfig, configOverrides, deps, options) {
|
|
529
547
|
return withLoggerBindings({
|
|
530
548
|
actor: 'prover-0'
|
|
531
549
|
}, async ()=>{
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
...aztecNodeConfig,
|
|
540
|
-
dataDirectory: proverNodeConfig.dataDirectory
|
|
541
|
-
};
|
|
542
|
-
const archiver = await createArchiver(archiverConfig, {
|
|
543
|
-
blobClient,
|
|
544
|
-
dateProvider: proverNodeDeps.dateProvider
|
|
545
|
-
}, {
|
|
546
|
-
blockUntilSync: true
|
|
547
|
-
});
|
|
548
|
-
const proverConfig = {
|
|
549
|
-
...aztecNodeConfig,
|
|
550
|
-
txCollectionNodeRpcUrls: [],
|
|
551
|
-
realProofs: false,
|
|
552
|
-
proverAgentCount: 2,
|
|
553
|
-
publisherPrivateKeys: [
|
|
550
|
+
const proverNode = await AztecNodeService.createAndSync({
|
|
551
|
+
...baseConfig,
|
|
552
|
+
...configOverrides,
|
|
553
|
+
p2pPort: 0,
|
|
554
|
+
enableProverNode: true,
|
|
555
|
+
disableValidator: true,
|
|
556
|
+
proverPublisherPrivateKeys: [
|
|
554
557
|
new SecretValue(proverNodePrivateKey)
|
|
555
|
-
]
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
txGatheringIntervalMs: 1000,
|
|
560
|
-
txGatheringBatchSize: 10,
|
|
561
|
-
txGatheringMaxParallelRequestsPerNode: 10,
|
|
562
|
-
txGatheringTimeoutMs: 24_000,
|
|
563
|
-
proverNodeFailedEpochStore: undefined,
|
|
564
|
-
proverId: EthAddress.fromNumber(1),
|
|
565
|
-
proverNodeEpochProvingDelayMs: undefined,
|
|
566
|
-
...proverNodeConfig
|
|
567
|
-
};
|
|
568
|
-
const l1TxUtils = createDelayedL1TxUtils(aztecNodeConfig, proverNodePrivateKey, 'prover-node', proverNodeDeps.dateProvider);
|
|
569
|
-
const proverNode = await createProverNode(proverConfig, {
|
|
570
|
-
...proverNodeDeps,
|
|
571
|
-
aztecNodeTxProvider,
|
|
572
|
-
archiver: archiver,
|
|
573
|
-
l1TxUtils
|
|
574
|
-
}, {
|
|
575
|
-
prefilledPublicData
|
|
558
|
+
]
|
|
559
|
+
}, deps, {
|
|
560
|
+
genesis: options.genesis,
|
|
561
|
+
dontStartProverNode: options.dontStart
|
|
576
562
|
});
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
});
|
|
580
|
-
if (!proverNodeConfig.dontStart) {
|
|
581
|
-
await proverNode.start();
|
|
563
|
+
if (!proverNode.getProverNode()) {
|
|
564
|
+
throw new Error('Prover node subsystem was not created despite enableProverNode being set');
|
|
582
565
|
}
|
|
583
|
-
|
|
566
|
+
getLogger().info(`Created and synced prover node`);
|
|
567
|
+
return {
|
|
568
|
+
proverNode
|
|
569
|
+
};
|
|
584
570
|
});
|
|
585
571
|
}
|
|
586
|
-
function
|
|
587
|
-
const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
|
|
588
|
-
const log = createLogger(logName);
|
|
589
|
-
const l1TxUtils = createDelayedL1TxUtilsFromViemWallet(l1Client, log, dateProvider, aztecNodeConfig);
|
|
590
|
-
l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
|
|
591
|
-
return l1TxUtils;
|
|
592
|
-
}
|
|
593
|
-
export function getBalancesFn(symbol, method, from, logger) {
|
|
572
|
+
export function getBalancesFn(symbol, method, logger) {
|
|
594
573
|
const balances = async (...addressLikes)=>{
|
|
595
574
|
const addresses = addressLikes.map((addressLike)=>'address' in addressLike ? addressLike.address : addressLike);
|
|
596
|
-
const b = await Promise.all(addresses.map((address)=>method(address).simulate({
|
|
597
|
-
from
|
|
598
|
-
})));
|
|
575
|
+
const b = await Promise.all(addresses.map(async (address)=>(await method(address).simulate({
|
|
576
|
+
from: address
|
|
577
|
+
})).result));
|
|
599
578
|
const debugString = `${symbol} balances: ${addresses.map((address, i)=>`${address}: ${b[i]}`).join(', ')}`;
|
|
600
579
|
logger.verbose(debugString);
|
|
601
580
|
return b;
|
|
@@ -613,6 +592,45 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
613
592
|
const diffs = outputs.map((output, i)=>output - initialValues[i]);
|
|
614
593
|
expect(diffs).toEqual(expectedDiffs);
|
|
615
594
|
}
|
|
595
|
+
/**
|
|
596
|
+
* Registers the auth_registry contract class and publishes its standard instance if not already
|
|
597
|
+
* present, and registers the artifact with PXE. Publishing is required before exercising the public
|
|
598
|
+
* authwit path (which relies on the AVM's deployment-nullifier check); the PXE-side registration is
|
|
599
|
+
* required so revert messages from AuthRegistry calls can be enriched (otherwise assertion strings
|
|
600
|
+
* surface as generic "Assertion failed:" and tests that match on the real message fail).
|
|
601
|
+
*/ export async function ensureAuthRegistryPublished(wallet, from) {
|
|
602
|
+
const { instance, contractClass } = await getStandardAuthRegistry();
|
|
603
|
+
if (!(await wallet.getContractClassMetadata(contractClass.id)).isContractClassPubliclyRegistered) {
|
|
604
|
+
await (await publishContractClass(wallet, AuthRegistryArtifact)).send({
|
|
605
|
+
from
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
if (!(await wallet.getContractMetadata(instance.address)).isContractPublished) {
|
|
609
|
+
await publishInstance(wallet, instance).send({
|
|
610
|
+
from
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
await wallet.registerContract(instance, AuthRegistryArtifact);
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Registers the public_checks contract class and publishes its standard instance if not already
|
|
617
|
+
* present, and registers the artifact with PXE. Required for any contract that calls
|
|
618
|
+
* `privately_check_timestamp` / `privately_check_block_number` (which dispatch into the
|
|
619
|
+
* deployed PublicChecks contract via an enqueued public call).
|
|
620
|
+
*/ export async function ensurePublicChecksPublished(wallet, from) {
|
|
621
|
+
const { instance, contractClass } = await getStandardPublicChecks();
|
|
622
|
+
if (!(await wallet.getContractClassMetadata(contractClass.id)).isContractClassPubliclyRegistered) {
|
|
623
|
+
await (await publishContractClass(wallet, PublicChecksArtifact)).send({
|
|
624
|
+
from
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
if (!(await wallet.getContractMetadata(instance.address)).isContractPublished) {
|
|
628
|
+
await publishInstance(wallet, instance).send({
|
|
629
|
+
from
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
await wallet.registerContract(instance, PublicChecksArtifact);
|
|
633
|
+
}
|
|
616
634
|
/**
|
|
617
635
|
* Registers the contract class used for test accounts and publicly deploys the instances requested.
|
|
618
636
|
* Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
|
|
@@ -639,7 +657,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
639
657
|
/**
|
|
640
658
|
* Helper function to deploy accounts.
|
|
641
659
|
* Returns deployed account data that can be used by tests.
|
|
642
|
-
*/ export const deployAccounts = (numberOfAccounts, logger)=>async ({ wallet, initialFundedAccounts })=>{
|
|
660
|
+
*/ export const deployAccounts = (numberOfAccounts, logger, deployOptions)=>async ({ wallet, initialFundedAccounts })=>{
|
|
643
661
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
644
662
|
throw new Error(`Cannot deploy more than ${initialFundedAccounts.length} initial accounts.`);
|
|
645
663
|
}
|
|
@@ -650,8 +668,9 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
650
668
|
const accountManager = await wallet.createSchnorrAccount(deployedAccounts[i].secret, deployedAccounts[i].salt, deployedAccounts[i].signingKey);
|
|
651
669
|
const deployMethod = await accountManager.getDeployMethod();
|
|
652
670
|
await deployMethod.send({
|
|
653
|
-
from:
|
|
654
|
-
skipClassPublication: i !== 0
|
|
671
|
+
from: NO_FROM,
|
|
672
|
+
skipClassPublication: i !== 0,
|
|
673
|
+
...deployOptions
|
|
655
674
|
});
|
|
656
675
|
}
|
|
657
676
|
return {
|
|
@@ -672,7 +691,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
672
691
|
...instances.map((instance)=>publishInstance(wallet, instance))
|
|
673
692
|
]);
|
|
674
693
|
const batch = new BatchCall(wallet, calls);
|
|
675
|
-
const txReceipt = await batch.send({
|
|
694
|
+
const { receipt: txReceipt } = await batch.send({
|
|
676
695
|
from: accountsToDeploy[0]
|
|
677
696
|
});
|
|
678
697
|
if (waitUntilProven) {
|