@aztec/end-to-end 0.0.1-commit.fffb133c → 0.0.1-dev
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/client_flows_benchmark.d.ts +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +21 -14
- 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 +6 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +6 -3
- 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 +23 -13
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -2
- 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 +3 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +17 -7
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +89 -42
- package/dest/e2e_fees/fees_test.d.ts +2 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +19 -12
- package/dest/e2e_l1_publisher/write_json.d.ts +3 -2
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +1 -7
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +4 -6
- 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 +1 -0
- package/dest/e2e_p2p/p2p_network.d.ts +4 -3
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +23 -6
- 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 +177 -0
- package/dest/e2e_p2p/shared.d.ts +34 -2
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +63 -5
- 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 +4 -2
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +19 -9
- 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 +4 -4
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +34 -41
- package/dest/fixtures/fixtures.d.ts +5 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +6 -0
- 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/setup.d.ts +53 -31
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +117 -168
- package/dest/fixtures/setup_p2p_test.d.ts +16 -9
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +40 -29
- 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 -4
- 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 +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +13 -13
- package/dest/shared/gas_portal_test_harness.js +3 -3
- 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/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 +16 -21
- package/dest/simulators/lending_simulator.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +4 -4
- 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 +59 -16
- package/dest/spartan/tx_metrics.d.ts +35 -1
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +150 -0
- 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 +4 -1
- package/dest/spartan/utils/config.d.ts.map +1 -1
- package/dest/spartan/utils/config.js +2 -1
- package/dest/spartan/utils/index.d.ts +5 -4
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +4 -2
- package/dest/spartan/utils/k8s.d.ts +31 -1
- package/dest/spartan/utils/k8s.d.ts.map +1 -1
- package/dest/spartan/utils/k8s.js +124 -0
- package/dest/spartan/utils/nodes.d.ts +11 -1
- package/dest/spartan/utils/nodes.d.ts.map +1 -1
- package/dest/spartan/utils/nodes.js +198 -27
- 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 +84 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +253 -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 +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 +277 -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 +48 -40
- package/src/bench/client_flows/client_flows_benchmark.ts +44 -40
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/utils.ts +8 -3
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +31 -21
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -8
- package/src/e2e_deploy_contract/deploy_test.ts +3 -3
- package/src/e2e_epochs/epochs_test.ts +113 -70
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +21 -29
- package/src/e2e_l1_publisher/write_json.ts +1 -6
- package/src/e2e_nested_contract/nested_contract_test.ts +7 -5
- package/src/e2e_p2p/inactivity_slash_test.ts +5 -4
- package/src/e2e_p2p/p2p_network.ts +35 -9
- package/src/e2e_p2p/reqresp/utils.ts +235 -0
- package/src/e2e_p2p/shared.ts +110 -5
- 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 +26 -9
- 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 +40 -44
- package/src/fixtures/fixtures.ts +10 -0
- package/src/fixtures/ha_setup.ts +186 -0
- package/src/fixtures/index.ts +1 -0
- package/src/fixtures/setup.ts +161 -228
- package/src/fixtures/setup_p2p_test.ts +40 -44
- package/src/fixtures/token_utils.ts +6 -3
- 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 +13 -9
- package/src/shared/gas_portal_test_harness.ts +1 -2
- package/src/shared/index.ts +1 -0
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +6 -2
- package/src/shared/uniswap_l1_l2.ts +38 -37
- package/src/simulators/lending_simulator.ts +8 -4
- package/src/simulators/token_simulator.ts +6 -30
- package/src/spartan/setup_test_wallets.ts +104 -18
- package/src/spartan/tx_metrics.ts +126 -0
- package/src/spartan/utils/bot.ts +4 -1
- package/src/spartan/utils/config.ts +1 -0
- package/src/spartan/utils/index.ts +7 -1
- package/src/spartan/utils/k8s.ts +160 -0
- package/src/spartan/utils/nodes.ts +239 -24
- package/src/spartan/utils/scripts.ts +43 -7
- package/src/test-wallet/test_wallet.ts +355 -0
- package/src/test-wallet/utils.ts +107 -0
- package/src/test-wallet/wallet_worker_script.ts +60 -0
- package/src/test-wallet/worker_wallet.ts +214 -0
- package/src/test-wallet/worker_wallet_schema.ts +13 -0
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,40 +15,40 @@ 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';
|
|
24
22
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
25
|
-
import {
|
|
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 { ARTIFACT_VERSION_BEFORE_INJECTION } from '@aztec/stdlib/abi';
|
|
35
33
|
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
36
34
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
35
|
+
import { DEV_VERSION } from '@aztec/stdlib/update-checker';
|
|
37
36
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
38
37
|
import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
39
|
-
import {
|
|
38
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
40
39
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
41
40
|
import fs from 'fs/promises';
|
|
42
41
|
import { tmpdir } from 'os';
|
|
43
42
|
import path from 'path';
|
|
44
43
|
import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
|
|
45
44
|
import { foundry } from 'viem/chains';
|
|
45
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
46
46
|
import { MNEMONIC, TEST_MAX_PENDING_TX_POOL_COUNT, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
|
|
47
47
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
48
48
|
import { getBBConfig } from './get_bb_config.js';
|
|
49
49
|
import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js';
|
|
50
50
|
import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
|
|
51
51
|
export { startAnvil };
|
|
52
|
-
const { AZTEC_NODE_URL = '' } = process.env;
|
|
53
|
-
const getAztecUrl = ()=>AZTEC_NODE_URL;
|
|
54
52
|
let telemetry = undefined;
|
|
55
53
|
async function getTelemetryClient(partialConfig = {}) {
|
|
56
54
|
if (!telemetry) {
|
|
@@ -86,9 +84,9 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
86
84
|
* @param aztecNode - An instance of Aztec Node.
|
|
87
85
|
* @param opts - Partial configuration for the PXE.
|
|
88
86
|
* @param logger - The logger to be used.
|
|
89
|
-
* @param
|
|
87
|
+
* @param actor - Actor label to include in log output (e.g., 'pxe-test').
|
|
90
88
|
* @returns A test wallet, logger and teardown function.
|
|
91
|
-
*/ export async function setupPXEAndGetWallet(aztecNode, opts = {}, logger = getLogger(),
|
|
89
|
+
*/ export async function setupPXEAndGetWallet(aztecNode, opts = {}, logger = getLogger(), actor) {
|
|
92
90
|
const PXEConfig = {
|
|
93
91
|
...getPXEConfig(),
|
|
94
92
|
...opts
|
|
@@ -102,7 +100,7 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
102
100
|
}
|
|
103
101
|
const teardown = configuredDataDirectory ? ()=>Promise.resolve() : ()=>tryRmDir(PXEConfig.dataDirectory);
|
|
104
102
|
const wallet = await TestWallet.create(aztecNode, PXEConfig, {
|
|
105
|
-
|
|
103
|
+
loggerActorLabel: actor
|
|
106
104
|
});
|
|
107
105
|
return {
|
|
108
106
|
wallet,
|
|
@@ -111,63 +109,29 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
111
109
|
};
|
|
112
110
|
}
|
|
113
111
|
/**
|
|
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);
|
|
112
|
+
* When CONTRACT_ARTIFACTS_VERSION is set (backwards compatibility testing), asserts that the loaded artifact's
|
|
113
|
+
* aztecVersion matches the expected version. This is a sanity check verifying that the legacy artifact resolver
|
|
114
|
+
* actually swapped in the correct version.
|
|
115
|
+
*/ function assertContractArtifactsVersion() {
|
|
116
|
+
const expected = process.env.CONTRACT_ARTIFACTS_VERSION;
|
|
117
|
+
if (!expected) {
|
|
118
|
+
return;
|
|
133
119
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
120
|
+
const { aztecVersion } = SponsoredFPCContract.artifact;
|
|
121
|
+
// TODO(F-557): Remove this bypass once pre-version artifacts are no longer tested.
|
|
122
|
+
if (aztecVersion === ARTIFACT_VERSION_BEFORE_INJECTION) {
|
|
123
|
+
createLogger('e2e:setup').info(`Skipping artifact version check: artifact predates version injection (CONTRACT_ARTIFACTS_VERSION=${expected})`);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// TODO(F-557): Remove once v4.3.0 drops off the compat matrix. The v4.3.0 npm release shipped with
|
|
127
|
+
// aztec_version: "dev" baked into the artifact JSONs because of a bug.
|
|
128
|
+
if (expected === '4.3.0' && aztecVersion === DEV_VERSION) {
|
|
129
|
+
createLogger('e2e:setup').warn(`Skipping artifact version check: v4.3.0 artifacts shipped with aztec_version="dev"`);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (aztecVersion !== expected) {
|
|
133
|
+
throw new Error(`Artifact version mismatch: expected ${expected} but got ${aztecVersion}. ` + `The legacy artifact resolver may not have swapped in the correct version.`);
|
|
140
134
|
}
|
|
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
135
|
}
|
|
172
136
|
/**
|
|
173
137
|
* Sets up the environment for the end-to-end tests.
|
|
@@ -175,6 +139,7 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
175
139
|
* @param opts - Options to pass to the node initialization and to the setup script.
|
|
176
140
|
* @param pxeOpts - Options to pass to the PXE initialization.
|
|
177
141
|
*/ export async function setup(numberOfAccounts = 1, opts = {}, pxeOpts = {}, chain = foundry) {
|
|
142
|
+
assertContractArtifactsVersion();
|
|
178
143
|
let anvil;
|
|
179
144
|
try {
|
|
180
145
|
opts.aztecTargetCommitteeSize ??= 0;
|
|
@@ -191,7 +156,10 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
191
156
|
config.realProofs = !!opts.realProofs;
|
|
192
157
|
// Only enforce the time table if requested
|
|
193
158
|
config.enforceTimeTable = !!opts.enforceTimeTable;
|
|
159
|
+
// Enable the tx delayer for tests (default config has it disabled, so we force-enable it here)
|
|
160
|
+
config.enableDelayer = true;
|
|
194
161
|
config.listenAddress = '127.0.0.1';
|
|
162
|
+
config.minTxPoolAgeMs = opts.minTxPoolAgeMs ?? 0;
|
|
195
163
|
const logger = getLogger();
|
|
196
164
|
// Create a temp directory for any services that need it and cleanup later
|
|
197
165
|
const directoryToCleanup = path.join(tmpdir(), randomBytes(8).toString('hex'));
|
|
@@ -201,17 +169,17 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
201
169
|
if (!config.dataDirectory) {
|
|
202
170
|
config.dataDirectory = directoryToCleanup;
|
|
203
171
|
}
|
|
172
|
+
const dateProvider = new TestDateProvider();
|
|
204
173
|
if (!config.l1RpcUrls?.length) {
|
|
205
174
|
if (!isAnvilTestChain(chain.id)) {
|
|
206
175
|
throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
|
|
207
176
|
}
|
|
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
177
|
const res = await startAnvil({
|
|
212
178
|
l1BlockTime: opts.ethereumSlotDuration,
|
|
213
179
|
accounts: opts.anvilAccounts,
|
|
214
|
-
port: opts.anvilPort
|
|
180
|
+
port: opts.anvilPort ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : undefined),
|
|
181
|
+
slotsInAnEpoch: opts.anvilSlotsInAnEpoch,
|
|
182
|
+
dateProvider
|
|
215
183
|
});
|
|
216
184
|
anvil = res.anvil;
|
|
217
185
|
config.l1RpcUrls = [
|
|
@@ -224,7 +192,6 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
224
192
|
logger.info(`Logging metrics to ${filename}`);
|
|
225
193
|
setupMetricsLogger(filename);
|
|
226
194
|
}
|
|
227
|
-
const dateProvider = new TestDateProvider();
|
|
228
195
|
const ethCheatCodes = new EthCheatCodesWithState(config.l1RpcUrls, dateProvider);
|
|
229
196
|
if (opts.stateLoad) {
|
|
230
197
|
await ethCheatCodes.loadChainState(opts.stateLoad);
|
|
@@ -239,8 +206,8 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
239
206
|
if (opts.l1PublisherKey && opts.l1PublisherKey.getValue() && opts.l1PublisherKey.getValue() != NULL_KEY) {
|
|
240
207
|
publisherPrivKeyHex = opts.l1PublisherKey.getValue();
|
|
241
208
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
242
|
-
} else if (config.
|
|
243
|
-
publisherPrivKeyHex = config.
|
|
209
|
+
} else if (config.sequencerPublisherPrivateKeys && config.sequencerPublisherPrivateKeys.length > 0 && config.sequencerPublisherPrivateKeys[0].getValue() != NULL_KEY) {
|
|
210
|
+
publisherPrivKeyHex = config.sequencerPublisherPrivateKeys[0].getValue();
|
|
244
211
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
245
212
|
} else if (!MNEMONIC) {
|
|
246
213
|
throw new Error(`Mnemonic not provided and no publisher private key`);
|
|
@@ -251,17 +218,13 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
251
218
|
const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
|
|
252
219
|
const publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
253
220
|
publisherPrivKeyHex = `0x${publisherPrivKey.toString('hex')}`;
|
|
254
|
-
config.
|
|
221
|
+
config.sequencerPublisherPrivateKeys = [
|
|
255
222
|
new SecretValue(publisherPrivKeyHex)
|
|
256
223
|
];
|
|
257
224
|
}
|
|
258
225
|
if (config.coinbase === undefined) {
|
|
259
226
|
config.coinbase = EthAddress.fromString(publisherHdAccount.address);
|
|
260
227
|
}
|
|
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
228
|
// Determine which addresses to fund in genesis
|
|
266
229
|
const initialFundedAccounts = opts.initialFundedAccounts ?? await generateSchnorrAccounts(opts.numberOfInitialFundedAccounts ?? Math.max(numberOfAccounts, 10));
|
|
267
230
|
const addressesToFund = initialFundedAccounts.map((a)=>a.address);
|
|
@@ -300,7 +263,12 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
300
263
|
if (enableAutomine) {
|
|
301
264
|
await ethCheatCodes.setAutomine(false);
|
|
302
265
|
await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
|
|
303
|
-
|
|
266
|
+
}
|
|
267
|
+
// In compose mode (no local anvil), sync dateProvider to L1 time since it may have drifted
|
|
268
|
+
// ahead of system time due to the local-network watcher warping time forward on each filled slot.
|
|
269
|
+
// When running with a local anvil, the dateProvider is kept in sync via the stdout listener.
|
|
270
|
+
if (!anvil) {
|
|
271
|
+
dateProvider.setTime(await ethCheatCodes.lastBlockTimestamp() * 1000);
|
|
304
272
|
}
|
|
305
273
|
if (opts.l2StartTime) {
|
|
306
274
|
await ethCheatCodes.warp(opts.l2StartTime, {
|
|
@@ -355,32 +323,41 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
355
323
|
]);
|
|
356
324
|
}
|
|
357
325
|
}
|
|
358
|
-
const aztecNodeService = await
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
326
|
+
const aztecNodeService = await withLoggerBindings({
|
|
327
|
+
actor: 'node-0'
|
|
328
|
+
}, ()=>AztecNodeService.createAndSync(config, {
|
|
329
|
+
dateProvider,
|
|
330
|
+
telemetry: telemetryClient,
|
|
331
|
+
p2pClientDeps
|
|
332
|
+
}, {
|
|
333
|
+
prefilledPublicData
|
|
334
|
+
}));
|
|
366
335
|
const sequencerClient = aztecNodeService.getSequencer();
|
|
367
|
-
if (sequencerClient) {
|
|
368
|
-
const publisher = sequencerClient.sequencer.publisher;
|
|
369
|
-
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration, l1Client);
|
|
370
|
-
}
|
|
371
336
|
let proverNode = undefined;
|
|
372
337
|
if (opts.startProverNode) {
|
|
373
338
|
logger.verbose('Creating and syncing a simulated prover node...');
|
|
374
339
|
const proverNodePrivateKey = getPrivateKeyFromIndex(2);
|
|
375
340
|
const proverNodePrivateKeyHex = `0x${proverNodePrivateKey.toString('hex')}`;
|
|
376
341
|
const proverNodeDataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
342
|
+
const p2pClientDeps = {
|
|
343
|
+
p2pServiceFactory: mockGossipSubNetwork && getMockPubSubP2PServiceFactory(mockGossipSubNetwork),
|
|
344
|
+
rpcTxProviders: [
|
|
345
|
+
aztecNodeService
|
|
346
|
+
]
|
|
381
347
|
};
|
|
382
|
-
proverNode = await createAndSyncProverNode(proverNodePrivateKeyHex, config,
|
|
348
|
+
({ proverNode } = await createAndSyncProverNode(proverNodePrivateKeyHex, config, {
|
|
349
|
+
...config.proverNodeConfig,
|
|
350
|
+
dataDirectory: proverNodeDataDirectory
|
|
351
|
+
}, {
|
|
352
|
+
dateProvider,
|
|
353
|
+
p2pClientDeps,
|
|
354
|
+
telemetry: telemetryClient
|
|
355
|
+
}, {
|
|
356
|
+
prefilledPublicData
|
|
357
|
+
}));
|
|
383
358
|
}
|
|
359
|
+
const sequencerDelayer = sequencerClient?.getDelayer();
|
|
360
|
+
const proverDelayer = proverNode?.getProverNode()?.getDelayer();
|
|
384
361
|
logger.verbose('Creating a pxe...');
|
|
385
362
|
const pxeConfig = {
|
|
386
363
|
...getPXEConfig(),
|
|
@@ -389,7 +366,10 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
389
366
|
pxeConfig.dataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
390
367
|
// For tests we only want proving enabled if specifically requested
|
|
391
368
|
pxeConfig.proverEnabled = !!pxeOpts.proverEnabled;
|
|
392
|
-
const wallet = await TestWallet.create(aztecNodeService, pxeConfig
|
|
369
|
+
const wallet = await TestWallet.create(aztecNodeService, pxeConfig, {
|
|
370
|
+
loggerActorLabel: 'pxe-0',
|
|
371
|
+
...opts.pxeCreationOptions
|
|
372
|
+
});
|
|
393
373
|
if (opts.walletMinFeePadding !== undefined) {
|
|
394
374
|
wallet.setMinFeePadding(opts.walletMinFeePadding);
|
|
395
375
|
}
|
|
@@ -440,7 +420,7 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
440
420
|
logger.error(`Error during e2e test teardown`, err);
|
|
441
421
|
} finally{
|
|
442
422
|
try {
|
|
443
|
-
await telemetryClient
|
|
423
|
+
await telemetryClient.stop();
|
|
444
424
|
} catch (err) {
|
|
445
425
|
logger.error(`Error during telemetry client stop`, err);
|
|
446
426
|
}
|
|
@@ -462,6 +442,8 @@ export const getPrivateKeyFromIndex = (index)=>{
|
|
|
462
442
|
mockGossipSubNetwork,
|
|
463
443
|
prefilledPublicData,
|
|
464
444
|
proverNode,
|
|
445
|
+
sequencerDelayer,
|
|
446
|
+
proverDelayer,
|
|
465
447
|
sequencer: sequencerClient,
|
|
466
448
|
teardown,
|
|
467
449
|
telemetryClient,
|
|
@@ -522,75 +504,41 @@ export async function waitForProvenChain(node, targetBlock, timeoutSec = 60, int
|
|
|
522
504
|
targetBlock ??= await node.getBlockNumber();
|
|
523
505
|
await retryUntil(async ()=>await node.getProvenBlockNumber() >= targetBlock, 'proven chain status', timeoutSec, intervalSec);
|
|
524
506
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
...
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
dateProvider: proverNodeDeps.dateProvider
|
|
540
|
-
}, {
|
|
541
|
-
blockUntilSync: true
|
|
542
|
-
});
|
|
543
|
-
const proverConfig = {
|
|
544
|
-
...aztecNodeConfig,
|
|
545
|
-
txCollectionNodeRpcUrls: [],
|
|
546
|
-
realProofs: false,
|
|
547
|
-
proverAgentCount: 2,
|
|
548
|
-
publisherPrivateKeys: [
|
|
507
|
+
/**
|
|
508
|
+
* Creates an AztecNodeService with the prover node enabled as a subsystem.
|
|
509
|
+
* Returns both the aztec node service (for lifecycle management) and the prover node (for test internals access).
|
|
510
|
+
*/ export function createAndSyncProverNode(proverNodePrivateKey, baseConfig, configOverrides, deps, options) {
|
|
511
|
+
return withLoggerBindings({
|
|
512
|
+
actor: 'prover-0'
|
|
513
|
+
}, async ()=>{
|
|
514
|
+
const proverNode = await AztecNodeService.createAndSync({
|
|
515
|
+
...baseConfig,
|
|
516
|
+
...configOverrides,
|
|
517
|
+
p2pPort: 0,
|
|
518
|
+
enableProverNode: true,
|
|
519
|
+
disableValidator: true,
|
|
520
|
+
proverPublisherPrivateKeys: [
|
|
549
521
|
new SecretValue(proverNodePrivateKey)
|
|
550
|
-
]
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
txGatheringIntervalMs: 1000,
|
|
555
|
-
txGatheringBatchSize: 10,
|
|
556
|
-
txGatheringMaxParallelRequestsPerNode: 10,
|
|
557
|
-
txGatheringTimeoutMs: 24_000,
|
|
558
|
-
proverNodeFailedEpochStore: undefined,
|
|
559
|
-
proverId: EthAddress.fromNumber(1),
|
|
560
|
-
proverNodeEpochProvingDelayMs: undefined,
|
|
561
|
-
...proverNodeConfig
|
|
562
|
-
};
|
|
563
|
-
const l1TxUtils = createDelayedL1TxUtils(aztecNodeConfig, proverNodePrivateKey, 'prover-node', proverNodeDeps.dateProvider);
|
|
564
|
-
const proverNode = await createProverNode(proverConfig, {
|
|
565
|
-
...proverNodeDeps,
|
|
566
|
-
aztecNodeTxProvider,
|
|
567
|
-
archiver: archiver,
|
|
568
|
-
l1TxUtils
|
|
569
|
-
}, {
|
|
570
|
-
prefilledPublicData
|
|
522
|
+
]
|
|
523
|
+
}, deps, {
|
|
524
|
+
...options,
|
|
525
|
+
dontStartProverNode: options.dontStart
|
|
571
526
|
});
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
});
|
|
575
|
-
if (!proverNodeConfig.dontStart) {
|
|
576
|
-
await proverNode.start();
|
|
527
|
+
if (!proverNode.getProverNode()) {
|
|
528
|
+
throw new Error('Prover node subsystem was not created despite enableProverNode being set');
|
|
577
529
|
}
|
|
578
|
-
|
|
530
|
+
getLogger().info(`Created and synced prover node`);
|
|
531
|
+
return {
|
|
532
|
+
proverNode
|
|
533
|
+
};
|
|
579
534
|
});
|
|
580
535
|
}
|
|
581
|
-
function
|
|
582
|
-
const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
|
|
583
|
-
const log = createLogger(logName);
|
|
584
|
-
const l1TxUtils = createDelayedL1TxUtilsFromViemWallet(l1Client, log, dateProvider, aztecNodeConfig);
|
|
585
|
-
l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
|
|
586
|
-
return l1TxUtils;
|
|
587
|
-
}
|
|
588
|
-
export function getBalancesFn(symbol, method, from, logger) {
|
|
536
|
+
export function getBalancesFn(symbol, method, logger) {
|
|
589
537
|
const balances = async (...addressLikes)=>{
|
|
590
538
|
const addresses = addressLikes.map((addressLike)=>'address' in addressLike ? addressLike.address : addressLike);
|
|
591
|
-
const b = await Promise.all(addresses.map((address)=>method(address).simulate({
|
|
592
|
-
from
|
|
593
|
-
})));
|
|
539
|
+
const b = await Promise.all(addresses.map(async (address)=>(await method(address).simulate({
|
|
540
|
+
from: address
|
|
541
|
+
})).result));
|
|
594
542
|
const debugString = `${symbol} balances: ${addresses.map((address, i)=>`${address}: ${b[i]}`).join(', ')}`;
|
|
595
543
|
logger.verbose(debugString);
|
|
596
544
|
return b;
|
|
@@ -634,7 +582,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
634
582
|
/**
|
|
635
583
|
* Helper function to deploy accounts.
|
|
636
584
|
* Returns deployed account data that can be used by tests.
|
|
637
|
-
*/ export const deployAccounts = (numberOfAccounts, logger)=>async ({ wallet, initialFundedAccounts })=>{
|
|
585
|
+
*/ export const deployAccounts = (numberOfAccounts, logger, deployOptions)=>async ({ wallet, initialFundedAccounts })=>{
|
|
638
586
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
639
587
|
throw new Error(`Cannot deploy more than ${initialFundedAccounts.length} initial accounts.`);
|
|
640
588
|
}
|
|
@@ -645,8 +593,9 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
645
593
|
const accountManager = await wallet.createSchnorrAccount(deployedAccounts[i].secret, deployedAccounts[i].salt, deployedAccounts[i].signingKey);
|
|
646
594
|
const deployMethod = await accountManager.getDeployMethod();
|
|
647
595
|
await deployMethod.send({
|
|
648
|
-
from:
|
|
649
|
-
skipClassPublication: i !== 0
|
|
596
|
+
from: NO_FROM,
|
|
597
|
+
skipClassPublication: i !== 0,
|
|
598
|
+
...deployOptions
|
|
650
599
|
});
|
|
651
600
|
}
|
|
652
601
|
return {
|
|
@@ -667,7 +616,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
667
616
|
...instances.map((instance)=>publishInstance(wallet, instance))
|
|
668
617
|
]);
|
|
669
618
|
const batch = new BatchCall(wallet, calls);
|
|
670
|
-
const txReceipt = await batch.send({
|
|
619
|
+
const { receipt: txReceipt } = await batch.send({
|
|
671
620
|
from: accountsToDeploy[0]
|
|
672
621
|
});
|
|
673
622
|
if (waitUntilProven) {
|
|
@@ -3,21 +3,28 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
5
5
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
6
|
-
import type { ProverNodeDeps } from '@aztec/prover-node';
|
|
7
6
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
8
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
9
7
|
export declare const ATTESTER_PRIVATE_KEYS_START_INDEX = 3;
|
|
10
8
|
export declare function generatePrivateKeys(startIndex: number, numberOfKeys: number): `0x${string}`[];
|
|
11
9
|
export declare function createNodes(config: AztecNodeConfig & {
|
|
12
10
|
dontStartSequencer?: boolean;
|
|
13
11
|
}, dateProvider: DateProvider, bootstrapNodeEnr: string, numNodes: number, bootNodePort: number, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number, indexOffset?: number, validatorsPerNode?: number): Promise<AztecNodeService[]>;
|
|
14
|
-
/**
|
|
15
|
-
export
|
|
12
|
+
/** Extended config type for createNode with test-specific overrides. */
|
|
13
|
+
export type CreateNodeConfig = AztecNodeConfig & {
|
|
14
|
+
/** Whether to skip starting the sequencer. */
|
|
16
15
|
dontStartSequencer?: boolean;
|
|
17
|
-
|
|
16
|
+
/** Override the private key (instead of deriving from addressIndex). */
|
|
17
|
+
validatorPrivateKey?: `0x${string}`;
|
|
18
|
+
};
|
|
19
|
+
/** Creates a P2P enabled instance of Aztec Node Service with a validator. */
|
|
20
|
+
export declare function createNode(config: CreateNodeConfig, dateProvider: DateProvider, tcpPort: number, bootstrapNode: string | undefined, addressIndex: number | number[], prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number): Promise<AztecNodeService>;
|
|
18
21
|
/** Creates a P2P enabled instance of Aztec Node Service without a validator */
|
|
19
|
-
export declare function createNonValidatorNode(baseConfig: AztecNodeConfig, dateProvider: DateProvider, tcpPort: number, bootstrapNode: string | undefined, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number
|
|
20
|
-
export declare function createProverNode(config: AztecNodeConfig, tcpPort: number, bootstrapNode: string | undefined, addressIndex: number,
|
|
22
|
+
export declare function createNonValidatorNode(baseConfig: AztecNodeConfig, dateProvider: DateProvider, tcpPort: number, bootstrapNode: string | undefined, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number): Promise<AztecNodeService>;
|
|
23
|
+
export declare function createProverNode(config: AztecNodeConfig, tcpPort: number, bootstrapNode: string | undefined, addressIndex: number, deps: {
|
|
24
|
+
dateProvider: DateProvider;
|
|
25
|
+
}, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number): Promise<{
|
|
26
|
+
proverNode: AztecNodeService;
|
|
27
|
+
}>;
|
|
21
28
|
export declare function createP2PConfig(config: AztecNodeConfig, bootstrapNodeEnr?: string, port?: number, dataDirectory?: string): Promise<AztecNodeConfig>;
|
|
22
|
-
export declare function createValidatorConfig(config:
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
export declare function createValidatorConfig(config: CreateNodeConfig, bootstrapNodeEnr?: string, port?: number, addressIndex?: number | number[], dataDirectory?: string): Promise<AztecNodeConfig>;
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dXBfcDJwX3Rlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9zZXR1cF9wMnBfdGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE9BQU8sRUFBRSxLQUFLLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBSzNFLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVELE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFXOUQsZUFBTy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nQkFBZ0IsQ0FBQyxFQUFFLE1BQU0sRUFDekIsSUFBSSxDQUFDLEVBQUUsTUFBTSxFQUNiLFlBQVksR0FBRSxNQUFNLEdBQUcsTUFBTSxFQUFNLEVBQ25DLGFBQWEsQ0FBQyxFQUFFLE1BQU0sNEJBb0J2QiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_p2p_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_p2p_test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"setup_p2p_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_p2p_test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAW9D,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAOnD,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,EAAE,CAO7F;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,eAAe,GAAG;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,EAC1D,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,EAC1C,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,SA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