@aztec/end-to-end 3.0.0-nightly.20251023 → 3.0.0-nightly.20251025
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 +3 -2
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +7 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +4 -1
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +5 -1
- 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 +3 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -1
- 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 +2 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts +8 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +3 -1
- package/dest/e2e_epochs/epochs_test.d.ts +3 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +6 -1
- package/dest/e2e_fees/bridging_race.notest.js +2 -1
- package/dest/e2e_fees/fees_test.d.ts +3 -1
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +2 -1
- package/dest/e2e_l1_publisher/write_json.d.ts +3 -1
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +2 -2
- package/dest/e2e_multi_validator/utils.d.ts +1 -1
- package/dest/e2e_multi_validator/utils.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +4 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +2 -2
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts +1 -1
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +2 -1
- package/dest/e2e_p2p/shared.d.ts +4 -1
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +4 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts +3 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts +3 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +2 -1
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +1 -1
- package/dest/fixtures/setup_l1_contracts.d.ts +1 -1
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.d.ts +4 -1
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +5 -3
- package/dest/fixtures/token_utils.d.ts +3 -1
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +1 -1
- package/dest/fixtures/utils.d.ts +5 -1
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +5 -2
- package/dest/fixtures/web3signer.d.ts.map +1 -1
- package/dest/fixtures/web3signer.js +2 -1
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +11 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +4 -1
- package/dest/shared/gas_portal_test_harness.d.ts +5 -1
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +4 -1
- package/dest/shared/jest_setup.js +1 -1
- package/dest/shared/submit-transactions.d.ts +3 -1
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +2 -1
- package/dest/shared/uniswap_l1_l2.d.ts +3 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +4 -1
- package/dest/simulators/lending_simulator.d.ts +2 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +2 -1
- package/dest/simulators/token_simulator.d.ts +3 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +3 -1
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +8 -2
- package/dest/spartan/utils.d.ts +11 -0
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +76 -1
- package/package.json +37 -37
- package/src/bench/client_flows/benchmark.ts +5 -5
- package/src/bench/client_flows/client_flows_benchmark.ts +6 -11
- package/src/bench/client_flows/data_extractor.ts +1 -1
- package/src/bench/utils.ts +1 -1
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +6 -9
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +3 -1
- package/src/e2e_deploy_contract/deploy_test.ts +8 -12
- package/src/e2e_epochs/epochs_test.ts +8 -10
- package/src/e2e_fees/bridging_race.notest.ts +3 -1
- package/src/e2e_fees/fees_test.ts +4 -1
- package/src/e2e_l1_publisher/write_json.ts +5 -3
- package/src/e2e_multi_validator/utils.ts +1 -1
- package/src/e2e_nested_contract/nested_contract_test.ts +4 -1
- package/src/e2e_p2p/inactivity_slash_test.ts +3 -3
- package/src/e2e_p2p/p2p_network.ts +2 -1
- package/src/e2e_p2p/shared.ts +6 -10
- package/src/e2e_token_contract/token_contract_test.ts +3 -1
- package/src/fixtures/e2e_prover_test.ts +3 -1
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/get_bb_config.ts +2 -1
- package/src/fixtures/setup_l1_contracts.ts +1 -1
- package/src/fixtures/snapshot_manager.ts +8 -13
- package/src/fixtures/token_utils.ts +4 -1
- package/src/fixtures/utils.ts +7 -13
- package/src/fixtures/web3signer.ts +2 -1
- package/src/quality_of_service/alert_checker.ts +1 -1
- package/src/shared/cross_chain_test_harness.ts +12 -12
- package/src/shared/gas_portal_test_harness.ts +7 -12
- package/src/shared/jest_setup.ts +1 -1
- package/src/shared/submit-transactions.ts +5 -1
- package/src/shared/uniswap_l1_l2.ts +6 -9
- package/src/simulators/lending_simulator.ts +2 -1
- package/src/simulators/token_simulator.ts +4 -1
- package/src/spartan/setup_test_wallets.ts +9 -13
- package/src/spartan/utils.ts +85 -3
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { BatchCall } from '@aztec/aztec.js/contracts';
|
|
3
|
+
import type { Logger } from '@aztec/aztec.js/log';
|
|
4
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
2
5
|
import type { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
3
6
|
|
|
4
7
|
import chunk from 'lodash.chunk';
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
SponsoredFeePaymentMethod,
|
|
10
|
-
type Wallet,
|
|
11
|
-
createAztecNodeClient,
|
|
12
|
-
retryUntil,
|
|
13
|
-
} from '@aztec/aztec.js';
|
|
2
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
+
import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
|
|
4
|
+
import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
|
|
5
|
+
import { type FeePaymentMethod, SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
6
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
7
|
+
import { type AztecNode, createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
8
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
14
9
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
15
10
|
import type { Logger } from '@aztec/foundation/log';
|
|
11
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
16
12
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
17
13
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
18
14
|
import { TestWallet, proveInteraction, registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet/server';
|
|
@@ -291,7 +287,7 @@ export async function createWalletAndAztecNodeClient(
|
|
|
291
287
|
const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
|
|
292
288
|
const pxeConfig = {
|
|
293
289
|
dataDirectory: undefined,
|
|
294
|
-
|
|
290
|
+
dataStoreMapSizeKb: 1024 * 1024,
|
|
295
291
|
...bbConfig,
|
|
296
292
|
...acvmConfig,
|
|
297
293
|
proverEnabled,
|
package/src/spartan/utils.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { createLogger
|
|
1
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
2
2
|
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
3
3
|
import type { L1ContractAddresses, ViemPublicClient } from '@aztec/ethereum';
|
|
4
4
|
import type { Logger } from '@aztec/foundation/log';
|
|
5
5
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
6
6
|
import { schemas } from '@aztec/foundation/schemas';
|
|
7
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
7
8
|
import {
|
|
8
9
|
type AztecNodeAdmin,
|
|
9
10
|
type AztecNodeAdminConfig,
|
|
@@ -277,7 +278,7 @@ function createHelmCommand({
|
|
|
277
278
|
namespace: string;
|
|
278
279
|
valuesFile: string | undefined;
|
|
279
280
|
timeout: string;
|
|
280
|
-
values: Record<string, string | number>;
|
|
281
|
+
values: Record<string, string | number | boolean>;
|
|
281
282
|
reuseValues?: boolean;
|
|
282
283
|
}) {
|
|
283
284
|
const valuesFileArgs = valuesFile ? `--values ${helmChartDir}/values/${valuesFile}` : '';
|
|
@@ -632,7 +633,7 @@ export async function installTransferBot({
|
|
|
632
633
|
namespace,
|
|
633
634
|
valuesFile: undefined,
|
|
634
635
|
timeout,
|
|
635
|
-
values: values as unknown as Record<string, string | number>,
|
|
636
|
+
values: values as unknown as Record<string, string | number | boolean>,
|
|
636
637
|
reuseValues,
|
|
637
638
|
});
|
|
638
639
|
|
|
@@ -660,6 +661,87 @@ export async function uninstallTransferBot(namespace: string, logger: Logger) {
|
|
|
660
661
|
);
|
|
661
662
|
}
|
|
662
663
|
|
|
664
|
+
/**
|
|
665
|
+
* Enables or disables probabilistic transaction dropping on validators and waits for rollout.
|
|
666
|
+
* Wired to env vars P2P_DROP_TX and P2P_DROP_TX_CHANCE via Helm values.
|
|
667
|
+
*/
|
|
668
|
+
export async function setValidatorTxDrop({
|
|
669
|
+
namespace,
|
|
670
|
+
enabled,
|
|
671
|
+
probability,
|
|
672
|
+
logger,
|
|
673
|
+
}: {
|
|
674
|
+
namespace: string;
|
|
675
|
+
enabled: boolean;
|
|
676
|
+
probability: number;
|
|
677
|
+
logger: Logger;
|
|
678
|
+
}) {
|
|
679
|
+
const drop = enabled ? 'true' : 'false';
|
|
680
|
+
const prob = String(probability);
|
|
681
|
+
|
|
682
|
+
const selectors = ['app=validator', 'app.kubernetes.io/component=validator'];
|
|
683
|
+
let updated = false;
|
|
684
|
+
for (const selector of selectors) {
|
|
685
|
+
try {
|
|
686
|
+
const list = await execAsync(`kubectl get statefulset -l ${selector} -n ${namespace} --no-headers -o name | cat`);
|
|
687
|
+
const names = list.stdout
|
|
688
|
+
.split('\n')
|
|
689
|
+
.map(s => s.trim())
|
|
690
|
+
.filter(Boolean);
|
|
691
|
+
if (names.length === 0) {
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
const cmd = `kubectl set env statefulset -l ${selector} -n ${namespace} P2P_DROP_TX=${drop} P2P_DROP_TX_CHANCE=${prob}`;
|
|
695
|
+
logger.info(`command: ${cmd}`);
|
|
696
|
+
await execAsync(cmd);
|
|
697
|
+
updated = true;
|
|
698
|
+
} catch (e) {
|
|
699
|
+
logger.warn(`Failed to update validators with selector ${selector}: ${String(e)}`);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
if (!updated) {
|
|
704
|
+
logger.warn(`No validator StatefulSets found in ${namespace}. Skipping tx drop toggle.`);
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Restart validator pods to ensure env vars take effect and wait for readiness
|
|
709
|
+
await restartValidators(namespace, logger);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export async function restartValidators(namespace: string, logger: Logger) {
|
|
713
|
+
const selectors = ['app=validator', 'app.kubernetes.io/component=validator'];
|
|
714
|
+
let any = false;
|
|
715
|
+
for (const selector of selectors) {
|
|
716
|
+
try {
|
|
717
|
+
const { stdout } = await execAsync(`kubectl get pods -l ${selector} -n ${namespace} --no-headers -o name | cat`);
|
|
718
|
+
if (!stdout || stdout.trim().length === 0) {
|
|
719
|
+
continue;
|
|
720
|
+
}
|
|
721
|
+
any = true;
|
|
722
|
+
await deleteResourceByLabel({ resource: 'pods', namespace, label: selector });
|
|
723
|
+
} catch (e) {
|
|
724
|
+
logger.warn(`Error restarting validator pods with selector ${selector}: ${String(e)}`);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (!any) {
|
|
729
|
+
logger.warn(`No validator pods found to restart in ${namespace}.`);
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// Wait for either label to be Ready
|
|
734
|
+
for (const selector of selectors) {
|
|
735
|
+
try {
|
|
736
|
+
await waitForResourceByLabel({ resource: 'pods', namespace, label: selector });
|
|
737
|
+
return;
|
|
738
|
+
} catch {
|
|
739
|
+
// try next
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
logger.warn(`Validator pods did not report Ready; continuing.`);
|
|
743
|
+
}
|
|
744
|
+
|
|
663
745
|
export async function enableValidatorDynamicBootNode(
|
|
664
746
|
instanceName: string,
|
|
665
747
|
namespace: string,
|