@aztec/end-to-end 0.0.1-commit.2f68f620 → 0.0.1-commit.321f6a9
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 +215 -27
- package/dest/automine/automine_test_context.d.ts +85 -0
- package/dest/automine/automine_test_context.d.ts.map +1 -0
- package/dest/automine/automine_test_context.js +98 -0
- package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts +2 -0
- package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts.map +1 -0
- package/dest/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof_fixture.d.ts +1 -1
- package/dest/automine/contracts/fixtures/storage_proof_fixture.d.ts.map +1 -0
- package/dest/automine/delivery/interactive_handshake_responder.d.ts +48 -0
- package/dest/automine/delivery/interactive_handshake_responder.d.ts.map +1 -0
- package/dest/automine/delivery/interactive_handshake_responder.js +76 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts +19 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts.map +1 -0
- package/dest/automine/delivery/onchain_delivery_harness.js +141 -0
- package/dest/automine/token/blacklist_token_contract_test.d.ts +49 -0
- package/dest/automine/token/blacklist_token_contract_test.d.ts.map +1 -0
- package/dest/{e2e_blacklist_token_contract → automine/token}/blacklist_token_contract_test.js +18 -40
- package/dest/automine/token/token_contract_test.d.ts +40 -0
- package/dest/automine/token/token_contract_test.d.ts.map +1 -0
- package/dest/{e2e_token_contract → automine/token}/token_contract_test.js +22 -39
- package/dest/automine/token/token_test_helpers.d.ts +73 -0
- package/dest/automine/token/token_test_helpers.d.ts.map +1 -0
- package/dest/automine/token/token_test_helpers.js +97 -0
- package/dest/bench/client_flows/benchmark.d.ts +1 -1
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +3 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +4 -4
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +31 -19
- package/dest/bench/client_flows/data_extractor.js +1 -0
- package/dest/bench/utils.d.ts +3 -3
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +95 -6
- package/dest/composed/ha/ha_full_setup.d.ts +77 -0
- package/dest/composed/ha/ha_full_setup.d.ts.map +1 -0
- package/dest/composed/ha/ha_full_setup.js +383 -0
- package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts +12 -0
- package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts.map +1 -0
- package/dest/fixtures/e2e_prover_test.d.ts +12 -9
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +48 -28
- package/dest/fixtures/fixtures.d.ts +19 -10
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +26 -11
- package/dest/fixtures/ha_setup.d.ts +3 -3
- package/dest/fixtures/ha_setup.d.ts.map +1 -1
- package/dest/fixtures/ha_setup.js +4 -1
- 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 +48 -42
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +194 -229
- package/dest/fixtures/setup_p2p_test.d.ts +1 -1
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +3 -3
- package/dest/fixtures/standard_contracts_genesis.d.ts +16 -0
- package/dest/fixtures/standard_contracts_genesis.d.ts.map +1 -0
- package/dest/fixtures/standard_contracts_genesis.js +25 -0
- package/dest/fixtures/timing.d.ts +42 -0
- package/dest/fixtures/timing.d.ts.map +1 -0
- package/dest/fixtures/timing.js +72 -0
- package/dest/fixtures/token_utils.d.ts +22 -4
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +21 -1
- 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/fixtures/wait_helpers.d.ts +135 -0
- package/dest/fixtures/wait_helpers.d.ts.map +1 -0
- package/dest/fixtures/wait_helpers.js +154 -0
- package/dest/forward-compatibility/wallet_service.js +3 -3
- package/dest/multi-node/block-production/setup.d.ts +97 -0
- package/dest/multi-node/block-production/setup.d.ts.map +1 -0
- package/dest/multi-node/block-production/setup.js +158 -0
- package/dest/multi-node/governance/setup.d.ts +67 -0
- package/dest/multi-node/governance/setup.d.ts.map +1 -0
- package/dest/multi-node/governance/setup.js +126 -0
- package/dest/multi-node/multi_node_test_context.d.ts +212 -0
- package/dest/multi-node/multi_node_test_context.d.ts.map +1 -0
- package/dest/multi-node/multi_node_test_context.js +347 -0
- package/dest/multi-node/slashing/inactivity_setup.d.ts +27 -0
- package/dest/multi-node/slashing/inactivity_setup.d.ts.map +1 -0
- package/dest/multi-node/slashing/inactivity_setup.js +111 -0
- package/dest/multi-node/slashing/setup.d.ts +167 -0
- package/dest/multi-node/slashing/setup.d.ts.map +1 -0
- package/dest/multi-node/slashing/setup.js +275 -0
- package/dest/{e2e_p2p → p2p}/p2p_network.d.ts +10 -2
- package/dest/p2p/p2p_network.d.ts.map +1 -0
- package/dest/{e2e_p2p → p2p}/p2p_network.js +41 -16
- package/dest/p2p/reqresp/utils.d.ts +19 -0
- package/dest/p2p/reqresp/utils.d.ts.map +1 -0
- package/dest/{e2e_p2p → p2p}/reqresp/utils.js +4 -17
- package/dest/p2p/shared.d.ts +72 -0
- package/dest/p2p/shared.d.ts.map +1 -0
- package/dest/p2p/shared.js +212 -0
- package/dest/shared/cross_chain_test_harness.d.ts +3 -3
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +24 -16
- package/dest/shared/gas_portal_test_harness.d.ts +1 -1
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +8 -5
- package/dest/shared/submit-transactions.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +12 -5
- package/dest/shared/timing_env.d.js +5 -0
- package/dest/shared/timing_env.js +365 -0
- 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 +1 -6
- package/dest/shared/wait_for_l1_to_l2_message.js +1 -1
- package/dest/simulators/lending_simulator.js +1 -1
- package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts +75 -0
- package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts.map +1 -0
- package/dest/single-node/cross-chain/cross_chain_messaging_test.js +209 -0
- package/dest/single-node/cross-chain/message_test_helpers.d.ts +38 -0
- package/dest/single-node/cross-chain/message_test_helpers.d.ts.map +1 -0
- package/dest/single-node/cross-chain/message_test_helpers.js +70 -0
- package/dest/{e2e_fees → single-node/fees}/bridging_race.notest.d.ts +1 -1
- package/dest/single-node/fees/bridging_race.notest.d.ts.map +1 -0
- package/dest/{e2e_fees → single-node/fees}/bridging_race.notest.js +17 -4
- package/dest/single-node/fees/fees_test.d.ts +95 -0
- package/dest/single-node/fees/fees_test.d.ts.map +1 -0
- package/dest/{e2e_fees → single-node/fees}/fees_test.js +126 -60
- package/dest/single-node/l1-reorgs/setup.d.ts +42 -0
- package/dest/single-node/l1-reorgs/setup.d.ts.map +1 -0
- package/dest/single-node/l1-reorgs/setup.js +57 -0
- package/dest/single-node/partial-proofs/setup.d.ts +5 -0
- package/dest/single-node/partial-proofs/setup.d.ts.map +1 -0
- package/dest/single-node/partial-proofs/setup.js +5 -0
- package/dest/single-node/proving/setup.d.ts +5 -0
- package/dest/single-node/proving/setup.d.ts.map +1 -0
- package/dest/single-node/proving/setup.js +5 -0
- package/dest/single-node/recovery/setup.d.ts +5 -0
- package/dest/single-node/recovery/setup.d.ts.map +1 -0
- package/dest/single-node/recovery/setup.js +5 -0
- package/dest/single-node/setup.d.ts +49 -0
- package/dest/single-node/setup.d.ts.map +1 -0
- package/dest/single-node/setup.js +56 -0
- package/dest/single-node/single_node_test_context.d.ts +374 -0
- package/dest/single-node/single_node_test_context.d.ts.map +1 -0
- package/dest/single-node/single_node_test_context.js +847 -0
- package/dest/spartan/setup_test_wallets.d.ts +1 -1
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +19 -9
- package/dest/spartan/tx_metrics.d.ts +10 -1
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +32 -0
- package/dest/test-wallet/test_wallet.d.ts +23 -3
- package/dest/test-wallet/test_wallet.d.ts.map +1 -1
- package/dest/test-wallet/test_wallet.js +56 -9
- package/dest/test-wallet/utils.d.ts +36 -1
- package/dest/test-wallet/utils.d.ts.map +1 -1
- package/dest/test-wallet/utils.js +64 -4
- package/dest/test-wallet/wallet_worker_script.js +5 -2
- package/dest/test-wallet/worker_wallet.d.ts +5 -5
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet.js +5 -3
- package/dest/test-wallet/worker_wallet_schema.d.ts +3 -159
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet_schema.js +2 -1
- package/package.json +41 -41
- package/src/automine/README.md +60 -0
- package/src/automine/automine_test_context.ts +153 -0
- package/src/automine/delivery/interactive_handshake_responder.ts +125 -0
- package/src/automine/delivery/onchain_delivery_harness.ts +213 -0
- package/src/{e2e_blacklist_token_contract → automine/token}/blacklist_token_contract_test.ts +20 -57
- package/src/{e2e_token_contract → automine/token}/token_contract_test.ts +24 -57
- package/src/automine/token/token_test_helpers.ts +138 -0
- package/src/bench/client_flows/benchmark.ts +3 -1
- package/src/bench/client_flows/client_flows_benchmark.ts +45 -26
- package/src/bench/client_flows/data_extractor.ts +1 -0
- package/src/bench/utils.ts +109 -6
- package/src/composed/ha/ha_full_setup.ts +466 -0
- package/src/fixtures/e2e_prover_test.ts +60 -47
- package/src/fixtures/fixtures.ts +28 -11
- package/src/fixtures/ha_setup.ts +7 -3
- package/src/fixtures/index.ts +1 -0
- package/src/fixtures/setup.ts +245 -290
- package/src/fixtures/setup_p2p_test.ts +3 -3
- package/src/fixtures/standard_contracts_genesis.ts +28 -0
- package/src/fixtures/timing.ts +97 -0
- package/src/fixtures/token_utils.ts +39 -4
- package/src/fixtures/utils.ts +0 -3
- package/src/fixtures/wait_helpers.ts +333 -0
- package/src/forward-compatibility/wallet_service.ts +6 -4
- package/src/guides/up_quick_start.sh +5 -0
- package/src/infra/README.md +12 -0
- package/src/multi-node/README.md +96 -0
- package/src/multi-node/block-production/setup.ts +272 -0
- package/src/multi-node/governance/setup.ts +172 -0
- package/src/multi-node/multi_node_test_context.ts +447 -0
- package/src/multi-node/slashing/inactivity_setup.ts +139 -0
- package/src/multi-node/slashing/setup.ts +433 -0
- package/src/p2p/README.md +78 -0
- package/src/{e2e_p2p → p2p}/p2p_network.ts +40 -13
- package/src/{e2e_p2p → p2p}/reqresp/utils.ts +5 -16
- package/src/p2p/shared.ts +329 -0
- package/src/shared/cross_chain_test_harness.ts +22 -13
- package/src/shared/gas_portal_test_harness.ts +13 -5
- package/src/shared/submit-transactions.ts +13 -5
- package/src/shared/timing_env.d.mts +39 -0
- package/src/shared/timing_env.mjs +363 -0
- package/src/shared/uniswap_l1_l2.ts +1 -8
- package/src/shared/wait_for_l1_to_l2_message.ts +1 -1
- package/src/simulators/lending_simulator.ts +1 -1
- package/src/single-node/README.md +66 -0
- package/src/single-node/cross-chain/cross_chain_messaging_test.ts +302 -0
- package/src/single-node/cross-chain/message_test_helpers.ts +125 -0
- package/src/{e2e_fees → single-node/fees}/bridging_race.notest.ts +19 -5
- package/src/{e2e_fees → single-node/fees}/fees_test.ts +143 -70
- package/src/single-node/l1-reorgs/setup.ts +93 -0
- package/src/single-node/partial-proofs/setup.ts +8 -0
- package/src/single-node/proving/setup.ts +15 -0
- package/src/single-node/recovery/setup.ts +8 -0
- package/src/single-node/setup.ts +63 -0
- package/src/single-node/single_node_test_context.ts +1058 -0
- package/src/spartan/setup_test_wallets.ts +24 -9
- package/src/spartan/tx_metrics.ts +26 -0
- package/src/test-wallet/test_wallet.ts +60 -10
- package/src/test-wallet/utils.ts +102 -5
- package/src/test-wallet/wallet_worker_script.ts +6 -3
- package/src/test-wallet/worker_wallet.ts +10 -12
- package/src/test-wallet/worker_wallet_schema.ts +3 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +0 -56
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +0 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +0 -58
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +0 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +0 -161
- package/dest/e2e_deploy_contract/deploy_test.d.ts +0 -37
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +0 -1
- package/dest/e2e_deploy_contract/deploy_test.js +0 -51
- package/dest/e2e_epochs/epochs_test.d.ts +0 -125
- package/dest/e2e_epochs/epochs_test.d.ts.map +0 -1
- package/dest/e2e_epochs/epochs_test.js +0 -460
- package/dest/e2e_fees/bridging_race.notest.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.d.ts +0 -91
- package/dest/e2e_fees/fees_test.d.ts.map +0 -1
- package/dest/e2e_l1_publisher/write_json.d.ts +0 -11
- package/dest/e2e_l1_publisher/write_json.d.ts.map +0 -1
- package/dest/e2e_l1_publisher/write_json.js +0 -56
- package/dest/e2e_multi_validator/utils.d.ts +0 -12
- package/dest/e2e_multi_validator/utils.d.ts.map +0 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +0 -26
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +0 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +0 -55
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +0 -31
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +0 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +0 -137
- package/dest/e2e_p2p/p2p_network.d.ts.map +0 -1
- package/dest/e2e_p2p/reqresp/utils.d.ts +0 -22
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +0 -1
- package/dest/e2e_p2p/shared.d.ts +0 -75
- package/dest/e2e_p2p/shared.d.ts.map +0 -1
- package/dest/e2e_p2p/shared.js +0 -217
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +0 -2
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +0 -1
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +0 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts +0 -44
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +0 -1
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +0 -231
- package/src/e2e_deploy_contract/deploy_test.ts +0 -86
- package/src/e2e_epochs/epochs_test.ts +0 -575
- package/src/e2e_l1_publisher/write_json.ts +0 -77
- package/src/e2e_nested_contract/nested_contract_test.ts +0 -77
- package/src/e2e_p2p/inactivity_slash_test.ts +0 -180
- package/src/e2e_p2p/shared.ts +0 -332
- /package/dest/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof_fetcher.js +0 -0
- /package/dest/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof_fixture.js +0 -0
- /package/dest/{e2e_multi_validator/utils.js → composed/web3signer/multi_validator_keystore_utils.js} +0 -0
- /package/src/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof.json +0 -0
- /package/src/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof_fetcher.ts +0 -0
- /package/src/{e2e_storage_proof → automine/contracts}/fixtures/storage_proof_fixture.ts +0 -0
- /package/src/{e2e_multi_validator/utils.ts → composed/web3signer/multi_validator_keystore_utils.ts} +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { NO_WAIT, toSendOptions } from '@aztec/aztec.js/contracts';
|
|
2
2
|
import { waitForTx } from '@aztec/aztec.js/node';
|
|
3
|
+
import { timesAsync } from '@aztec/foundation/collection';
|
|
4
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
3
5
|
import { SimulationError } from '@aztec/stdlib/errors';
|
|
4
6
|
import { Tx } from '@aztec/stdlib/tx';
|
|
5
7
|
import { inspect } from 'util';
|
|
8
|
+
import { testSpan, withTestSpanOwner } from '../fixtures/timing.js';
|
|
6
9
|
export class ProvenTx extends Tx {
|
|
7
10
|
node;
|
|
8
11
|
offchainEffects;
|
|
@@ -10,7 +13,10 @@ export class ProvenTx extends Tx {
|
|
|
10
13
|
constructor(node, tx, offchainEffects, stats){
|
|
11
14
|
super(tx.getTxHash(), tx.data, tx.chonkProof, tx.contractClassLogFields, tx.publicFunctionCalldata), this.node = node, this.offchainEffects = offchainEffects, this.stats = stats;
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
send(options) {
|
|
17
|
+
return testSpan('tx:send', ()=>this.sendInner(options));
|
|
18
|
+
}
|
|
19
|
+
async sendInner(options) {
|
|
14
20
|
const txHash = this.getTxHash();
|
|
15
21
|
await this.node.sendTx(this).catch((err)=>{
|
|
16
22
|
throw this.contextualizeError(err, inspect(this));
|
|
@@ -32,9 +38,63 @@ export class ProvenTx extends Tx {
|
|
|
32
38
|
return err;
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
export function proveInteraction(wallet, interaction, options) {
|
|
42
|
+
return testSpan('tx:prove', async ()=>{
|
|
43
|
+
const execPayload = await interaction.request(options);
|
|
44
|
+
return wallet.proveTx(execPayload, toSendOptions(options));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Pre-proves `count` interactions built by `makeCall(i)` against `wallet`, all with the same
|
|
49
|
+
* `options`. Returns the proven txs so the caller can send them individually (e.g. with sleeps
|
|
50
|
+
* between sends, or anchored to intermediate tips). For the common "send the whole batch at once"
|
|
51
|
+
* case use {@link proveAndSendTxs}.
|
|
52
|
+
*/ export function proveTxs(wallet, count, makeCall, options) {
|
|
53
|
+
return timesAsync(count, (i)=>proveInteraction(wallet, makeCall(i), options));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pre-proves `count` interactions built by `makeCall(i)` and sends each one with `NO_WAIT`, all at
|
|
57
|
+
* once. Returns the tx hashes in batch order. Pairs with `waitForTxs` for the "send N, wait for N"
|
|
58
|
+
* arc. Use {@link proveTxs} instead when the sends need bespoke sequencing.
|
|
59
|
+
*/ export async function proveAndSendTxs(wallet, count, makeCall, options) {
|
|
60
|
+
const txs = await proveTxs(wallet, count, makeCall, options);
|
|
61
|
+
return Promise.all(txs.map((tx)=>tx.send({
|
|
62
|
+
wait: NO_WAIT
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Starts a background loop that keeps `node`'s mempool topped up: whenever the pending-tx count drops
|
|
67
|
+
* below `opts.minPending`, it proves and sends one interaction built by `makeCall()` (NO_WAIT). Errors
|
|
68
|
+
* are swallowed and retried. Returns an {@link AsyncDisposable}; disposing stops the loop and awaits it.
|
|
69
|
+
*/ export function startMempoolFeeder(wallet, node, makeCall, opts) {
|
|
70
|
+
const minPending = opts.minPending ?? 3;
|
|
71
|
+
const intervalMs = opts.intervalMs ?? 1000;
|
|
72
|
+
let stopped = false;
|
|
73
|
+
// Pin the feeder's prove/send spans to a fixed non-test owner. It runs interleaved with arbitrary
|
|
74
|
+
// tests, so without this its tx:prove/tx:send spans would smear onto whichever test was current
|
|
75
|
+
// when each round fired; the pinned owner matches no test/suite record, excluding them cleanly.
|
|
76
|
+
const loop = withTestSpanOwner('other:mempool-feeder', async ()=>{
|
|
77
|
+
while(!stopped){
|
|
78
|
+
try {
|
|
79
|
+
const pendingCount = await node.getPendingTxCount();
|
|
80
|
+
if (pendingCount < minPending) {
|
|
81
|
+
await proveAndSendTxs(wallet, 1, makeCall, {
|
|
82
|
+
from: opts.from
|
|
83
|
+
});
|
|
84
|
+
opts.logger?.verbose(`Topped up mempool (was ${pendingCount})`);
|
|
85
|
+
}
|
|
86
|
+
} catch (err) {
|
|
87
|
+
opts.logger?.verbose(`Mempool top-up error (will retry): ${err}`);
|
|
88
|
+
}
|
|
89
|
+
await sleep(intervalMs);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
async [Symbol.asyncDispose] () {
|
|
94
|
+
stopped = true;
|
|
95
|
+
await loop;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
38
98
|
}
|
|
39
99
|
/**
|
|
40
100
|
* Mutable wrapper around an AztecNode that forwards all calls to the current target.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DefaultWaitOpts } from '@aztec/aztec.js/contracts';
|
|
1
2
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
3
|
import { BackendType, BarretenbergSync } from '@aztec/bb.js';
|
|
3
4
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
@@ -20,14 +21,16 @@ try {
|
|
|
20
21
|
backend: BackendType.Wasm
|
|
21
22
|
});
|
|
22
23
|
const wallet = await TestWallet.create(node, pxeConfig);
|
|
24
|
+
// Worker wallets are only used by spartan tests against remote JSON-RPC nodes: keep the 1s poll cadence.
|
|
25
|
+
wallet.setDefaultWaitInterval(DefaultWaitOpts.interval);
|
|
23
26
|
logger.info('Worker wallet initialized');
|
|
24
27
|
const customMethods = {
|
|
25
28
|
proveTx: async (exec, opts)=>{
|
|
26
29
|
const provenTx = await wallet.proveTx(exec, opts);
|
|
27
30
|
return new Tx(provenTx.getTxHash(), provenTx.data, provenTx.chonkProof, provenTx.contractClassLogFields, provenTx.publicFunctionCalldata);
|
|
28
31
|
},
|
|
29
|
-
registerAccount: async (secret, salt)=>{
|
|
30
|
-
const manager = await wallet.createSchnorrAccount(secret, salt);
|
|
32
|
+
registerAccount: async (secret, salt, signingKey)=>{
|
|
33
|
+
const manager = await wallet.createSchnorrAccount(secret, salt, signingKey);
|
|
31
34
|
return manager.address;
|
|
32
35
|
}
|
|
33
36
|
};
|
|
@@ -2,12 +2,12 @@ import type { CallIntent, IntentInnerHash } from '@aztec/aztec.js/authorization'
|
|
|
2
2
|
import type { InteractionWaitOptions, SendReturn } from '@aztec/aztec.js/contracts';
|
|
3
3
|
import type { Aliased, AppCapabilities, BatchResults, BatchedMethod, ContractClassMetadata, ContractMetadata, ExecuteUtilityOptions, PrivateEvent, PrivateEventFilter, ProfileOptions, SendOptions, SimulateOptions, TxSimulationResultWithAppOffset, Wallet, WalletCapabilities } from '@aztec/aztec.js/wallet';
|
|
4
4
|
import type { ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
5
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
|
+
import type { Fq, Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import type { PXEConfig } from '@aztec/pxe/config';
|
|
7
7
|
import type { ContractArtifact, EventMetadataDefinition, FunctionCall } from '@aztec/stdlib/abi';
|
|
8
8
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
9
9
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
|
-
import type {
|
|
10
|
+
import type { ContractInstancePreimage } from '@aztec/stdlib/contract';
|
|
11
11
|
import type { ExecutionPayload, TxProfileResult, UtilityExecutionResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import { Tx } from '@aztec/stdlib/tx';
|
|
13
13
|
/**
|
|
@@ -35,7 +35,7 @@ export declare class WorkerWallet implements Wallet {
|
|
|
35
35
|
registerSender(address: AztecAddress, alias?: string): Promise<AztecAddress>;
|
|
36
36
|
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
37
37
|
getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
38
|
-
registerContract(instance:
|
|
38
|
+
registerContract(instance: ContractInstancePreimage, artifact?: ContractArtifact, secretKey?: Fr): Promise<void>;
|
|
39
39
|
registerContractClass(artifact: ContractArtifact): Promise<void>;
|
|
40
40
|
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResultWithAppOffset>;
|
|
41
41
|
executeUtility(call: FunctionCall, opts: ExecuteUtilityOptions): Promise<UtilityExecutionResult>;
|
|
@@ -43,11 +43,11 @@ export declare class WorkerWallet implements Wallet {
|
|
|
43
43
|
sendTx<W extends InteractionWaitOptions = undefined>(exec: ExecutionPayload, opts: SendOptions<W>): Promise<SendReturn<W>>;
|
|
44
44
|
proveTx(exec: ExecutionPayload, opts: Omit<SendOptions, 'wait'>): Promise<Tx>;
|
|
45
45
|
/** Registers an account inside the worker's TestWallet, populating its accounts map. */
|
|
46
|
-
registerAccount(secret: Fr, salt: Fr): Promise<AztecAddress>;
|
|
46
|
+
registerAccount(secret: Fr, salt: Fr, signingKey: Fq): Promise<AztecAddress>;
|
|
47
47
|
createAuthWit(from: AztecAddress, messageHashOrIntent: IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
48
48
|
requestCapabilities(manifest: AppCapabilities): Promise<WalletCapabilities>;
|
|
49
49
|
batch<const T extends readonly BatchedMethod[]>(methods: T): Promise<BatchResults<T>>;
|
|
50
50
|
/** Shuts down the worker thread and closes the transport. */
|
|
51
51
|
stop(): Promise<void>;
|
|
52
52
|
}
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3dhbGxldC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Rlc3Qtd2FsbGV0L3dvcmtlcl93YWxsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLGVBQWUsRUFBRSxNQUFNLCtCQUErQixD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UFFLGVBQWUsR0FBRyxVQUFVLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUV6RztJQUVELG1CQUFtQixDQUFDLFFBQVEsRUFBRSxlQUFlLEdBQUcsT0FBTyxDQUFDLGtCQUFrQixDQUFDLENBRTFFO0lBRUQsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLFNBQVMsU0FBUyxhQUFhLEVBQUUsRUFBRSxPQUFPLEVBQUUsQ0FBQyxHQUFHLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FFcEY7SUFFRCw2REFBNkQ7SUFDdkQsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FHMUI7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker_wallet.d.ts","sourceRoot":"","sources":["../../src/test-wallet/worker_wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,EACf,+BAA+B,EAC/B,MAAM,EACN,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"worker_wallet.d.ts","sourceRoot":"","sources":["../../src/test-wallet/worker_wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC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AAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC,CAE5E;IAED,wFAAwF;IACxF,eAAe,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAE3E;IAED,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,GAAG,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAEzG;IAED,mBAAmB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE1E;IAED,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAEpF;IAED,6DAA6D;IACvD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAG1B;CACF"}
|
|
@@ -92,7 +92,9 @@ const WORKER_READY_TIMEOUT_MS = 120_000;
|
|
|
92
92
|
async call(fn, ...args) {
|
|
93
93
|
const resultJson = await this.callRaw(fn, ...args);
|
|
94
94
|
const methodSchema = WorkerWalletSchema[fn];
|
|
95
|
-
|
|
95
|
+
// Void-returning methods (e.g. registerContract) serialize to `undefined` on the worker side, which
|
|
96
|
+
// JSON.parse cannot handle; hand it straight to the schema, whose `z.void()` output accepts undefined.
|
|
97
|
+
return getSchemaReturnType(methodSchema).parseAsync(resultJson === undefined ? undefined : JSON.parse(resultJson));
|
|
96
98
|
}
|
|
97
99
|
getChainInfo() {
|
|
98
100
|
return this.call('getChainInfo');
|
|
@@ -136,8 +138,8 @@ const WORKER_READY_TIMEOUT_MS = 120_000;
|
|
|
136
138
|
proveTx(exec, opts) {
|
|
137
139
|
return this.call('proveTx', exec, opts);
|
|
138
140
|
}
|
|
139
|
-
/** Registers an account inside the worker's TestWallet, populating its accounts map. */ registerAccount(secret, salt) {
|
|
140
|
-
return this.call('registerAccount', secret, salt);
|
|
141
|
+
/** Registers an account inside the worker's TestWallet, populating its accounts map. */ registerAccount(secret, salt, signingKey) {
|
|
142
|
+
return this.call('registerAccount', secret, salt, signingKey);
|
|
141
143
|
}
|
|
142
144
|
createAuthWit(from, messageHashOrIntent) {
|
|
143
145
|
return this.call('createAuthWit', from, messageHashOrIntent);
|
|
@@ -1,160 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Tx } from '@aztec/stdlib/tx';
|
|
3
|
-
import { z } from 'zod';
|
|
1
|
+
import type { ApiSchema } from '@aztec/foundation/schemas';
|
|
4
2
|
/** Schema for the WorkerWallet API — extends WalletSchema with proveTx and registerAccount. */
|
|
5
|
-
export declare const WorkerWalletSchema:
|
|
6
|
-
|
|
7
|
-
getChainInfo: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/entrypoints/interfaces").ChainInfo, any, z.core.$ZodTypeInternals<import("@aztec/entrypoints/interfaces").ChainInfo, any>>>;
|
|
8
|
-
getContractMetadata: z.ZodFunction<z.ZodTuple<[address: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").ContractMetadata, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ContractMetadata, any>>>;
|
|
9
|
-
getContractClassMetadata: z.ZodFunction<z.ZodTuple<[id: z.ZodType<import("@aztec/foundation/schemas").Fr, any, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").ContractClassMetadata, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ContractClassMetadata, any>>>;
|
|
10
|
-
registerSender: z.ZodFunction<z.ZodTuple<[address: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>, alias: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<string | undefined, any, z.core.$ZodTypeInternals<string | undefined, any>>>], null>, z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>>;
|
|
11
|
-
getAddressBook: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any>>>;
|
|
12
|
-
getAccounts: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any>>>;
|
|
13
|
-
registerContract: z.ZodFunction<z.ZodTuple<[instance: z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any>>, artifact: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/stdlib/abi").ContractArtifact | undefined, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").ContractArtifact | undefined, any>>>, secretKey: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/foundation/schemas").Fr | undefined, any, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr | undefined, any>>>], null>, z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any>>>;
|
|
14
|
-
registerContractClass: z.ZodFunction<z.ZodTuple<[artifact: z.ZodType<import("@aztec/stdlib/abi").ContractArtifact, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").ContractArtifact, any>>], null>, z.ZodType<void, any, z.core.$ZodTypeInternals<void, any>>>;
|
|
15
|
-
simulateTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SimulateOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").SimulateOptions, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").TxSimulationResultWithAppOffset, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").TxSimulationResultWithAppOffset, any>>>;
|
|
16
|
-
executeUtility: z.ZodFunction<z.ZodTuple<[call: z.ZodType<import("@aztec/stdlib/abi").FunctionCall, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").FunctionCall, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ExecuteUtilityOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ExecuteUtilityOptions, any>>], null>, z.ZodType<import("@aztec/stdlib/tx").UtilityExecutionResult, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").UtilityExecutionResult, any>>>;
|
|
17
|
-
profileTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ProfileOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ProfileOptions, any>>], null>, z.ZodType<import("@aztec/stdlib/tx").TxProfileResult, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").TxProfileResult, any>>>;
|
|
18
|
-
sendTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SendOptions<import("@aztec/aztec.js/contracts").InteractionWaitOptions>, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").SendOptions<import("@aztec/aztec.js/contracts").InteractionWaitOptions>, any>>], null>, z.ZodType<import("@aztec/aztec.js/contracts").TxSendResultImmediate | import("@aztec/aztec.js/contracts").TxSendResultMined<import("@aztec/stdlib/tx").TxReceipt>, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/contracts").TxSendResultImmediate | import("@aztec/aztec.js/contracts").TxSendResultMined<import("@aztec/stdlib/tx").TxReceipt>, any>>>;
|
|
19
|
-
createAuthWit: z.ZodFunction<z.ZodTuple<[from: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>, messageHashOrIntent: z.ZodType<import("@aztec/aztec.js/authorization").CallIntent | import("@aztec/aztec.js/authorization").IntentInnerHash, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/authorization").CallIntent | import("@aztec/aztec.js/authorization").IntentInnerHash, any>>], null>, z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, any>>>;
|
|
20
|
-
requestCapabilities: z.ZodFunction<z.ZodTuple<[manifest: z.ZodType<import("@aztec/aztec.js/wallet").AppCapabilities, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").AppCapabilities, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").WalletCapabilities, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").WalletCapabilities, any>>>;
|
|
21
|
-
batch: z.ZodFunction<z.ZodTuple<[methods: z.ZodType<readonly import("@aztec/aztec.js/wallet").BatchedMethod[], any, z.core.$ZodTypeInternals<readonly import("@aztec/aztec.js/wallet").BatchedMethod[], any>>], null>, z.ZodType<readonly import("@aztec/aztec.js/wallet").BatchedMethodResultWrapper<import("@aztec/aztec.js/wallet").BatchedMethod>[], any, z.core.$ZodTypeInternals<readonly import("@aztec/aztec.js/wallet").BatchedMethodResultWrapper<import("@aztec/aztec.js/wallet").BatchedMethod>[], any>>>;
|
|
22
|
-
proveTx: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
23
|
-
calls: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
24
|
-
name: z.ZodString;
|
|
25
|
-
to: import("@aztec/foundation/schemas").ZodFor<AztecAddress>;
|
|
26
|
-
selector: import("@aztec/foundation/schemas").ZodFor<import("@aztec/stdlib/abi").FunctionSelector>;
|
|
27
|
-
type: z.ZodEnum<typeof import("@aztec/stdlib/abi").FunctionType>;
|
|
28
|
-
isStatic: z.ZodBoolean;
|
|
29
|
-
hideMsgSender: z.ZodBoolean;
|
|
30
|
-
args: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
31
|
-
returnTypes: z.ZodArray<z.ZodType<import("@aztec/stdlib/abi").AbiType, unknown, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").AbiType, unknown>>>;
|
|
32
|
-
}, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/abi").FunctionCall, {
|
|
33
|
-
name: string;
|
|
34
|
-
to: AztecAddress;
|
|
35
|
-
selector: import("@aztec/stdlib/abi").FunctionSelector;
|
|
36
|
-
type: import("@aztec/stdlib/abi").FunctionType;
|
|
37
|
-
isStatic: boolean;
|
|
38
|
-
hideMsgSender: boolean;
|
|
39
|
-
args: import("@aztec/foundation/schemas").Fr[];
|
|
40
|
-
returnTypes: import("@aztec/stdlib/abi").AbiType[];
|
|
41
|
-
}>>>;
|
|
42
|
-
authWitnesses: z.ZodArray<z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, string>>>;
|
|
43
|
-
capsules: z.ZodArray<z.ZodType<import("@aztec/stdlib/tx").Capsule, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").Capsule, string>>>;
|
|
44
|
-
extraHashedArgs: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/stdlib/tx").HashedValues>>;
|
|
45
|
-
feePayer: z.ZodPipe<z.ZodOptional<z.ZodNullable<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>, z.ZodTransform<AztecAddress | undefined, AztecAddress | null | undefined>>;
|
|
46
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
-
from: z.ZodUnion<readonly [import("@aztec/foundation/schemas").ZodFor<AztecAddress>, z.ZodLiteral<"NO_FROM">]>;
|
|
48
|
-
authWitnesses: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, string>>>>>, z.ZodTransform<import("@aztec/stdlib/auth-witness").AuthWitness[] | undefined, import("@aztec/stdlib/auth-witness").AuthWitness[] | null | undefined>>;
|
|
49
|
-
capsules: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodType<import("@aztec/stdlib/tx").Capsule, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").Capsule, string>>>>>, z.ZodTransform<import("@aztec/stdlib/tx").Capsule[] | undefined, import("@aztec/stdlib/tx").Capsule[] | null | undefined>>;
|
|
50
|
-
fee: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
51
|
-
gasSettings: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
52
|
-
gasLimits: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
53
|
-
daGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
|
|
54
|
-
l2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
|
|
55
|
-
}, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/gas").Gas, {
|
|
56
|
-
daGas: number;
|
|
57
|
-
l2Gas: number;
|
|
58
|
-
}>>>>, z.ZodTransform<import("@aztec/stdlib/gas").Gas | undefined, import("@aztec/stdlib/gas").Gas | null | undefined>>;
|
|
59
|
-
teardownGasLimits: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
60
|
-
daGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
|
|
61
|
-
l2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
|
|
62
|
-
}, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/gas").Gas, {
|
|
63
|
-
daGas: number;
|
|
64
|
-
l2Gas: number;
|
|
65
|
-
}>>>>, z.ZodTransform<import("@aztec/stdlib/gas").Gas | undefined, import("@aztec/stdlib/gas").Gas | null | undefined>>;
|
|
66
|
-
maxFeePerGas: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
67
|
-
feePerDaGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
68
|
-
feePerL2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
69
|
-
}, z.core.$strip>>>, z.ZodTransform<{
|
|
70
|
-
feePerDaGas: bigint;
|
|
71
|
-
feePerL2Gas: bigint;
|
|
72
|
-
} | undefined, {
|
|
73
|
-
feePerDaGas: bigint;
|
|
74
|
-
feePerL2Gas: bigint;
|
|
75
|
-
} | null | undefined>>;
|
|
76
|
-
maxPriorityFeePerGas: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
77
|
-
feePerDaGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
78
|
-
feePerL2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
79
|
-
}, z.core.$strip>>>, z.ZodTransform<{
|
|
80
|
-
feePerDaGas: bigint;
|
|
81
|
-
feePerL2Gas: bigint;
|
|
82
|
-
} | undefined, {
|
|
83
|
-
feePerDaGas: bigint;
|
|
84
|
-
feePerL2Gas: bigint;
|
|
85
|
-
} | null | undefined>>;
|
|
86
|
-
}, z.core.$strip>>>, z.ZodTransform<{
|
|
87
|
-
gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
88
|
-
teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
89
|
-
maxFeePerGas: {
|
|
90
|
-
feePerDaGas: bigint;
|
|
91
|
-
feePerL2Gas: bigint;
|
|
92
|
-
} | undefined;
|
|
93
|
-
maxPriorityFeePerGas: {
|
|
94
|
-
feePerDaGas: bigint;
|
|
95
|
-
feePerL2Gas: bigint;
|
|
96
|
-
} | undefined;
|
|
97
|
-
} | undefined, {
|
|
98
|
-
gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
99
|
-
teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
100
|
-
maxFeePerGas: {
|
|
101
|
-
feePerDaGas: bigint;
|
|
102
|
-
feePerL2Gas: bigint;
|
|
103
|
-
} | undefined;
|
|
104
|
-
maxPriorityFeePerGas: {
|
|
105
|
-
feePerDaGas: bigint;
|
|
106
|
-
feePerL2Gas: bigint;
|
|
107
|
-
} | undefined;
|
|
108
|
-
} | null | undefined>>;
|
|
109
|
-
congestionEstimate: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("@aztec/stdlib/gas").ManaUsageEstimate>>>, z.ZodTransform<import("@aztec/stdlib/gas").ManaUsageEstimate | undefined, import("@aztec/stdlib/gas").ManaUsageEstimate | null | undefined>>;
|
|
110
|
-
}, z.core.$strip>>>, z.ZodTransform<{
|
|
111
|
-
gasSettings: {
|
|
112
|
-
gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
113
|
-
teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
114
|
-
maxFeePerGas: {
|
|
115
|
-
feePerDaGas: bigint;
|
|
116
|
-
feePerL2Gas: bigint;
|
|
117
|
-
} | undefined;
|
|
118
|
-
maxPriorityFeePerGas: {
|
|
119
|
-
feePerDaGas: bigint;
|
|
120
|
-
feePerL2Gas: bigint;
|
|
121
|
-
} | undefined;
|
|
122
|
-
} | undefined;
|
|
123
|
-
congestionEstimate: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
124
|
-
} | undefined, {
|
|
125
|
-
gasSettings: {
|
|
126
|
-
gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
127
|
-
teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
|
|
128
|
-
maxFeePerGas: {
|
|
129
|
-
feePerDaGas: bigint;
|
|
130
|
-
feePerL2Gas: bigint;
|
|
131
|
-
} | undefined;
|
|
132
|
-
maxPriorityFeePerGas: {
|
|
133
|
-
feePerDaGas: bigint;
|
|
134
|
-
feePerL2Gas: bigint;
|
|
135
|
-
} | undefined;
|
|
136
|
-
} | undefined;
|
|
137
|
-
congestionEstimate: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
138
|
-
} | null | undefined>>;
|
|
139
|
-
wait: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"NO_WAIT">, z.ZodObject<{
|
|
140
|
-
ignoreDroppedReceiptsFor: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
|
|
141
|
-
timeout: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
|
|
142
|
-
interval: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
|
|
143
|
-
dontThrowOnRevert: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>;
|
|
144
|
-
}, z.core.$strip>]>>>, z.ZodTransform<NonNullable<"NO_WAIT" | {
|
|
145
|
-
ignoreDroppedReceiptsFor: number | undefined;
|
|
146
|
-
timeout: number | undefined;
|
|
147
|
-
interval: number | undefined;
|
|
148
|
-
dontThrowOnRevert: boolean | undefined;
|
|
149
|
-
}> | undefined, "NO_WAIT" | {
|
|
150
|
-
ignoreDroppedReceiptsFor: number | undefined;
|
|
151
|
-
timeout: number | undefined;
|
|
152
|
-
interval: number | undefined;
|
|
153
|
-
dontThrowOnRevert: boolean | undefined;
|
|
154
|
-
} | null | undefined>>;
|
|
155
|
-
additionalScopes: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>>, z.ZodTransform<AztecAddress[] | undefined, AztecAddress[] | null | undefined>>;
|
|
156
|
-
sendMessagesAs: z.ZodPipe<z.ZodOptional<z.ZodNullable<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>, z.ZodTransform<AztecAddress | undefined, AztecAddress | null | undefined>>;
|
|
157
|
-
}, z.core.$strip>], null>, import("@aztec/foundation/schemas").ZodFor<Tx>>;
|
|
158
|
-
registerAccount: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>, z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>], null>, import("@aztec/foundation/schemas").ZodFor<AztecAddress>>;
|
|
159
|
-
};
|
|
160
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3dhbGxldF9zY2hlbWEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIj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ot":"","sources":["../../src/test-wallet/worker_wallet_schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker_wallet_schema.d.ts","sourceRoot":"","sources":["../../src/test-wallet/worker_wallet_schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAO3D,iGAA+F;AAC/F,eAAO,MAAM,kBAAkB,EAAE,SAIhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.321f6a9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -29,45 +29,45 @@
|
|
|
29
29
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
33
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
34
|
-
"@aztec/aztec": "0.0.1-commit.
|
|
35
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
36
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
37
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
38
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
39
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
40
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
41
|
-
"@aztec/bot": "0.0.1-commit.
|
|
42
|
-
"@aztec/cli": "0.0.1-commit.
|
|
43
|
-
"@aztec/constants": "0.0.1-commit.
|
|
44
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
45
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
46
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
47
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
48
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
49
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
50
|
-
"@aztec/node-keystore": "0.0.1-commit.
|
|
51
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
52
|
-
"@aztec/noir-noirc_abi": "0.0.1-commit.
|
|
53
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
54
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
55
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
56
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
57
|
-
"@aztec/prover-client": "0.0.1-commit.
|
|
58
|
-
"@aztec/prover-node": "0.0.1-commit.
|
|
59
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
60
|
-
"@aztec/sequencer-client": "0.0.1-commit.
|
|
61
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
62
|
-
"@aztec/slasher": "0.0.1-commit.
|
|
63
|
-
"@aztec/standard-contracts": "0.0.1-commit.
|
|
64
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
65
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
66
|
-
"@aztec/validator-client": "0.0.1-commit.
|
|
67
|
-
"@aztec/validator-ha-signer": "0.0.1-commit.
|
|
68
|
-
"@aztec/wallet-sdk": "0.0.1-commit.
|
|
69
|
-
"@aztec/wallets": "0.0.1-commit.
|
|
70
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
32
|
+
"@aztec/accounts": "0.0.1-commit.321f6a9",
|
|
33
|
+
"@aztec/archiver": "0.0.1-commit.321f6a9",
|
|
34
|
+
"@aztec/aztec": "0.0.1-commit.321f6a9",
|
|
35
|
+
"@aztec/aztec-node": "0.0.1-commit.321f6a9",
|
|
36
|
+
"@aztec/aztec.js": "0.0.1-commit.321f6a9",
|
|
37
|
+
"@aztec/bb-prover": "0.0.1-commit.321f6a9",
|
|
38
|
+
"@aztec/bb.js": "0.0.1-commit.321f6a9",
|
|
39
|
+
"@aztec/blob-client": "0.0.1-commit.321f6a9",
|
|
40
|
+
"@aztec/blob-lib": "0.0.1-commit.321f6a9",
|
|
41
|
+
"@aztec/bot": "0.0.1-commit.321f6a9",
|
|
42
|
+
"@aztec/cli": "0.0.1-commit.321f6a9",
|
|
43
|
+
"@aztec/constants": "0.0.1-commit.321f6a9",
|
|
44
|
+
"@aztec/entrypoints": "0.0.1-commit.321f6a9",
|
|
45
|
+
"@aztec/epoch-cache": "0.0.1-commit.321f6a9",
|
|
46
|
+
"@aztec/ethereum": "0.0.1-commit.321f6a9",
|
|
47
|
+
"@aztec/foundation": "0.0.1-commit.321f6a9",
|
|
48
|
+
"@aztec/kv-store": "0.0.1-commit.321f6a9",
|
|
49
|
+
"@aztec/l1-artifacts": "0.0.1-commit.321f6a9",
|
|
50
|
+
"@aztec/node-keystore": "0.0.1-commit.321f6a9",
|
|
51
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.321f6a9",
|
|
52
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.321f6a9",
|
|
53
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.321f6a9",
|
|
54
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.321f6a9",
|
|
55
|
+
"@aztec/p2p": "0.0.1-commit.321f6a9",
|
|
56
|
+
"@aztec/protocol-contracts": "0.0.1-commit.321f6a9",
|
|
57
|
+
"@aztec/prover-client": "0.0.1-commit.321f6a9",
|
|
58
|
+
"@aztec/prover-node": "0.0.1-commit.321f6a9",
|
|
59
|
+
"@aztec/pxe": "0.0.1-commit.321f6a9",
|
|
60
|
+
"@aztec/sequencer-client": "0.0.1-commit.321f6a9",
|
|
61
|
+
"@aztec/simulator": "0.0.1-commit.321f6a9",
|
|
62
|
+
"@aztec/slasher": "0.0.1-commit.321f6a9",
|
|
63
|
+
"@aztec/standard-contracts": "0.0.1-commit.321f6a9",
|
|
64
|
+
"@aztec/stdlib": "0.0.1-commit.321f6a9",
|
|
65
|
+
"@aztec/telemetry-client": "0.0.1-commit.321f6a9",
|
|
66
|
+
"@aztec/validator-client": "0.0.1-commit.321f6a9",
|
|
67
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.321f6a9",
|
|
68
|
+
"@aztec/wallet-sdk": "0.0.1-commit.321f6a9",
|
|
69
|
+
"@aztec/wallets": "0.0.1-commit.321f6a9",
|
|
70
|
+
"@aztec/world-state": "0.0.1-commit.321f6a9",
|
|
71
71
|
"@iarna/toml": "^2.2.5",
|
|
72
72
|
"@jest/globals": "^30.0.0",
|
|
73
73
|
"@noble/curves": "=1.0.0",
|
|
@@ -170,6 +170,6 @@
|
|
|
170
170
|
"setupFiles": [
|
|
171
171
|
"../../foundation/src/jest/setup.mjs"
|
|
172
172
|
],
|
|
173
|
-
"testEnvironment": "
|
|
173
|
+
"testEnvironment": "./shared/timing_env.mjs"
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `automine` e2e test category
|
|
2
|
+
|
|
3
|
+
Automine tests run a single Aztec node driving the deterministic `AutomineSequencer`: one block per
|
|
4
|
+
submitted transaction, synchronous L1 publish, no committee, no prover, and no validator client. The
|
|
5
|
+
node opts into this topology through the `AUTOMINE_E2E_OPTS` preset (`fixtures/fixtures.ts`), which the
|
|
6
|
+
base context applies by default. This is the fast, deterministic counterpart to the `single-node`
|
|
7
|
+
category, whose node runs the production sequencer with interval block production. A test belongs here
|
|
8
|
+
when it exercises contract or protocol behavior that does not depend on real block-building or consensus
|
|
9
|
+
(token transfers, nested calls, note discovery, tx semantics); it belongs in `single-node` when it
|
|
10
|
+
asserts on sequencer, proving, or reorg behavior.
|
|
11
|
+
|
|
12
|
+
## Base class
|
|
13
|
+
|
|
14
|
+
All tests use `AutomineTestContext` (`automine_test_context.ts`), which owns:
|
|
15
|
+
|
|
16
|
+
- The environment: an in-process anvil in automine mode plus the L1 contract deploy, wrapping
|
|
17
|
+
`fixtures/setup.ts:setup()` with `AUTOMINE_E2E_OPTS` and `fundSponsoredFPC` as defaults.
|
|
18
|
+
- The common handles: `context`, `wallet`, `aztecNode`, `aztecNodeAdmin`, `cheatCodes`, `sequencer`,
|
|
19
|
+
`accounts`, `defaultAccountAddress`, `logger`.
|
|
20
|
+
- `markProvenAndWarp(seconds)`: marks pending checkpoints proven before warping the L2 clock, so a long
|
|
21
|
+
warp does not trip the rollup's pruning window (see the method's doc comment).
|
|
22
|
+
- `registerContract(...)`: computes and registers a contract instance without an on-chain deploy.
|
|
23
|
+
- `applyManualParentChild()`: deploys a Parent and Child contract for the nested-call tests.
|
|
24
|
+
|
|
25
|
+
Tests call the static `AutomineTestContext.setup({ numberOfAccounts })` factory (or `new` plus `setup()`
|
|
26
|
+
for the harness subclasses), passing `numberOfAccounts` rather than spreading `AUTOMINE_E2E_OPTS`.
|
|
27
|
+
|
|
28
|
+
## Harnesses
|
|
29
|
+
|
|
30
|
+
Two domain harnesses extend `AutomineTestContext` and run their domain setup after `super.setup()`:
|
|
31
|
+
|
|
32
|
+
- `token/token_contract_test.ts` — a `TokenSimulator` plus opt-in base/mint snapshots for the Token
|
|
33
|
+
contract tests.
|
|
34
|
+
- `token/blacklist_token_contract_test.ts` — a `TokenSimulator`, the `Role` helper, and the
|
|
35
|
+
role-change-delay warp (via `markProvenAndWarp`) for the TokenBlacklist tests.
|
|
36
|
+
|
|
37
|
+
## Organizing principle
|
|
38
|
+
|
|
39
|
+
The top level groups tests by node topology (automine); the second level names the primary behavior
|
|
40
|
+
under test rather than the shared setup. Each file has a single top-level `describe` named to match its
|
|
41
|
+
path. A `.parallel` suffix marks files with more than one top-level `it`; CI splits each `it` into its
|
|
42
|
+
own job.
|
|
43
|
+
|
|
44
|
+
## Subfolders
|
|
45
|
+
|
|
46
|
+
A second-level folder is created only when it earns its keep: a shared harness, an existing sub-hierarchy,
|
|
47
|
+
or a coherent domain of several files. The remaining miscellaneous protocol/execution behaviors live as flat
|
|
48
|
+
files directly under `automine/` — smoke, tx ordering/double-spend/phase checks, mempool limits, the app demos
|
|
49
|
+
(card game, private voting), and the timestamp/PXE tests.
|
|
50
|
+
|
|
51
|
+
| Path | Contents |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `token/` | Token-economics tests on the two token harnesses plus the `TokenSimulator`/`LendingSimulator`-adjacent DeFi tests: token transfers/minting/burning/access-control, the blacklist token suite, AMM, lending, NFT, orderbook, crowdfunding, and escrow. |
|
|
54
|
+
| `contracts/` | Contract lifecycle and cross-contract behavior. `deploy/` (class registration, deploy method, legacy deploy, private initialization), `nested/` (importer and the manual private/public nested-call patterns), plus contract updates, storage proofs, static calls, nested utility calls, and the ABI/storage-surface tests (ABI types, option params, state variables). |
|
|
55
|
+
| `accounts/` | Account and key behavior: account contracts, keys, multiple accounts sharing an encryption key, two-PXE interop, authwit, and scope isolation. |
|
|
56
|
+
| `effects/` | Note discovery, events, and offchain effects: note getters, pending note hashes, partial notes, event logs, event-only notes, offchain effects and payments, large public events, custom messages, the tx-effect oracle, and note rediscovery after pruned blocks. |
|
|
57
|
+
| `simulation/` | Circuit simulation surface: the AVM simulator, kernelless simulation, and the circuit recorder. |
|
|
58
|
+
|
|
59
|
+
The `simulation/avm_simulator` file is a genuine outlier: it dumps AVM circuit inputs for the downstream
|
|
60
|
+
`avm_check_circuit` CI job, so it has a bespoke CI line and is excluded from the generic `simulation/` glob.
|