@aztec/end-to-end 1.2.0 → 2.0.0-nightly.20250813
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 +2 -2
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +4 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +33 -15
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +7 -4
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +11 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +59 -24
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +13 -10
- package/dest/e2e_deploy_contract/deploy_test.d.ts +1 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +7 -6
- package/dest/e2e_epochs/epochs_test.d.ts +16 -2
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +65 -7
- package/dest/e2e_fees/bridging_race.notest.js +3 -1
- package/dest/e2e_fees/fees_test.d.ts +5 -4
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +44 -59
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +3 -3
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +17 -12
- package/dest/e2e_p2p/p2p_network.d.ts +7 -4
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +43 -22
- package/dest/e2e_p2p/shared.d.ts +3 -3
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +16 -12
- package/dest/e2e_token_contract/token_contract_test.d.ts +8 -4
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +48 -23
- package/dest/fixtures/e2e_prover_test.d.ts +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +27 -10
- package/dest/fixtures/setup_p2p_test.d.ts +4 -1
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +39 -8
- package/dest/fixtures/snapshot_manager.d.ts +3 -1
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +20 -17
- package/dest/fixtures/token_utils.d.ts +3 -3
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +14 -10
- package/dest/fixtures/utils.d.ts +23 -8
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +88 -56
- package/dest/integration_l1_publisher/write_json.d.ts +8 -0
- package/dest/integration_l1_publisher/write_json.d.ts.map +1 -0
- package/dest/integration_l1_publisher/write_json.js +57 -0
- package/dest/sample-dapp/connect.d.mts +2 -0
- package/dest/sample-dapp/connect.d.mts.map +1 -0
- package/dest/sample-dapp/connect.js +1 -1
- package/dest/sample-dapp/contracts.d.mts +3 -0
- package/dest/sample-dapp/contracts.d.mts.map +1 -0
- package/dest/sample-dapp/contracts.js +1 -1
- package/dest/sample-dapp/deploy.d.mts +3 -0
- package/dest/sample-dapp/deploy.d.mts.map +1 -0
- package/dest/sample-dapp/deploy.js +4 -1
- package/dest/sample-dapp/index.d.mts +2 -0
- package/dest/sample-dapp/index.d.mts.map +1 -0
- package/dest/sample-dapp/index.js +18 -8
- package/dest/shared/cross_chain_test_harness.d.ts +6 -3
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +50 -20
- package/dest/shared/gas_portal_test_harness.d.ts +3 -3
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +21 -6
- 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 +45 -22
- package/dest/simulators/lending_simulator.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +6 -2
- package/dest/simulators/token_simulator.d.ts +2 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +12 -4
- package/dest/spartan/setup_test_wallets.d.ts +7 -0
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +96 -11
- package/dest/spartan/utils.d.ts +23 -3
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +9 -6
- package/package.json +36 -36
- package/src/bench/client_flows/benchmark.ts +8 -3
- package/src/bench/client_flows/client_flows_benchmark.ts +23 -14
- package/src/bench/utils.ts +5 -4
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +47 -26
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +14 -9
- package/src/e2e_deploy_contract/deploy_test.ts +7 -7
- package/src/e2e_epochs/epochs_test.ts +97 -25
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +55 -82
- package/src/e2e_nested_contract/nested_contract_test.ts +16 -11
- package/src/e2e_p2p/p2p_network.ts +51 -26
- package/src/e2e_p2p/shared.ts +14 -12
- package/src/e2e_token_contract/token_contract_test.ts +38 -36
- package/src/fixtures/e2e_prover_test.ts +17 -10
- package/src/fixtures/setup_p2p_test.ts +51 -9
- package/src/fixtures/snapshot_manager.ts +24 -17
- package/src/fixtures/token_utils.ts +14 -9
- package/src/fixtures/utils.ts +116 -57
- package/src/guides/up_quick_start.sh +1 -1
- package/src/integration_l1_publisher/write_json.ts +74 -0
- package/src/sample-dapp/connect.mjs +1 -1
- package/src/sample-dapp/contracts.mjs +1 -1
- package/src/sample-dapp/deploy.mjs +3 -3
- package/src/sample-dapp/index.mjs +11 -8
- package/src/shared/cross_chain_test_harness.ts +31 -18
- package/src/shared/gas_portal_test_harness.ts +17 -7
- package/src/shared/uniswap_l1_l2.ts +28 -24
- package/src/simulators/lending_simulator.ts +3 -3
- package/src/simulators/token_simulator.ts +12 -3
- package/src/spartan/setup_test_wallets.ts +130 -19
- package/src/spartan/utils.ts +10 -3
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
type AztecAddress,
|
|
6
6
|
type AztecNode,
|
|
7
7
|
FeeJuicePaymentMethodWithClaim,
|
|
8
|
+
type FeePaymentMethod,
|
|
8
9
|
Fr,
|
|
9
10
|
L1FeeJuicePortalManager,
|
|
10
11
|
type PXE,
|
|
12
|
+
SponsoredFeePaymentMethod,
|
|
11
13
|
createAztecNodeClient,
|
|
12
14
|
createCompatibleClient,
|
|
13
15
|
retryUntil,
|
|
@@ -15,14 +17,21 @@ import {
|
|
|
15
17
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
16
18
|
import type { Logger } from '@aztec/foundation/log';
|
|
17
19
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
|
+
import { createPXEService } from '@aztec/pxe/server';
|
|
18
21
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
19
22
|
|
|
23
|
+
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
24
|
+
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
25
|
+
import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
|
|
26
|
+
|
|
20
27
|
export interface TestWallets {
|
|
21
28
|
pxe: PXE;
|
|
22
29
|
wallets: AccountWalletWithSecretKey[];
|
|
23
30
|
tokenAdminWallet: TokenContract;
|
|
31
|
+
tokenAdminAddress: AztecAddress;
|
|
24
32
|
tokenName: string;
|
|
25
33
|
recipientWallet: AccountWalletWithSecretKey;
|
|
34
|
+
recipientAddress: AztecAddress;
|
|
26
35
|
tokenAddress: AztecAddress;
|
|
27
36
|
}
|
|
28
37
|
|
|
@@ -42,10 +51,68 @@ export async function setupTestWalletsWithTokens(
|
|
|
42
51
|
const [recipientWallet, ...wallets] = (await getDeployedTestAccountsWallets(pxe)).slice(0, WALLET_COUNT + 1);
|
|
43
52
|
|
|
44
53
|
const tokenAdmin = wallets[0];
|
|
45
|
-
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
|
|
54
|
+
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, undefined, logger);
|
|
46
55
|
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
47
56
|
|
|
48
|
-
return {
|
|
57
|
+
return {
|
|
58
|
+
pxe,
|
|
59
|
+
wallets,
|
|
60
|
+
tokenAdminWallet,
|
|
61
|
+
tokenAdminAddress: tokenAdmin.getAddress(),
|
|
62
|
+
tokenName: TOKEN_NAME,
|
|
63
|
+
tokenAddress,
|
|
64
|
+
recipientAddress: recipientWallet.getAddress(),
|
|
65
|
+
recipientWallet,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export async function deploySponsoredTestWallets(
|
|
70
|
+
pxe: PXE,
|
|
71
|
+
mintAmount: bigint,
|
|
72
|
+
logger: Logger,
|
|
73
|
+
numberOfFundedWallets = 1,
|
|
74
|
+
): Promise<TestWallets> {
|
|
75
|
+
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
76
|
+
const recipientWallet = await getSchnorrWalletWithSecretKey(
|
|
77
|
+
pxe,
|
|
78
|
+
recipient.secret,
|
|
79
|
+
recipient.signingKey,
|
|
80
|
+
recipient.salt,
|
|
81
|
+
);
|
|
82
|
+
const fundedAccounts = await Promise.all(funded.map(a => getSchnorrAccount(pxe, a.secret, a.signingKey, a.salt)));
|
|
83
|
+
|
|
84
|
+
await registerSponsoredFPC(pxe);
|
|
85
|
+
|
|
86
|
+
const wallets = await Promise.all(
|
|
87
|
+
fundedAccounts.map(async a => {
|
|
88
|
+
const wallet = await a.getWallet();
|
|
89
|
+
const paymentMethod = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
90
|
+
await a.deploy({ fee: { paymentMethod } }).wait({ timeout: 2400 }); // increase timeout on purpose in order to account for two empty epochs
|
|
91
|
+
logger.info(`Account deployed at ${a.getAddress()}`);
|
|
92
|
+
return wallet;
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const tokenAdmin = wallets[0];
|
|
97
|
+
const tokenAddress = await deployTokenAndMint(
|
|
98
|
+
wallets,
|
|
99
|
+
tokenAdmin.getAddress(),
|
|
100
|
+
mintAmount,
|
|
101
|
+
new SponsoredFeePaymentMethod(await getSponsoredFPCAddress()),
|
|
102
|
+
logger,
|
|
103
|
+
);
|
|
104
|
+
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
pxe,
|
|
108
|
+
wallets,
|
|
109
|
+
tokenAdminAddress: tokenAdmin.getAddress(),
|
|
110
|
+
tokenAdminWallet,
|
|
111
|
+
tokenName: TOKEN_NAME,
|
|
112
|
+
tokenAddress,
|
|
113
|
+
recipientWallet,
|
|
114
|
+
recipientAddress: recipientWallet.getAddress(),
|
|
115
|
+
};
|
|
49
116
|
}
|
|
50
117
|
|
|
51
118
|
export async function deployTestWalletWithTokens(
|
|
@@ -89,10 +156,19 @@ export async function deployTestWalletWithTokens(
|
|
|
89
156
|
);
|
|
90
157
|
|
|
91
158
|
const tokenAdmin = wallets[0];
|
|
92
|
-
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
|
|
159
|
+
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, undefined, logger);
|
|
93
160
|
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
94
161
|
|
|
95
|
-
return {
|
|
162
|
+
return {
|
|
163
|
+
pxe,
|
|
164
|
+
wallets,
|
|
165
|
+
tokenAdminAddress: tokenAdmin.getAddress(),
|
|
166
|
+
tokenAdminWallet,
|
|
167
|
+
tokenName: TOKEN_NAME,
|
|
168
|
+
tokenAddress,
|
|
169
|
+
recipientWallet,
|
|
170
|
+
recipientAddress: recipientWallet.getAddress(),
|
|
171
|
+
};
|
|
96
172
|
}
|
|
97
173
|
|
|
98
174
|
async function bridgeL1FeeJuice(
|
|
@@ -121,19 +197,35 @@ async function bridgeL1FeeJuice(
|
|
|
121
197
|
|
|
122
198
|
async function advanceL2Block(node: AztecNode, nodeAdmin?: AztecNodeAdmin) {
|
|
123
199
|
const initialBlockNumber = await node.getBlockNumber();
|
|
124
|
-
|
|
200
|
+
|
|
201
|
+
let minTxsPerBlock = undefined;
|
|
202
|
+
if (nodeAdmin) {
|
|
203
|
+
({ minTxsPerBlock } = await nodeAdmin.getConfig());
|
|
204
|
+
await nodeAdmin.setConfig({ minTxsPerBlock: 0 }); // Set to 0 to ensure we can advance the block
|
|
205
|
+
}
|
|
206
|
+
|
|
125
207
|
await retryUntil(async () => (await node.getBlockNumber()) >= initialBlockNumber + 1);
|
|
208
|
+
|
|
209
|
+
if (nodeAdmin && minTxsPerBlock !== undefined) {
|
|
210
|
+
await nodeAdmin.setConfig({ minTxsPerBlock });
|
|
211
|
+
}
|
|
126
212
|
}
|
|
127
213
|
|
|
128
214
|
async function deployTokenAndMint(
|
|
129
215
|
wallets: AccountWalletWithSecretKey[],
|
|
130
216
|
admin: AztecAddress,
|
|
131
217
|
mintAmount: bigint,
|
|
218
|
+
paymentMethod: FeePaymentMethod | undefined,
|
|
132
219
|
logger: Logger,
|
|
133
220
|
) {
|
|
134
221
|
logger.verbose(`Deploying TokenContract...`);
|
|
135
222
|
const tokenContract = await TokenContract.deploy(wallets[0], admin, TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS)
|
|
136
|
-
.send(
|
|
223
|
+
.send({
|
|
224
|
+
from: admin,
|
|
225
|
+
fee: {
|
|
226
|
+
paymentMethod,
|
|
227
|
+
},
|
|
228
|
+
})
|
|
137
229
|
.deployed({ timeout: 600 });
|
|
138
230
|
|
|
139
231
|
const tokenAddress = tokenContract.address;
|
|
@@ -144,7 +236,7 @@ async function deployTokenAndMint(
|
|
|
144
236
|
wallets.map(async w =>
|
|
145
237
|
(await TokenContract.at(tokenAddress, w)).methods
|
|
146
238
|
.mint_to_public(w.getAddress(), mintAmount)
|
|
147
|
-
.send()
|
|
239
|
+
.send({ from: admin, fee: { paymentMethod } })
|
|
148
240
|
.wait({ timeout: 600 }),
|
|
149
241
|
),
|
|
150
242
|
);
|
|
@@ -166,23 +258,42 @@ export async function performTransfers({
|
|
|
166
258
|
logger: Logger;
|
|
167
259
|
}) {
|
|
168
260
|
const recipient = testWallets.recipientWallet.getAddress();
|
|
169
|
-
|
|
170
261
|
for (let i = 0; i < rounds; i++) {
|
|
171
|
-
const
|
|
172
|
-
testWallets.
|
|
173
|
-
(
|
|
174
|
-
|
|
175
|
-
recipient,
|
|
176
|
-
transferAmount,
|
|
177
|
-
0,
|
|
178
|
-
),
|
|
179
|
-
),
|
|
262
|
+
const txs = testWallets.wallets.map(async w =>
|
|
263
|
+
(await TokenContract.at(testWallets.tokenAddress, w)).methods
|
|
264
|
+
.transfer_in_public(w.getAddress(), recipient, transferAmount, 0)
|
|
265
|
+
.prove({ from: w.getAddress() }),
|
|
180
266
|
);
|
|
181
267
|
|
|
182
|
-
const
|
|
268
|
+
const provenTxs = await Promise.all(txs);
|
|
183
269
|
|
|
184
|
-
await Promise.all(
|
|
270
|
+
await Promise.all(provenTxs.map(t => t.send().wait({ timeout: 600 })));
|
|
185
271
|
|
|
186
272
|
logger.info(`Completed round ${i + 1} / ${rounds}`);
|
|
187
273
|
}
|
|
188
274
|
}
|
|
275
|
+
|
|
276
|
+
export async function startCompatiblePXE(
|
|
277
|
+
nodeUrl: string,
|
|
278
|
+
proverEnabled: boolean,
|
|
279
|
+
logger: Logger,
|
|
280
|
+
): Promise<{ pxe: PXE; cleanup: () => Promise<void> }> {
|
|
281
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
282
|
+
const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
|
|
283
|
+
const pxe = await createPXEService(node, {
|
|
284
|
+
dataDirectory: undefined,
|
|
285
|
+
dataStoreMapSizeKB: 1024 * 1024,
|
|
286
|
+
...bbConfig,
|
|
287
|
+
...acvmConfig,
|
|
288
|
+
proverEnabled,
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
pxe,
|
|
293
|
+
async cleanup() {
|
|
294
|
+
await pxe.stop();
|
|
295
|
+
await bbConfig?.cleanup();
|
|
296
|
+
await acvmConfig?.cleanup();
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
}
|
package/src/spartan/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger, sleep } from '@aztec/aztec.js';
|
|
2
|
-
import type { RollupCheatCodes } from '@aztec/aztec
|
|
2
|
+
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
3
3
|
import type { Logger } from '@aztec/foundation/log';
|
|
4
4
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
5
5
|
import type { SequencerConfig } from '@aztec/sequencer-client';
|
|
@@ -34,6 +34,7 @@ const k8sLocalConfigSchema = z.object({
|
|
|
34
34
|
AZTEC_SLOT_DURATION: z.coerce.number().min(1, 'AZTEC_SLOT_DURATION env variable must be set'),
|
|
35
35
|
AZTEC_EPOCH_DURATION: z.coerce.number().min(1, 'AZTEC_EPOCH_DURATION env variable must be set'),
|
|
36
36
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.coerce.number().min(1, 'AZTEC_PROOF_SUBMISSION_WINDOW env variable must be set'),
|
|
37
|
+
AZTEC_REAL_PROOFS: z.string().default('false'),
|
|
37
38
|
INSTANCE_NAME: z.string().min(1, 'INSTANCE_NAME env variable must be set'),
|
|
38
39
|
NAMESPACE: z.string().min(1, 'NAMESPACE env variable must be set'),
|
|
39
40
|
CONTAINER_NODE_PORT: z.coerce.number().default(8080),
|
|
@@ -56,6 +57,7 @@ const k8sGCloudConfigSchema = k8sLocalConfigSchema.extend({
|
|
|
56
57
|
K8S: z.literal('gcloud'),
|
|
57
58
|
CLUSTER_NAME: z.string().min(1, 'CLUSTER_NAME env variable must be set'),
|
|
58
59
|
REGION: z.string().min(1, 'REGION env variable must be set'),
|
|
60
|
+
PROJECT_ID: z.string().min(1, 'PROJECT_ID env variable must be set'),
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
const directConfigSchema = z.object({
|
|
@@ -84,7 +86,7 @@ export function isGCloudConfig(config: EnvConfig): config is K8sGCloudConfig {
|
|
|
84
86
|
export function setupEnvironment(env: unknown): EnvConfig {
|
|
85
87
|
const config = envSchema.parse(env);
|
|
86
88
|
if (isGCloudConfig(config)) {
|
|
87
|
-
const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION}`;
|
|
89
|
+
const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION} --project=${config.PROJECT_ID}`;
|
|
88
90
|
execSync(command);
|
|
89
91
|
}
|
|
90
92
|
return config;
|
|
@@ -233,12 +235,14 @@ export async function deleteResourceByLabel({
|
|
|
233
235
|
resource,
|
|
234
236
|
namespace,
|
|
235
237
|
label,
|
|
238
|
+
timeout = '5m',
|
|
236
239
|
}: {
|
|
237
240
|
resource: string;
|
|
238
241
|
namespace: string;
|
|
239
242
|
label: string;
|
|
243
|
+
timeout?: string;
|
|
240
244
|
}) {
|
|
241
|
-
const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true`;
|
|
245
|
+
const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true --timeout=${timeout}`;
|
|
242
246
|
logger.info(`command: ${command}`);
|
|
243
247
|
const { stdout } = await execAsync(command);
|
|
244
248
|
return stdout;
|
|
@@ -458,10 +462,12 @@ export function applyValidatorKill({
|
|
|
458
462
|
namespace,
|
|
459
463
|
spartanDir,
|
|
460
464
|
logger,
|
|
465
|
+
values,
|
|
461
466
|
}: {
|
|
462
467
|
namespace: string;
|
|
463
468
|
spartanDir: string;
|
|
464
469
|
logger: Logger;
|
|
470
|
+
values?: Record<string, string | number>;
|
|
465
471
|
}) {
|
|
466
472
|
return installChaosMeshChart({
|
|
467
473
|
instanceName: 'validator-kill',
|
|
@@ -469,6 +475,7 @@ export function applyValidatorKill({
|
|
|
469
475
|
valuesFile: 'validator-kill.yaml',
|
|
470
476
|
helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
|
|
471
477
|
logger,
|
|
478
|
+
values,
|
|
472
479
|
});
|
|
473
480
|
}
|
|
474
481
|
|