@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
package/dest/bench/utils.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { writeFileSync } from 'fs';
|
|
7
|
-
import
|
|
8
|
-
import { globSync } from 'glob';
|
|
9
|
-
import { join } from 'path';
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { BatchCall, NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
4
|
+
import { mean, stdDev, times } from '@aztec/foundation/collection';
|
|
5
|
+
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
|
|
6
|
+
import { mkdirSync, writeFileSync } from 'fs';
|
|
7
|
+
import path from 'path';
|
|
10
8
|
import { setup } from '../fixtures/utils.js';
|
|
11
9
|
/**
|
|
12
10
|
* Setup for benchmarks. Initializes a remote node with a single account and deploys a benchmark contract.
|
|
@@ -17,7 +15,10 @@ import { setup } from '../fixtures/utils.js';
|
|
|
17
15
|
benchmark: true
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
|
-
const
|
|
18
|
+
const defaultAccountAddress = context.accounts[0];
|
|
19
|
+
const { contract } = await BenchmarkingContract.deploy(context.wallet).send({
|
|
20
|
+
from: defaultAccountAddress
|
|
21
|
+
});
|
|
21
22
|
context.logger.info(`Deployed benchmarking contract at ${contract.address}`);
|
|
22
23
|
const sequencer = context.aztecNode.getSequencer();
|
|
23
24
|
const telemetry = context.telemetryClient;
|
|
@@ -28,7 +29,13 @@ import { setup } from '../fixtures/utils.js';
|
|
|
28
29
|
await telemetry.flush();
|
|
29
30
|
const data = telemetry.getMeters();
|
|
30
31
|
const formatted = formatMetricsForGithubBenchmarkAction(data, opts.metrics);
|
|
32
|
+
if (formatted.length === 0) {
|
|
33
|
+
throw new Error(`No benchmark data generated. Please review your test setup.`);
|
|
34
|
+
}
|
|
31
35
|
const benchOutput = opts.benchOutput ?? process.env.BENCH_OUTPUT ?? 'bench.json';
|
|
36
|
+
mkdirSync(path.dirname(benchOutput), {
|
|
37
|
+
recursive: true
|
|
38
|
+
});
|
|
32
39
|
writeFileSync(benchOutput, JSON.stringify(formatted));
|
|
33
40
|
context.logger.info(`Wrote ${data.length} metrics to ${benchOutput}`);
|
|
34
41
|
await origTeardown();
|
|
@@ -40,17 +47,20 @@ import { setup } from '../fixtures/utils.js';
|
|
|
40
47
|
sequencer
|
|
41
48
|
};
|
|
42
49
|
}
|
|
50
|
+
function isMetricDefinition(f) {
|
|
51
|
+
return 'description' in f;
|
|
52
|
+
}
|
|
43
53
|
function formatMetricsForGithubBenchmarkAction(data, filter) {
|
|
44
|
-
const allFilters = filter.map((f)=>
|
|
45
|
-
name: f,
|
|
54
|
+
const allFilters = filter.map((f)=>isMetricDefinition(f) ? {
|
|
55
|
+
name: f.name,
|
|
46
56
|
source: f,
|
|
47
57
|
transform: (x)=>x,
|
|
48
|
-
unit:
|
|
58
|
+
unit: f.unit
|
|
49
59
|
} : f);
|
|
50
60
|
return data.flatMap((meter)=>{
|
|
51
|
-
return meter.metrics.filter((metric)=>allFilters.map((f)=>f.source).includes(metric.name)).map((metric)=>[
|
|
61
|
+
return meter.metrics.filter((metric)=>allFilters.map((f)=>f.source.name).includes(metric.name)).map((metric)=>[
|
|
52
62
|
metric,
|
|
53
|
-
allFilters.find((f)=>f.source === metric.name)
|
|
63
|
+
allFilters.find((f)=>f.source.name === metric.name)
|
|
54
64
|
]).map(([metric, filter])=>({
|
|
55
65
|
name: `${meter.name}/${filter.name}`,
|
|
56
66
|
unit: filter.unit ?? metric.unit ?? 'unknown',
|
|
@@ -76,28 +86,6 @@ function getMetricValues(points) {
|
|
|
76
86
|
};
|
|
77
87
|
}
|
|
78
88
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Creates and returns a directory with the current job name and a random number.
|
|
81
|
-
* @param index - Index to merge into the dir path.
|
|
82
|
-
* @returns A path to a created dir.
|
|
83
|
-
*/ export function makeDataDirectory(index) {
|
|
84
|
-
const testName = expect.getState().currentTestName.split(' ')[0].replaceAll('/', '_');
|
|
85
|
-
const db = join('data', testName, index.toString(), `${randomInt(99)}`);
|
|
86
|
-
mkdirpSync(db);
|
|
87
|
-
return db;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Returns the size in disk of a folder.
|
|
91
|
-
* @param path - Path to the folder.
|
|
92
|
-
* @returns Size in bytes.
|
|
93
|
-
*/ export function getFolderSize(path) {
|
|
94
|
-
return globSync('**', {
|
|
95
|
-
stat: true,
|
|
96
|
-
cwd: path,
|
|
97
|
-
nodir: true,
|
|
98
|
-
withFileTypes: true
|
|
99
|
-
}).reduce((accum, file)=>accum + file.size, 0);
|
|
100
|
-
}
|
|
101
89
|
/**
|
|
102
90
|
* Returns a call to the benchmark contract. Each call has a private execution (account entrypoint),
|
|
103
91
|
* a nested private call (create_note), a public call (increment_balance), and a nested public
|
|
@@ -108,17 +96,19 @@ function getMetricValues(points) {
|
|
|
108
96
|
* @param contract - Benchmarking contract.
|
|
109
97
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
110
98
|
* @returns A BatchCall instance.
|
|
111
|
-
*/
|
|
112
|
-
const owner = context.wallet.getAddress();
|
|
113
|
-
const sender = owner;
|
|
99
|
+
*/ async function makeCall(index, context, contract, heavyPublicCompute) {
|
|
114
100
|
if (heavyPublicCompute) {
|
|
115
101
|
return new BatchCall(context.wallet, [
|
|
116
|
-
|
|
102
|
+
contract.methods.sha256_hash_1024(randomBytesAsBigInts(1024))
|
|
117
103
|
]);
|
|
118
104
|
} else {
|
|
105
|
+
// We use random address for the new note owner because we can emit at most UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN
|
|
106
|
+
// logs for a given sender-recipient-contract tuple.
|
|
107
|
+
const ownerOfNewNote = await AztecAddress.random();
|
|
108
|
+
const [ownerOfBalance] = context.accounts;
|
|
119
109
|
return new BatchCall(context.wallet, [
|
|
120
|
-
|
|
121
|
-
|
|
110
|
+
contract.methods.create_note(ownerOfNewNote, index + 1),
|
|
111
|
+
contract.methods.increment_balance(ownerOfBalance, index + 1)
|
|
122
112
|
]);
|
|
123
113
|
}
|
|
124
114
|
}
|
|
@@ -131,40 +121,22 @@ function getMetricValues(points) {
|
|
|
131
121
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
132
122
|
* @returns Array of sent txs.
|
|
133
123
|
*/ export async function sendTxs(txCount, context, contract, heavyPublicCompute = false) {
|
|
134
|
-
const calls = await
|
|
124
|
+
const calls = await Promise.all(times(txCount, (index)=>makeCall(index, context, contract, heavyPublicCompute)));
|
|
135
125
|
context.logger.info(`Creating ${txCount} txs`);
|
|
136
|
-
const
|
|
137
|
-
skipPublicSimulation: true
|
|
138
|
-
})));
|
|
126
|
+
const [from] = context.accounts;
|
|
139
127
|
context.logger.info(`Sending ${txCount} txs`);
|
|
140
|
-
return
|
|
128
|
+
return Promise.all(calls.map(async (call)=>{
|
|
129
|
+
const { txHash } = await call.send({
|
|
130
|
+
from,
|
|
131
|
+
wait: NO_WAIT
|
|
132
|
+
});
|
|
133
|
+
return txHash;
|
|
134
|
+
}));
|
|
141
135
|
}
|
|
142
136
|
export async function waitTxs(txs, context, txWaitOpts) {
|
|
143
137
|
context.logger.info(`Awaiting ${txs.length} txs to be mined`);
|
|
144
|
-
await Promise.all(txs.map((
|
|
145
|
-
context.logger.info(
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Creates a new PXE
|
|
149
|
-
* @param node - Node to connect the pxe to.
|
|
150
|
-
* @param contract - Benchmark contract to add to the pxe.
|
|
151
|
-
* @param startingBlock - First l2 block to process.
|
|
152
|
-
* @returns The new PXE.
|
|
153
|
-
*/ export async function createNewPXE(node, contract, startingBlock = INITIAL_L2_BLOCK_NUM) {
|
|
154
|
-
const l1Contracts = await node.getL1ContractAddresses();
|
|
155
|
-
const { l1ChainId, protocolVersion } = await node.getNodeInfo();
|
|
156
|
-
const pxeConfig = {
|
|
157
|
-
l2StartingBlock: startingBlock,
|
|
158
|
-
l2BlockPollingIntervalMS: 100,
|
|
159
|
-
dataDirectory: undefined,
|
|
160
|
-
dataStoreMapSizeKB: 1024 * 1024,
|
|
161
|
-
l1Contracts,
|
|
162
|
-
l1ChainId,
|
|
163
|
-
version: protocolVersion
|
|
164
|
-
};
|
|
165
|
-
const pxe = await createPXEService(node, pxeConfig);
|
|
166
|
-
await pxe.registerContract(contract);
|
|
167
|
-
return pxe;
|
|
138
|
+
await Promise.all(txs.map((txHash)=>waitForTx(context.aztecNode, txHash, txWaitOpts)));
|
|
139
|
+
context.logger.info(`${txs.length} txs have been mined`);
|
|
168
140
|
}
|
|
169
141
|
function randomBytesAsBigInts(length) {
|
|
170
142
|
return [
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
+
import { type Logger } from '@aztec/aztec.js/log';
|
|
4
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
5
|
+
import type { TxHash } from '@aztec/aztec.js/tx';
|
|
6
|
+
import type { CheatCodes } from '@aztec/aztec/testing';
|
|
3
7
|
import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
|
|
4
|
-
import {
|
|
8
|
+
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
9
|
+
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
10
|
+
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
11
|
+
import { type EndToEndContext } from '../fixtures/setup.js';
|
|
5
12
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
13
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
6
14
|
export declare class Role {
|
|
7
15
|
private isAdmin;
|
|
8
16
|
private isMinter;
|
|
@@ -17,30 +25,31 @@ export declare class Role {
|
|
|
17
25
|
};
|
|
18
26
|
}
|
|
19
27
|
export declare class BlacklistTokenContractTest {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
private snapshotManager;
|
|
28
|
+
static CHANGE_ROLES_DELAY: number;
|
|
29
|
+
context: EndToEndContext;
|
|
23
30
|
logger: Logger;
|
|
24
|
-
|
|
25
|
-
accounts: CompleteAddress[];
|
|
31
|
+
wallet: TestWallet;
|
|
26
32
|
asset: TokenBlacklistContract;
|
|
27
33
|
tokenSim: TokenSimulator;
|
|
28
|
-
badAccount:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
badAccount: InvalidAccountContract;
|
|
35
|
+
authwitProxy: GenericProxyContract;
|
|
36
|
+
cheatCodes: CheatCodes;
|
|
37
|
+
sequencer: SequencerClient;
|
|
38
|
+
aztecNode: AztecNode;
|
|
39
|
+
adminAddress: AztecAddress;
|
|
40
|
+
otherAddress: AztecAddress;
|
|
41
|
+
blacklistedAddress: AztecAddress;
|
|
32
42
|
constructor(testName: string);
|
|
33
|
-
|
|
43
|
+
crossTimestampOfChange(): Promise<void>;
|
|
34
44
|
/**
|
|
35
|
-
*
|
|
45
|
+
* Applies base setup:
|
|
36
46
|
* 1. Add 3 accounts.
|
|
37
47
|
* 2. Publicly deploy accounts, deploy token contract and a "bad account".
|
|
38
48
|
*/
|
|
39
|
-
|
|
49
|
+
applyBaseSetup(): Promise<void>;
|
|
40
50
|
setup(): Promise<void>;
|
|
41
|
-
snapshot: <T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>) => Promise<void>;
|
|
42
51
|
teardown(): Promise<void>;
|
|
43
|
-
addPendingShieldNoteToPXE(contract: TokenBlacklistContract,
|
|
44
|
-
|
|
52
|
+
addPendingShieldNoteToPXE(contract: TokenBlacklistContract, recipient: AztecAddress, amount: bigint, secretHash: Fr, txHash: TxHash): Promise<void>;
|
|
53
|
+
applyMint(): Promise<void>;
|
|
45
54
|
}
|
|
46
|
-
//# sourceMappingURL=
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxhY2tsaXN0X3Rva2VuX2NvbnRyYWN0X3Rlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lMmVfYmxhY2tsaXN0X3Rva2VuX2NvbnRyYWN0L2JsYWNrbGlzdF90b2tlbl9jb250cmFjdF90ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDNUMsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFnQixNQUFNLHFCQUFxQixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3RELE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2pELE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRXZELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQ2pGLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQ3RGLE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBSS9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9WO0lBRUssUUFBUSxrQkFFYjtJQUVLLHlCQUF5QixDQUM3QixRQUFRLEVBQUUsc0JBQXNCLEVBQ2hDLFNBQVMsRUFBRSxZQUFZLEVBQ3ZCLE1BQU0sRUFBRSxNQUFNLEVBQ2QsVUFBVSxFQUFFLEVBQUUsRUFDZCxNQUFNLEVBQUUsTUFBTSxpQkFjZjtJQUVLLFNBQVMsa0JBbURkO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,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,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,EAAE,KAAK,eAAe,EAAyD,MAAM,sBAAsB,CAAC;AACnH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,IAAI;IACf,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAE9B,SAAS,SAGR;IAED,UAAU,SAGT;IAED,eAAe,SAGd;IAED,YAAY;;;;MAIX;CACF;AAED,qBAAa,0BAA0B;IAErC,MAAM,CAAC,kBAAkB,SAAS;IAElC,OAAO,EAAG,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAG,UAAU,CAAC;IACpB,KAAK,EAAG,sBAAsB,CAAC;IAC/B,QAAQ,EAAG,cAAc,CAAC;IAC1B,UAAU,EAAG,sBAAsB,CAAC;IACpC,YAAY,EAAG,oBAAoB,CAAC;IACpC,UAAU,EAAG,UAAU,CAAC;IACxB,SAAS,EAAG,eAAe,CAAC;IAC5B,SAAS,EAAG,SAAS,CAAC;IAEtB,YAAY,EAAG,YAAY,CAAC;IAC5B,YAAY,EAAG,YAAY,CAAC;IAC5B,kBAAkB,EAAG,YAAY,CAAC;IAElC,YAAY,QAAQ,EAAE,MAAM,EAE3B;IAEK,sBAAsB,kBAM3B;IAED;;;;OAIG;IACG,cAAc,kBA4DnB;IAEK,KAAK,kBAOV;IAEK,QAAQ,kBAEb;IAEK,yBAAyB,CAC7B,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,EACd,MAAM,EAAE,MAAM,iBAcf;IAEK,SAAS,kBAmDd;CACF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Fr
|
|
3
|
-
import {
|
|
4
|
-
import { DocsExampleContract } from '@aztec/noir-contracts.js/DocsExample';
|
|
1
|
+
import { computeSecretHash } from '@aztec/aztec.js/crypto';
|
|
2
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
5
4
|
import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
|
|
5
|
+
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
6
|
+
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
6
7
|
import { jest } from '@jest/globals';
|
|
7
|
-
import {
|
|
8
|
+
import { deployAccounts, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
8
9
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
9
|
-
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
10
10
|
export class Role {
|
|
11
11
|
isAdmin = false;
|
|
12
12
|
isMinter = false;
|
|
@@ -34,124 +34,146 @@ export class Role {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
export class BlacklistTokenContractTest {
|
|
37
|
-
// A low delay is really poor ux, but we need to keep it low for the tests to run "quickly".
|
|
38
37
|
// This value MUST match the same value that we have in the contract
|
|
39
|
-
static
|
|
40
|
-
|
|
38
|
+
static CHANGE_ROLES_DELAY = 86400;
|
|
39
|
+
context;
|
|
41
40
|
logger;
|
|
42
|
-
|
|
43
|
-
accounts = [];
|
|
41
|
+
wallet;
|
|
44
42
|
asset;
|
|
45
43
|
tokenSim;
|
|
46
44
|
badAccount;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
authwitProxy;
|
|
46
|
+
cheatCodes;
|
|
47
|
+
sequencer;
|
|
48
|
+
aztecNode;
|
|
49
|
+
adminAddress;
|
|
50
|
+
otherAddress;
|
|
51
|
+
blacklistedAddress;
|
|
50
52
|
constructor(testName){
|
|
51
53
|
this.logger = createLogger(`e2e:e2e_blacklist_token_contract:${testName}`);
|
|
52
|
-
this.snapshotManager = createSnapshotManager(`e2e_blacklist_token_contract/${testName}`, dataPath);
|
|
53
54
|
}
|
|
54
|
-
async
|
|
55
|
-
|
|
56
|
-
await this.asset.methods.get_roles(this.admin.getAddress()).send().wait();
|
|
57
|
-
}
|
|
55
|
+
async crossTimestampOfChange() {
|
|
56
|
+
await this.cheatCodes.warpL2TimeAtLeastBy(this.sequencer, this.aztecNode, BlacklistTokenContractTest.CHANGE_ROLES_DELAY);
|
|
58
57
|
}
|
|
59
58
|
/**
|
|
60
|
-
*
|
|
59
|
+
* Applies base setup:
|
|
61
60
|
* 1. Add 3 accounts.
|
|
62
61
|
* 2. Publicly deploy accounts, deploy token contract and a "bad account".
|
|
63
|
-
*/ async
|
|
62
|
+
*/ async applyBaseSetup() {
|
|
64
63
|
// Adding a timeout of 2 minutes in here such that it is propagated to the underlying tests
|
|
65
64
|
jest.setTimeout(120_000);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.blacklisted = this.wallets[2];
|
|
71
|
-
this.accounts = this.wallets.map((w)=>w.getCompleteAddress());
|
|
72
|
-
});
|
|
73
|
-
await this.snapshotManager.snapshot('e2e_blacklist_token_contract', async ()=>{
|
|
74
|
-
// Create the token contract state.
|
|
75
|
-
// Move this account thing to addAccounts above?
|
|
76
|
-
this.logger.verbose(`Public deploy accounts...`);
|
|
77
|
-
await publicDeployAccounts(this.wallets[0], this.accounts.slice(0, 3));
|
|
78
|
-
this.logger.verbose(`Deploying TokenContract...`);
|
|
79
|
-
this.asset = await TokenBlacklistContract.deploy(this.admin, this.admin.getAddress()).send().deployed();
|
|
80
|
-
this.logger.verbose(`Token deployed to ${this.asset.address}`);
|
|
81
|
-
this.logger.verbose(`Deploying bad account...`);
|
|
82
|
-
this.badAccount = await DocsExampleContract.deploy(this.wallets[0]).send().deployed();
|
|
83
|
-
this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
|
|
84
|
-
await this.mineBlocks();
|
|
85
|
-
return {
|
|
86
|
-
tokenContractAddress: this.asset.address,
|
|
87
|
-
badAccountAddress: this.badAccount.address
|
|
88
|
-
};
|
|
89
|
-
}, async ({ tokenContractAddress, badAccountAddress })=>{
|
|
90
|
-
// Restore the token contract state.
|
|
91
|
-
this.asset = await TokenBlacklistContract.at(tokenContractAddress, this.wallets[0]);
|
|
92
|
-
this.logger.verbose(`Token contract address: ${this.asset.address}`);
|
|
93
|
-
this.tokenSim = new TokenSimulator(this.asset, this.wallets[0], this.logger, this.accounts.map((a)=>a.address));
|
|
94
|
-
this.badAccount = await DocsExampleContract.at(badAccountAddress, this.wallets[0]);
|
|
95
|
-
this.logger.verbose(`Bad account address: ${this.badAccount.address}`);
|
|
96
|
-
expect(await this.asset.methods.get_roles(this.admin.getAddress()).simulate()).toEqual(new Role().withAdmin().toNoirStruct());
|
|
65
|
+
this.logger.info('Deploying 3 accounts');
|
|
66
|
+
const { deployedAccounts } = await deployAccounts(3, this.logger)({
|
|
67
|
+
wallet: this.context.wallet,
|
|
68
|
+
initialFundedAccounts: this.context.initialFundedAccounts
|
|
97
69
|
});
|
|
70
|
+
this.cheatCodes = this.context.cheatCodes;
|
|
71
|
+
this.aztecNode = this.context.aztecNodeService;
|
|
72
|
+
this.sequencer = this.context.sequencer;
|
|
73
|
+
this.wallet = this.context.wallet;
|
|
74
|
+
this.adminAddress = deployedAccounts[0].address;
|
|
75
|
+
this.otherAddress = deployedAccounts[1].address;
|
|
76
|
+
this.blacklistedAddress = deployedAccounts[2].address;
|
|
77
|
+
this.logger.info('Setting up blacklist token contract');
|
|
78
|
+
// Create the token contract state.
|
|
79
|
+
this.logger.verbose(`Public deploy accounts...`);
|
|
80
|
+
await publicDeployAccounts(this.wallet, [
|
|
81
|
+
this.adminAddress,
|
|
82
|
+
this.otherAddress,
|
|
83
|
+
this.blacklistedAddress
|
|
84
|
+
]);
|
|
85
|
+
this.logger.verbose(`Deploying TokenContract...`);
|
|
86
|
+
({ contract: this.asset } = await TokenBlacklistContract.deploy(this.wallet, this.adminAddress).send({
|
|
87
|
+
from: this.adminAddress
|
|
88
|
+
}));
|
|
89
|
+
this.logger.verbose(`Token deployed to ${this.asset.address}`);
|
|
90
|
+
this.logger.verbose(`Deploying bad account...`);
|
|
91
|
+
({ contract: this.badAccount } = await InvalidAccountContract.deploy(this.wallet).send({
|
|
92
|
+
from: this.adminAddress
|
|
93
|
+
}));
|
|
94
|
+
this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
|
|
95
|
+
// Deploy a proxy contract for "on behalf of other" tests. The note owner must be the tx sender
|
|
96
|
+
// (so their notes are in scope), but msg_sender in the target must differ from the note owner
|
|
97
|
+
// to trigger authwit validation. The proxy forwards calls so that msg_sender != tx sender.
|
|
98
|
+
this.logger.verbose(`Deploying generic proxy...`);
|
|
99
|
+
({ contract: this.authwitProxy } = await GenericProxyContract.deploy(this.wallet).send({
|
|
100
|
+
from: this.adminAddress
|
|
101
|
+
}));
|
|
102
|
+
this.logger.verbose(`Deployed to ${this.authwitProxy.address}.`);
|
|
103
|
+
await this.crossTimestampOfChange();
|
|
104
|
+
this.tokenSim = new TokenSimulator(this.asset, this.wallet, this.adminAddress, this.logger, [
|
|
105
|
+
this.adminAddress,
|
|
106
|
+
this.otherAddress,
|
|
107
|
+
this.blacklistedAddress
|
|
108
|
+
]);
|
|
109
|
+
expect((await this.asset.methods.get_roles(this.adminAddress).simulate({
|
|
110
|
+
from: this.adminAddress
|
|
111
|
+
})).result).toEqual(new Role().withAdmin().toNoirStruct());
|
|
98
112
|
}
|
|
99
113
|
async setup() {
|
|
100
|
-
|
|
114
|
+
this.logger.info('Setting up fresh context');
|
|
115
|
+
this.context = await setup(0, {
|
|
116
|
+
fundSponsoredFPC: true,
|
|
117
|
+
skipAccountDeployment: true
|
|
118
|
+
});
|
|
119
|
+
await this.applyBaseSetup();
|
|
101
120
|
}
|
|
102
|
-
snapshot = (name, apply, restore = ()=>Promise.resolve())=>this.snapshotManager.snapshot(name, apply, restore);
|
|
103
121
|
async teardown() {
|
|
104
|
-
await this.
|
|
122
|
+
await teardown(this.context);
|
|
105
123
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
async addPendingShieldNoteToPXE(contract, wallet, amount, secretHash, txHash) {
|
|
113
|
-
const txEffects = await wallet.getTxEffect(txHash);
|
|
114
|
-
await contract.methods.deliver_transparent_note(contract.address, amount, secretHash, txHash.hash, this.#toBoundedVec(txEffects.data.noteHashes, MAX_NOTE_HASHES_PER_TX), txEffects.data.nullifiers[0], wallet.getAddress()).simulate();
|
|
124
|
+
async addPendingShieldNoteToPXE(contract, recipient, amount, secretHash, txHash) {
|
|
125
|
+
const txEffects = await this.aztecNode.getTxEffect(txHash);
|
|
126
|
+
await contract.methods.process_transparent_note(contract.address, amount, secretHash, txHash.hash, txEffects.data.noteHashes, txEffects.data.nullifiers[0], recipient).simulate({
|
|
127
|
+
from: recipient
|
|
128
|
+
});
|
|
115
129
|
}
|
|
116
|
-
async
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
130
|
+
async applyMint() {
|
|
131
|
+
this.logger.info('Applying mint setup');
|
|
132
|
+
const { asset, tokenSim } = this;
|
|
133
|
+
const amount = 10000n;
|
|
134
|
+
const adminMinterRole = new Role().withAdmin().withMinter();
|
|
135
|
+
await this.asset.methods.update_roles(this.adminAddress, adminMinterRole.toNoirStruct()).send({
|
|
136
|
+
from: this.adminAddress
|
|
137
|
+
});
|
|
138
|
+
const blacklistRole = new Role().withBlacklisted();
|
|
139
|
+
await this.asset.methods.update_roles(this.blacklistedAddress, blacklistRole.toNoirStruct()).send({
|
|
140
|
+
from: this.adminAddress
|
|
141
|
+
});
|
|
142
|
+
await this.crossTimestampOfChange();
|
|
143
|
+
expect((await this.asset.methods.get_roles(this.adminAddress).simulate({
|
|
144
|
+
from: this.adminAddress
|
|
145
|
+
})).result).toEqual(adminMinterRole.toNoirStruct());
|
|
146
|
+
this.logger.verbose(`Minting ${amount} publicly...`);
|
|
147
|
+
await asset.methods.mint_public(this.adminAddress, amount).send({
|
|
148
|
+
from: this.adminAddress
|
|
149
|
+
});
|
|
150
|
+
this.logger.verbose(`Minting ${amount} privately...`);
|
|
151
|
+
const secret = Fr.random();
|
|
152
|
+
const secretHash = await computeSecretHash(secret);
|
|
153
|
+
const { receipt } = await asset.methods.mint_private(amount, secretHash).send({
|
|
154
|
+
from: this.adminAddress
|
|
155
|
+
});
|
|
156
|
+
await this.addPendingShieldNoteToPXE(asset, this.adminAddress, amount, secretHash, receipt.txHash);
|
|
157
|
+
await asset.methods.redeem_shield(this.adminAddress, amount, secret).send({
|
|
158
|
+
from: this.adminAddress
|
|
159
|
+
});
|
|
160
|
+
this.logger.verbose(`Minting complete.`);
|
|
161
|
+
tokenSim.mintPublic(this.adminAddress, amount);
|
|
162
|
+
const { result: publicBalance } = await asset.methods.balance_of_public(this.adminAddress).simulate({
|
|
163
|
+
from: this.adminAddress
|
|
164
|
+
});
|
|
165
|
+
this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
|
|
166
|
+
expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(this.adminAddress));
|
|
167
|
+
tokenSim.mintPrivate(this.adminAddress, amount);
|
|
168
|
+
const { result: privateBalance } = await asset.methods.balance_of_private(this.adminAddress).simulate({
|
|
169
|
+
from: this.adminAddress
|
|
170
|
+
});
|
|
171
|
+
this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
|
|
172
|
+
expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(this.adminAddress));
|
|
173
|
+
const { result: totalSupply } = await asset.methods.total_supply().simulate({
|
|
174
|
+
from: this.adminAddress
|
|
155
175
|
});
|
|
176
|
+
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
177
|
+
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
156
178
|
}
|
|
157
179
|
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import type { AztecNodeConfig } from '@aztec/aztec-node';
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
2
|
+
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
+
import { type Logger } from '@aztec/aztec.js/log';
|
|
4
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
5
|
+
import type { TxReceipt } from '@aztec/aztec.js/tx';
|
|
6
|
+
import { CheatCodes } from '@aztec/aztec/testing';
|
|
7
|
+
import { InboxContract, OutboxContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
8
|
+
import type { DeployAztecL1ContractsArgs, DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
9
|
+
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
10
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
4
11
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
5
12
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
6
|
-
import {
|
|
13
|
+
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
14
|
+
import { type EndToEndContext, type SetupOptions } from '../fixtures/setup.js';
|
|
7
15
|
import { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js';
|
|
16
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
8
17
|
export declare class CrossChainMessagingTest {
|
|
9
|
-
private
|
|
18
|
+
private requireEpochProven;
|
|
19
|
+
private setupOptions;
|
|
20
|
+
private deployL1ContractsArgs;
|
|
10
21
|
logger: Logger;
|
|
11
|
-
|
|
12
|
-
accounts: CompleteAddress[];
|
|
22
|
+
context: EndToEndContext;
|
|
13
23
|
aztecNode: AztecNode;
|
|
14
|
-
pxe: PXE;
|
|
15
24
|
aztecNodeConfig: AztecNodeConfig;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
aztecNodeAdmin: AztecNodeAdmin;
|
|
26
|
+
l1Client: ExtendedViemWalletClient | undefined;
|
|
27
|
+
wallet: TestWallet;
|
|
28
|
+
ownerAddress: AztecAddress;
|
|
29
|
+
user1Address: AztecAddress;
|
|
30
|
+
user2Address: AztecAddress;
|
|
19
31
|
crossChainTestHarness: CrossChainTestHarness;
|
|
20
32
|
ethAccount: EthAddress;
|
|
21
|
-
ownerAddress: AztecAddress;
|
|
22
33
|
l2Token: TokenContract;
|
|
23
34
|
l2Bridge: TokenBridgeContract;
|
|
24
|
-
rollup:
|
|
25
|
-
inbox:
|
|
26
|
-
outbox:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
rollup: RollupContract;
|
|
36
|
+
inbox: InboxContract;
|
|
37
|
+
outbox: OutboxContract;
|
|
38
|
+
cheatCodes: CheatCodes;
|
|
39
|
+
deployL1ContractsValues: DeployAztecL1ContractsReturnType;
|
|
40
|
+
constructor(testName: string, opts?: SetupOptions, deployL1ContractsArgs?: Partial<DeployAztecL1ContractsArgs>);
|
|
30
41
|
setup(): Promise<void>;
|
|
31
|
-
|
|
42
|
+
advanceToEpochProven(l2TxReceipt: TxReceipt): Promise<EpochNumber>;
|
|
43
|
+
catchUpProvenChain(): Promise<void>;
|
|
32
44
|
teardown(): Promise<void>;
|
|
33
|
-
|
|
34
|
-
toCrossChainContext(): CrossChainContext;
|
|
45
|
+
applyBaseSetup(): Promise<void>;
|
|
35
46
|
}
|
|
36
|
-
|
|
37
|
-
l2Token: AztecAddress;
|
|
38
|
-
l2Bridge: AztecAddress;
|
|
39
|
-
tokenPortal: EthAddress;
|
|
40
|
-
underlying: EthAddress;
|
|
41
|
-
ethAccount: EthAddress;
|
|
42
|
-
ownerAddress: AztecAddress;
|
|
43
|
-
inbox: EthAddress;
|
|
44
|
-
outbox: EthAddress;
|
|
45
|
-
};
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=cross_chain_messaging_test.d.ts.map
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3Jvc3NfY2hhaW5fbWVzc2FnaW5nX3Rlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lMmVfY3Jvc3NfY2hhaW5fbWVzc2FnaW5nL2Nyb3NzX2NoYWluX21lc3NhZ2luZ190ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxZQUFZLEVBQUUsVUFBVSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFckUsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFnQixNQUFNLHFCQUFxQixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3RELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ3BELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVsRCxPQUFPLEVBQUUsYUFBYSxFQUFFLGNBQWMsRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMxRixPQUFPLEtBQUssRUFDViwwQkFBMEIsRUFDMUIsZ0NBQWdDLEVBQ2pDLE1BQU0sMkNBQTJDLENBQUM7QUFFbkQsT0FBTyxLQUFLLEVBQUUsd0JBQXdCLEVBQUUsTUFBTS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7SUFDeEIsT0FBTyxFQUFHLGFBQWEsQ0FBQztJQUN4QixRQUFRLEVBQUcsbUJBQW1CLENBQUM7SUFFL0IsTUFBTSxFQUFHLGNBQWMsQ0FBQztJQUN4QixLQUFLLEVBQUcsYUFBYSxDQUFDO0lBQ3RCLE1BQU0sRUFBRyxjQUFjLENBQUM7SUFDeEIsVUFBVSxFQUFHLFVBQVUsQ0FBQztJQUV4Qix1QkFBdUIsRUFBRyxnQ0FBZ0MsQ0FBQztJQUUzRCxZQUNFLFFBQVEsRUFBRSxNQUFNLEVBQ2hCLElBQUksR0FBRSxZQUFpQixFQUN2QixxQkFBcUIsR0FBRSxPQUFPLENBQUMsMEJBQTBCLENBQU0sRUFTaEU7SUFFSyxLQUFLLGtCQVNWO0lBRUssb0JBQW9CLENBQUMsV0FBVyxFQUFFLFNBQVMsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBU3ZFO0lBRUssa0JBQWtCLGtCQUt2QjtJQUVLLFFBQVEsa0JBRWI7SUFFSyxjQUFjLGtCQWtGbkI7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,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