@aztec/end-to-end 0.0.1-commit.d6f2b3f94 → 0.0.1-commit.d939eb5aa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +22 -29
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +6 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +6 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +23 -13
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +11 -7
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +60 -38
- package/dest/e2e_fees/fees_test.d.ts +2 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +19 -12
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +4 -6
- package/dest/e2e_p2p/inactivity_slash_test.js +3 -3
- package/dest/e2e_p2p/p2p_network.d.ts +9 -10
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +38 -20
- package/dest/e2e_p2p/reqresp/utils.d.ts +3 -3
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
- package/dest/e2e_p2p/reqresp/utils.js +46 -9
- package/dest/e2e_p2p/shared.d.ts +26 -8
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +51 -45
- package/dest/e2e_token_contract/token_contract_test.d.ts +4 -2
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +19 -9
- package/dest/fixtures/authwit_proxy.d.ts +15 -0
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
- package/dest/fixtures/authwit_proxy.js +34 -0
- package/dest/fixtures/e2e_prover_test.d.ts +7 -6
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +37 -49
- 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 +5 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +6 -0
- 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 +5 -5
- package/dest/fixtures/ha_setup.d.ts +1 -1
- package/dest/fixtures/ha_setup.d.ts.map +1 -1
- package/dest/fixtures/ha_setup.js +3 -1
- package/dest/fixtures/setup.d.ts +41 -17
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +76 -95
- package/dest/fixtures/setup_p2p_test.d.ts +10 -7
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +18 -15
- package/dest/fixtures/token_utils.d.ts +2 -2
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +5 -7
- package/dest/legacy-jest-resolver.d.cts +3 -0
- package/dest/legacy-jest-resolver.d.cts.map +1 -0
- package/dest/shared/cross_chain_test_harness.d.ts +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +13 -13
- package/dest/shared/gas_portal_test_harness.js +2 -2
- package/dest/shared/index.d.ts +2 -1
- package/dest/shared/index.d.ts.map +1 -1
- package/dest/shared/index.js +1 -0
- package/dest/shared/jest_setup.js +41 -1
- package/dest/shared/mock_state_view.d.ts +86 -0
- package/dest/shared/mock_state_view.d.ts.map +1 -0
- package/dest/shared/mock_state_view.js +186 -0
- package/dest/shared/submit-transactions.d.ts +2 -2
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +14 -17
- package/dest/simulators/lending_simulator.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +4 -4
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +3 -24
- package/dest/spartan/setup_test_wallets.d.ts +12 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +100 -39
- package/dest/spartan/tx_metrics.js +1 -1
- package/dest/spartan/utils/bot.d.ts +3 -2
- package/dest/spartan/utils/bot.d.ts.map +1 -1
- package/dest/spartan/utils/bot.js +2 -1
- package/dest/spartan/utils/config.d.ts +7 -1
- package/dest/spartan/utils/config.d.ts.map +1 -1
- package/dest/spartan/utils/config.js +3 -1
- package/dest/spartan/utils/index.d.ts +4 -2
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +5 -1
- package/dest/spartan/utils/k8s.d.ts +3 -1
- package/dest/spartan/utils/k8s.d.ts.map +1 -1
- package/dest/spartan/utils/k8s.js +6 -0
- package/dest/spartan/utils/nodes.d.ts +4 -5
- package/dest/spartan/utils/nodes.d.ts.map +1 -1
- package/dest/spartan/utils/nodes.js +9 -9
- 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/test-wallet/test_wallet.d.ts +84 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +249 -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 +279 -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 +43 -43
- package/src/bench/client_flows/client_flows_benchmark.ts +26 -13
- package/src/bench/utils.ts +7 -2
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +30 -20
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
- package/src/e2e_deploy_contract/deploy_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +78 -66
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +15 -23
- package/src/e2e_nested_contract/nested_contract_test.ts +6 -4
- package/src/e2e_p2p/inactivity_slash_test.ts +3 -3
- package/src/e2e_p2p/p2p_network.ts +54 -33
- package/src/e2e_p2p/reqresp/utils.ts +58 -9
- package/src/e2e_p2p/shared.ts +73 -60
- package/src/e2e_token_contract/token_contract_test.ts +25 -8
- package/src/fixtures/authwit_proxy.ts +54 -0
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +44 -53
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +10 -0
- package/src/fixtures/get_bb_config.ts +7 -6
- package/src/fixtures/ha_setup.ts +3 -1
- package/src/fixtures/setup.ts +108 -130
- package/src/fixtures/setup_p2p_test.ts +17 -25
- package/src/fixtures/token_utils.ts +3 -3
- package/src/guides/up_quick_start.sh +3 -3
- package/src/legacy-jest-resolver.cjs +135 -0
- package/src/shared/cross_chain_test_harness.ts +13 -9
- package/src/shared/gas_portal_test_harness.ts +1 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/jest_setup.ts +51 -1
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +3 -2
- package/src/shared/uniswap_l1_l2.ts +36 -29
- package/src/simulators/lending_simulator.ts +8 -4
- package/src/simulators/token_simulator.ts +6 -30
- package/src/spartan/setup_test_wallets.ts +141 -32
- package/src/spartan/tx_metrics.ts +1 -1
- package/src/spartan/utils/bot.ts +4 -1
- package/src/spartan/utils/config.ts +2 -0
- package/src/spartan/utils/index.ts +7 -0
- package/src/spartan/utils/k8s.ts +8 -0
- package/src/spartan/utils/nodes.ts +15 -10
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/test-wallet/test_wallet.ts +351 -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 +214 -0
- package/src/test-wallet/worker_wallet_schema.ts +13 -0
|
@@ -4,7 +4,7 @@ import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
|
4
4
|
import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
5
5
|
import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
|
|
6
6
|
import { MultiAdderArtifact } from '@aztec/ethereum/l1-artifacts';
|
|
7
|
-
import {
|
|
7
|
+
import { createL1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
8
8
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
9
9
|
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
10
10
|
import { SecretValue } from '@aztec/foundation/config';
|
|
@@ -14,7 +14,8 @@ import { RollupAbi, SlasherAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
|
14
14
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
15
15
|
import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
|
|
16
16
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
17
|
-
import {
|
|
17
|
+
import { TopicType } from '@aztec/stdlib/p2p';
|
|
18
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
18
19
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
19
20
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
20
21
|
import getPort from 'get-port';
|
|
@@ -30,7 +31,7 @@ export const WAIT_FOR_TX_TIMEOUT = l1ContractsConfig.aztecSlotDuration * 3;
|
|
|
30
31
|
export const SHORTENED_BLOCK_TIME_CONFIG_NO_PRUNES = {
|
|
31
32
|
aztecSlotDuration: 12,
|
|
32
33
|
ethereumSlotDuration: 4,
|
|
33
|
-
|
|
34
|
+
aztecProofSubmissionEpochs: 640
|
|
34
35
|
};
|
|
35
36
|
export class P2PNetworkTest {
|
|
36
37
|
testName;
|
|
@@ -50,7 +51,7 @@ export class P2PNetworkTest {
|
|
|
50
51
|
peerIdPrivateKeys;
|
|
51
52
|
validators;
|
|
52
53
|
deployedAccounts;
|
|
53
|
-
|
|
54
|
+
genesis;
|
|
54
55
|
// The re-execution test needs a wallet and a spam contract
|
|
55
56
|
wallet;
|
|
56
57
|
defaultAccountAddress;
|
|
@@ -72,7 +73,6 @@ export class P2PNetworkTest {
|
|
|
72
73
|
this.peerIdPrivateKeys = [];
|
|
73
74
|
this.validators = [];
|
|
74
75
|
this.deployedAccounts = [];
|
|
75
|
-
this.prefilledPublicData = [];
|
|
76
76
|
this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
|
|
77
77
|
// Set up the base account and node private keys for the initial network deployment
|
|
78
78
|
this.baseAccountPrivateKey = `0x${getPrivateKeyFromIndex(1).toString('hex')}`;
|
|
@@ -88,7 +88,7 @@ export class P2PNetworkTest {
|
|
|
88
88
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
89
89
|
aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
90
90
|
slashingRoundSizeInEpochs: initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
|
|
91
|
-
|
|
91
|
+
slasherEnabled: initialValidatorConfig.slasherEnabled ?? true,
|
|
92
92
|
aztecTargetCommitteeSize: numberOfValidators,
|
|
93
93
|
metricsPort: metricsPort,
|
|
94
94
|
numberOfInitialFundedAccounts: 2,
|
|
@@ -99,7 +99,7 @@ export class P2PNetworkTest {
|
|
|
99
99
|
...initialValidatorConfig,
|
|
100
100
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
101
101
|
slashingRoundSizeInEpochs: initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
|
|
102
|
-
|
|
102
|
+
slasherEnabled: initialValidatorConfig.slasherEnabled ?? true,
|
|
103
103
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
104
104
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
105
105
|
aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
@@ -206,7 +206,11 @@ export class P2PNetworkTest {
|
|
|
206
206
|
}
|
|
207
207
|
async setupAccount() {
|
|
208
208
|
this.logger.info('Setting up account');
|
|
209
|
-
const { deployedAccounts } = await deployAccounts(1, this.logger
|
|
209
|
+
const { deployedAccounts } = await deployAccounts(1, this.logger, {
|
|
210
|
+
wait: {
|
|
211
|
+
waitForStatus: TxStatus.CHECKPOINTED
|
|
212
|
+
}
|
|
213
|
+
})({
|
|
210
214
|
wallet: this.context.wallet,
|
|
211
215
|
initialFundedAccounts: this.context.initialFundedAccounts
|
|
212
216
|
});
|
|
@@ -219,10 +223,9 @@ export class P2PNetworkTest {
|
|
|
219
223
|
if (!this.wallet) {
|
|
220
224
|
throw new Error('Call setupAccount before deploying spam contract');
|
|
221
225
|
}
|
|
222
|
-
|
|
226
|
+
({ contract: this.spamContract } = await SpamContract.deploy(this.wallet).send({
|
|
223
227
|
from: this.defaultAccountAddress
|
|
224
|
-
});
|
|
225
|
-
this.spamContract = spamContract;
|
|
228
|
+
}));
|
|
226
229
|
}
|
|
227
230
|
async removeInitialNode() {
|
|
228
231
|
this.logger.info('Removing initial node');
|
|
@@ -238,7 +241,7 @@ export class P2PNetworkTest {
|
|
|
238
241
|
return await this._sendDummyTx(this.ctx.deployL1ContractsValues.l1Client);
|
|
239
242
|
}
|
|
240
243
|
async _sendDummyTx(l1Client) {
|
|
241
|
-
const l1TxUtils =
|
|
244
|
+
const l1TxUtils = createL1TxUtils(l1Client);
|
|
242
245
|
return await l1TxUtils.sendAndMonitorTransaction({
|
|
243
246
|
to: l1Client.account.address,
|
|
244
247
|
value: 1n
|
|
@@ -250,7 +253,7 @@ export class P2PNetworkTest {
|
|
|
250
253
|
...this.setupOptions,
|
|
251
254
|
fundSponsoredFPC: true,
|
|
252
255
|
skipAccountDeployment: true,
|
|
253
|
-
|
|
256
|
+
slasherEnabled: this.setupOptions.slasherEnabled ?? this.deployL1ContractsArgs.slasherEnabled ?? false,
|
|
254
257
|
aztecTargetCommitteeSize: 0,
|
|
255
258
|
l1ContractsArgs: this.deployL1ContractsArgs
|
|
256
259
|
}, // Use checkpointed chain tip for PXE to avoid issues with blocks being dropped due to pruned anchor blocks.
|
|
@@ -263,8 +266,8 @@ export class P2PNetworkTest {
|
|
|
263
266
|
...this.context.initialFundedAccounts.map((a)=>a.address),
|
|
264
267
|
sponsoredFPCAddress
|
|
265
268
|
];
|
|
266
|
-
const {
|
|
267
|
-
this.
|
|
269
|
+
const { genesis } = await getGenesisValues(initialFundedAccounts, undefined, undefined, this.context.genesis.genesisTimestamp);
|
|
270
|
+
this.genesis = genesis;
|
|
268
271
|
const rollupContract = RollupContract.getFromL1ContractsValues(this.context.deployL1ContractsValues);
|
|
269
272
|
this.monitor = new ChainMonitor(rollupContract, this.context.dateProvider).start();
|
|
270
273
|
this.monitor.on('l1-block', ({ timestamp })=>this.context.dateProvider.setTime(Number(timestamp) * 1000));
|
|
@@ -287,7 +290,9 @@ export class P2PNetworkTest {
|
|
|
287
290
|
* @param expectedNodeCount - Expected number of nodes in the network (defaults to nodes.length)
|
|
288
291
|
* @param timeoutSeconds - Maximum time to wait for connections (default: 30 seconds)
|
|
289
292
|
* @param checkIntervalSeconds - How often to check connectivity (default: 0.1 seconds)
|
|
290
|
-
*/ async waitForP2PMeshConnectivity(nodes, expectedNodeCount, timeoutSeconds = 30, checkIntervalSeconds = 0.1
|
|
293
|
+
*/ async waitForP2PMeshConnectivity(nodes, expectedNodeCount, timeoutSeconds = 30, checkIntervalSeconds = 0.1, topics = [
|
|
294
|
+
TopicType.tx
|
|
295
|
+
]) {
|
|
291
296
|
const nodeCount = expectedNodeCount ?? nodes.length;
|
|
292
297
|
const minPeerCount = nodeCount - 1;
|
|
293
298
|
this.logger.warn(`Waiting for all ${nodeCount} nodes to connect to P2P mesh (at least ${minPeerCount} peers each)...`);
|
|
@@ -300,6 +305,21 @@ export class P2PNetworkTest {
|
|
|
300
305
|
}, `Node ${index} to connect to at least ${minPeerCount} peers`, timeoutSeconds, checkIntervalSeconds);
|
|
301
306
|
}));
|
|
302
307
|
this.logger.warn('All nodes connected to P2P mesh');
|
|
308
|
+
// Wait for GossipSub mesh to form for all specified topics.
|
|
309
|
+
// We only require at least 1 mesh peer per node because GossipSub
|
|
310
|
+
// stops grafting once it reaches Dlo peers and won't fill the mesh to all available peers.
|
|
311
|
+
for (const topic of topics){
|
|
312
|
+
this.logger.warn(`Waiting for GossipSub mesh to form for ${topic} topic...`);
|
|
313
|
+
await Promise.all(nodes.map(async (node, index)=>{
|
|
314
|
+
const p2p = node.getP2P();
|
|
315
|
+
await retryUntil(async ()=>{
|
|
316
|
+
const meshPeers = await p2p.getGossipMeshPeerCount(topic);
|
|
317
|
+
this.logger.debug(`Node ${index} has ${meshPeers} gossip mesh peers for ${topic} topic`);
|
|
318
|
+
return meshPeers >= 1 ? true : undefined;
|
|
319
|
+
}, `Node ${index} to have gossip mesh peers for ${topic} topic`, timeoutSeconds, checkIntervalSeconds);
|
|
320
|
+
}));
|
|
321
|
+
this.logger.warn(`All nodes have gossip mesh peers for ${topic} topic`);
|
|
322
|
+
}
|
|
303
323
|
}
|
|
304
324
|
async teardown() {
|
|
305
325
|
await this.monitor.stop();
|
|
@@ -316,14 +336,12 @@ export class P2PNetworkTest {
|
|
|
316
336
|
abi: SlasherAbi,
|
|
317
337
|
client: this.ctx.deployL1ContractsValues.l1Client
|
|
318
338
|
});
|
|
319
|
-
// Get the actual slashing proposer from rollup
|
|
339
|
+
// Get the actual slashing proposer from rollup
|
|
320
340
|
const slashingProposer = await rollup.getSlashingProposer();
|
|
321
|
-
const slashFactory = new SlashFactoryContract(this.ctx.deployL1ContractsValues.l1Client, getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress.toString()));
|
|
322
341
|
return {
|
|
323
342
|
rollup,
|
|
324
343
|
slasherContract,
|
|
325
|
-
slashingProposer
|
|
326
|
-
slashFactory
|
|
344
|
+
slashingProposer
|
|
327
345
|
};
|
|
328
346
|
}
|
|
329
347
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { P2PNetworkTest } from '../p2p_network.js';
|
|
3
3
|
export declare const NUM_VALIDATORS = 6;
|
|
4
|
-
export declare const NUM_TXS_PER_NODE =
|
|
5
|
-
export declare const BOOT_NODE_UDP_PORT
|
|
4
|
+
export declare const NUM_TXS_PER_NODE = 4;
|
|
5
|
+
export declare const BOOT_NODE_UDP_PORT: number;
|
|
6
6
|
export declare const createReqrespDataDir: () => string;
|
|
7
7
|
type ReqrespOptions = {
|
|
8
8
|
disableStatusHandshake?: boolean;
|
|
@@ -19,4 +19,4 @@ export declare function runReqrespTxTest(params: {
|
|
|
19
19
|
disableStatusHandshake?: boolean;
|
|
20
20
|
}): Promise<AztecNodeService[]>;
|
|
21
21
|
export {};
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lMmVfcDJwL3JlcXJlc3AvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQWdCMUQsT0FBTyxFQUFFLGNBQWMsRUFBdUIsTUFBTSxtQkFBbUIsQ0FBQztBQUl4RSxlQUFPLE1BQU0sY0FBYyxJQUFJLENBQUM7QUFDaEMsZUFBTyxNQUFNLGdCQUFnQixJQUFJLENBQUM7QUFDbEMsZUFBTyxNQUFNLGtCQUFrQixRQUF1QixDQUFDO0FBRXZELGVBQU8sTUFBTSxvQkFBb0IsY0FBMkQsQ0FBQztBQUU3RixLQUFLLGNBQWMsR0FBRztJQUNwQixzQkFBc0IsQ0FBQyxFQUFFLE9BQU8sQ0FBQztDQUNsQyxDQUFDO0FBRUYsd0JBQXNCLGlCQUFpQixDQUFDLE9BQU8sR0FBRSxjQUFtQixHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0EwQjdGO0FBRUQsd0JBQXNCLGtCQUFrQixDQUFDLE1BQU0sRUFBRTtJQUFFLENBQUMsRUFBRSxjQUFjLENBQUM7SUFBQyxLQUFLLENBQUMsRUFBRSxnQkFBZ0IsRUFBRSxDQUFDO0lBQUMsT0FBTyxFQUFFLE1BQU0sQ0FBQTtDQUFFLGlCQVNsSDtBQUlELHdCQUFzQixnQkFBZ0IsQ0FBQyxNQUFNLEVBQUU7SUFDN0MsQ0FBQyxFQUFFLGNBQWMsQ0FBQztJQUNsQixPQUFPLEVBQUUsTUFBTSxDQUFDO0lBQ2hCLHNCQUFzQixDQUFDLEVBQUUsT0FBTyxDQUFDO0NBQ2xDLEdBQUcsT0FBTyxDQUFDLGdCQUFnQixFQUFFLENBQUMsQ0FtSjlCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2e_p2p/reqresp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAgB1D,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2e_p2p/reqresp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAgB1D,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AAIxE,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,kBAAkB,QAAuB,CAAC;AAEvD,eAAO,MAAM,oBAAoB,cAA2D,CAAC;AAE7F,KAAK,cAAc,GAAG;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,cAAc,CAAC,CA0B7F;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAAE,CAAC,EAAE,cAAc,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,iBASlH;AAID,wBAAsB,gBAAgB,CAAC,MAAM,EAAE;IAC7C,CAAC,EAAE,cAAc,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAmJ9B"}
|
|
@@ -2,21 +2,21 @@ import { createLogger } from '@aztec/aztec.js/log';
|
|
|
2
2
|
import { waitForTx } from '@aztec/aztec.js/node';
|
|
3
3
|
import { Tx } from '@aztec/aztec.js/tx';
|
|
4
4
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
5
|
-
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
5
|
+
import { CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
6
6
|
import { timesAsync } from '@aztec/foundation/collection';
|
|
7
7
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
8
|
-
import { jest } from '@jest/globals';
|
|
8
|
+
import { expect, jest } from '@jest/globals';
|
|
9
9
|
import fs from 'fs';
|
|
10
10
|
import os from 'os';
|
|
11
11
|
import path from 'path';
|
|
12
|
-
import { shouldCollectMetrics } from '../../fixtures/fixtures.js';
|
|
12
|
+
import { getBootNodeUdpPort, shouldCollectMetrics } from '../../fixtures/fixtures.js';
|
|
13
13
|
import { createNodes } from '../../fixtures/setup_p2p_test.js';
|
|
14
|
-
import { P2PNetworkTest,
|
|
14
|
+
import { P2PNetworkTest, WAIT_FOR_TX_TIMEOUT } from '../p2p_network.js';
|
|
15
15
|
import { prepareTransactions } from '../shared.js';
|
|
16
16
|
// Don't set this to a higher value than 9 because each node will use a different L1 publisher account and anvil seeds
|
|
17
17
|
export const NUM_VALIDATORS = 6;
|
|
18
|
-
export const NUM_TXS_PER_NODE =
|
|
19
|
-
export const BOOT_NODE_UDP_PORT =
|
|
18
|
+
export const NUM_TXS_PER_NODE = 4;
|
|
19
|
+
export const BOOT_NODE_UDP_PORT = getBootNodeUdpPort();
|
|
20
20
|
export const createReqrespDataDir = ()=>fs.mkdtempSync(path.join(os.tmpdir(), 'reqresp-'));
|
|
21
21
|
export async function createReqrespTest(options = {}) {
|
|
22
22
|
const { disableStatusHandshake = false } = options;
|
|
@@ -28,8 +28,14 @@ export async function createReqrespTest(options = {}) {
|
|
|
28
28
|
// To collect metrics - run in aztec-packages `docker compose --profile metrics up`
|
|
29
29
|
metricsPort: shouldCollectMetrics(),
|
|
30
30
|
initialConfig: {
|
|
31
|
-
|
|
32
|
-
aztecSlotDuration:
|
|
31
|
+
ethereumSlotDuration: 8,
|
|
32
|
+
aztecSlotDuration: 36,
|
|
33
|
+
blockDurationMs: 6000,
|
|
34
|
+
l1PublishingTime: 8,
|
|
35
|
+
minTxsPerBlock: 1,
|
|
36
|
+
maxTxsPerBlock: 2,
|
|
37
|
+
enforceTimeTable: true,
|
|
38
|
+
aztecProofSubmissionEpochs: 1024,
|
|
33
39
|
...disableStatusHandshake ? {
|
|
34
40
|
p2pDisableStatusHandshake: true
|
|
35
41
|
} : {},
|
|
@@ -66,7 +72,7 @@ export async function runReqrespTxTest(params) {
|
|
|
66
72
|
...t.ctx.aztecNodeConfig,
|
|
67
73
|
p2pDisableStatusHandshake: true
|
|
68
74
|
} : t.ctx.aztecNodeConfig;
|
|
69
|
-
const nodes = await createNodes(aztecNodeConfig, t.ctx.dateProvider, t.bootstrapNodeEnr, NUM_VALIDATORS, BOOT_NODE_UDP_PORT, t.
|
|
75
|
+
const nodes = await createNodes(aztecNodeConfig, t.ctx.dateProvider, t.bootstrapNodeEnr, NUM_VALIDATORS, BOOT_NODE_UDP_PORT, t.genesis, dataDir, shouldCollectMetrics());
|
|
70
76
|
t.logger.info('Waiting for nodes to connect');
|
|
71
77
|
await t.waitForP2PMeshConnectivity(nodes, NUM_VALIDATORS);
|
|
72
78
|
await t.setupAccount();
|
|
@@ -102,6 +108,11 @@ export async function runReqrespTxTest(params) {
|
|
|
102
108
|
t.logger.info('Sending transactions through proposer nodes');
|
|
103
109
|
const submittedTxs = await Promise.all(txBatches.map(async (batch, batchIndex)=>{
|
|
104
110
|
const proposerNode = nodes[proposerIndexes[batchIndex]];
|
|
111
|
+
for (const tx of batch){
|
|
112
|
+
t.logger.info(`Tx ${tx.getTxHash().toString()} base64: ${tx.toBuffer().toString('base64')}`);
|
|
113
|
+
}
|
|
114
|
+
const txHashes = batch.map((tx)=>tx.getTxHash().toString());
|
|
115
|
+
t.logger.info(`Sending batch ${batchIndex} to proposer ${getNodePort(proposerIndexes[batchIndex])}: ${txHashes.join(', ')}`);
|
|
105
116
|
await Promise.all(batch.map(async (tx)=>{
|
|
106
117
|
try {
|
|
107
118
|
await proposerNode.sendTx(tx);
|
|
@@ -115,6 +126,11 @@ export async function runReqrespTxTest(params) {
|
|
|
115
126
|
txHash: tx.getTxHash()
|
|
116
127
|
}));
|
|
117
128
|
}));
|
|
129
|
+
// Log pool state per node after sending
|
|
130
|
+
for(let i = 0; i < NUM_VALIDATORS; i++){
|
|
131
|
+
const count = await nodes[i].getPendingTxCount();
|
|
132
|
+
t.logger.info(`Node ${getNodePort(i)} pool has ${count} pending txs`);
|
|
133
|
+
}
|
|
118
134
|
t.logger.info('Waiting for all transactions to be mined');
|
|
119
135
|
await Promise.all(submittedTxs.flatMap((batch, batchIndex)=>batch.map(async (submittedTx, txIndex)=>{
|
|
120
136
|
t.logger.info(`Waiting for tx ${batchIndex}-${txIndex} ${submittedTx.txHash.toString()} to be mined`);
|
|
@@ -124,6 +140,27 @@ export async function runReqrespTxTest(params) {
|
|
|
124
140
|
t.logger.info(`Tx ${batchIndex}-${txIndex} ${submittedTx.txHash.toString()} has been mined`);
|
|
125
141
|
})));
|
|
126
142
|
t.logger.info('All transactions mined');
|
|
143
|
+
// Assert that multiple blocks were built for at least one slot
|
|
144
|
+
t.logger.info('Verifying multiple blocks for at least one checkpoint');
|
|
145
|
+
// Wait for L1 checkpoint sync, which may lag behind P2P block propagation.
|
|
146
|
+
const checkpoints = await retryUntil(async ()=>{
|
|
147
|
+
const cps = await nodes[0].getCheckpoints(CheckpointNumber(1), 50);
|
|
148
|
+
return cps.length > 0 && cps.some((cp)=>cp.checkpoint.blocks.length >= 2) ? cps : undefined;
|
|
149
|
+
}, 'waiting for multi-block checkpoint to sync from L1', 30, 1);
|
|
150
|
+
let mbpsFound = false;
|
|
151
|
+
let expectedBlockNumber = checkpoints[0].checkpoint.blocks[0].number;
|
|
152
|
+
for (const published of checkpoints){
|
|
153
|
+
const blockCount = published.checkpoint.blocks.length;
|
|
154
|
+
mbpsFound = mbpsFound || blockCount >= 2;
|
|
155
|
+
for(let i = 0; i < blockCount; i++){
|
|
156
|
+
const block = published.checkpoint.blocks[i];
|
|
157
|
+
expect(block.indexWithinCheckpoint).toBe(i);
|
|
158
|
+
expect(block.checkpointNumber).toBe(published.checkpoint.number);
|
|
159
|
+
expect(block.number).toBe(expectedBlockNumber);
|
|
160
|
+
expectedBlockNumber++;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
expect(mbpsFound).toBe(true);
|
|
127
164
|
return nodes;
|
|
128
165
|
}
|
|
129
166
|
async function getProposerIndexes(t, startSlotTimestamp) {
|
package/dest/e2e_p2p/shared.d.ts
CHANGED
|
@@ -4,21 +4,40 @@ import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
|
4
4
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
5
5
|
import { TxHash } from '@aztec/aztec.js/tx';
|
|
6
6
|
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
7
|
-
import type {
|
|
7
|
+
import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
8
|
+
import type { RollupContract, SlashingProposerContract } from '@aztec/ethereum/contracts';
|
|
9
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
10
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
8
11
|
import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
9
12
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
10
|
-
import type
|
|
11
|
-
import { type ProvenTx } from '@aztec/test-wallet/server';
|
|
13
|
+
import { type ProvenTx } from '../test-wallet/utils.js';
|
|
12
14
|
export declare const submitComplexTxsTo: (logger: Logger, from: AztecAddress, spamContract: SpamContract, numTxs: number, opts?: {
|
|
13
15
|
callPublic?: boolean | undefined;
|
|
14
16
|
}) => Promise<TxHash[]>;
|
|
15
17
|
export declare const submitTransactions: (logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData) => Promise<TxHash[]>;
|
|
16
18
|
export declare function prepareTransactions(logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData): Promise<ProvenTx[]>;
|
|
17
|
-
export declare function awaitProposalExecution(slashingProposer:
|
|
19
|
+
export declare function awaitProposalExecution(slashingProposer: SlashingProposerContract, timeoutSeconds: number, logger: Logger): Promise<bigint>;
|
|
18
20
|
export declare function awaitCommitteeExists({ rollup, logger }: {
|
|
19
21
|
rollup: RollupContract;
|
|
20
22
|
logger: Logger;
|
|
21
23
|
}): Promise<readonly `0x${string}`[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Advance epochs until we find one where the target proposer is selected for at least one slot,
|
|
26
|
+
* then stop one epoch before it. This leaves time for the caller to start sequencers before
|
|
27
|
+
* warping to the target epoch, avoiding the race where the target epoch passes before sequencers
|
|
28
|
+
* are ready.
|
|
29
|
+
*
|
|
30
|
+
* Returns the target epoch number so the caller can warp to it after starting sequencers.
|
|
31
|
+
*/
|
|
32
|
+
export declare function advanceToEpochBeforeProposer({ epochCache, cheatCodes, targetProposer, logger, maxAttempts }: {
|
|
33
|
+
epochCache: EpochCacheInterface;
|
|
34
|
+
cheatCodes: RollupCheatCodes;
|
|
35
|
+
targetProposer: EthAddress;
|
|
36
|
+
logger: Logger;
|
|
37
|
+
maxAttempts?: number;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
targetEpoch: EpochNumber;
|
|
40
|
+
}>;
|
|
22
41
|
export declare function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount, timeoutSeconds }: {
|
|
23
42
|
nodeAdmin: AztecNodeAdmin;
|
|
24
43
|
logger: Logger;
|
|
@@ -31,16 +50,15 @@ export declare function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundS
|
|
|
31
50
|
* Await the committee to be slashed out of the validator set.
|
|
32
51
|
* Currently assumes that the committee is the same size as the validator set.
|
|
33
52
|
*/
|
|
34
|
-
export declare function awaitCommitteeKicked({ rollup, cheatCodes, committee,
|
|
53
|
+
export declare function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashingProposer, slashingRoundSize, aztecSlotDuration, aztecEpochDuration, logger, offenseEpoch }: {
|
|
35
54
|
rollup: RollupContract;
|
|
36
55
|
cheatCodes: RollupCheatCodes;
|
|
37
56
|
committee: readonly `0x${string}`[];
|
|
38
|
-
|
|
39
|
-
slashingProposer: EmpireSlashingProposerContract | TallySlashingProposerContract | undefined;
|
|
57
|
+
slashingProposer: SlashingProposerContract | undefined;
|
|
40
58
|
slashingRoundSize: number;
|
|
41
59
|
aztecSlotDuration: number;
|
|
42
60
|
aztecEpochDuration: number;
|
|
43
61
|
logger: Logger;
|
|
44
62
|
offenseEpoch: number;
|
|
45
63
|
}): Promise<void>;
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZTJlX3AycC9zaGFyZWQud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M,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAC;IACpC,gBAAgB,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACvD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB,iBAuDA"}
|
package/dest/e2e_p2p/shared.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { NO_WAIT, getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
|
|
2
2
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
-
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
4
4
|
import { timesAsync, unique } from '@aztec/foundation/collection';
|
|
5
5
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
6
6
|
import { pluralize } from '@aztec/foundation/string';
|
|
7
7
|
import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
|
|
8
8
|
import { getPXEConfig, getPXEConfig as getRpcConfig } from '@aztec/pxe/server';
|
|
9
9
|
import { getRoundForOffense } from '@aztec/slasher';
|
|
10
|
-
import { TestWallet, proveInteraction } from '@aztec/test-wallet/server';
|
|
11
10
|
import { submitTxsTo } from '../shared/submit-transactions.js';
|
|
11
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
12
|
+
import { proveInteraction } from '../test-wallet/utils.js';
|
|
12
13
|
// submits a set of transactions to the provided Private eXecution Environment (PXE)
|
|
13
14
|
export const submitComplexTxsTo = async (logger, from, spamContract, numTxs, opts = {})=>{
|
|
14
15
|
const txs = [];
|
|
@@ -16,7 +17,7 @@ export const submitComplexTxsTo = async (logger, from, spamContract, numTxs, opt
|
|
|
16
17
|
const spamCount = 15;
|
|
17
18
|
for(let i = 0; i < numTxs; i++){
|
|
18
19
|
const method = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic);
|
|
19
|
-
const txHash = await method.send({
|
|
20
|
+
const { txHash } = await method.send({
|
|
20
21
|
from,
|
|
21
22
|
wait: NO_WAIT
|
|
22
23
|
});
|
|
@@ -67,24 +68,12 @@ export function awaitProposalExecution(slashingProposer, timeoutSeconds, logger)
|
|
|
67
68
|
logger.warn(`Timed out waiting for proposal execution`);
|
|
68
69
|
reject(new Error(`Timeout waiting for proposal execution after ${timeoutSeconds}s`));
|
|
69
70
|
}, timeoutSeconds * 1000);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
logger.warn(`Proposal ${args.payload} from round ${args.round} executed`);
|
|
73
|
-
clearTimeout(timeout);
|
|
74
|
-
unwatch();
|
|
75
|
-
resolve(args.round);
|
|
76
|
-
});
|
|
77
|
-
} else if (slashingProposer.type === 'tally') {
|
|
78
|
-
const unwatch = slashingProposer.listenToRoundExecuted((args)=>{
|
|
79
|
-
logger.warn(`Slash from round ${args.round} executed`);
|
|
80
|
-
clearTimeout(timeout);
|
|
81
|
-
unwatch();
|
|
82
|
-
resolve(args.round);
|
|
83
|
-
});
|
|
84
|
-
} else {
|
|
71
|
+
const unwatch = slashingProposer.listenToRoundExecuted((args)=>{
|
|
72
|
+
logger.warn(`Slash from round ${args.round} executed`);
|
|
85
73
|
clearTimeout(timeout);
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
unwatch();
|
|
75
|
+
resolve(args.round);
|
|
76
|
+
});
|
|
88
77
|
});
|
|
89
78
|
}
|
|
90
79
|
export async function awaitCommitteeExists({ rollup, logger }) {
|
|
@@ -99,6 +88,37 @@ export async function awaitCommitteeExists({ rollup, logger }) {
|
|
|
99
88
|
});
|
|
100
89
|
return committee.map((c)=>c.toString());
|
|
101
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Advance epochs until we find one where the target proposer is selected for at least one slot,
|
|
93
|
+
* then stop one epoch before it. This leaves time for the caller to start sequencers before
|
|
94
|
+
* warping to the target epoch, avoiding the race where the target epoch passes before sequencers
|
|
95
|
+
* are ready.
|
|
96
|
+
*
|
|
97
|
+
* Returns the target epoch number so the caller can warp to it after starting sequencers.
|
|
98
|
+
*/ export async function advanceToEpochBeforeProposer({ epochCache, cheatCodes, targetProposer, logger, maxAttempts = 20 }) {
|
|
99
|
+
const { epochDuration } = await cheatCodes.getConfig();
|
|
100
|
+
for(let attempt = 0; attempt < maxAttempts; attempt++){
|
|
101
|
+
const currentEpoch = await cheatCodes.getEpoch();
|
|
102
|
+
// Check the NEXT epoch's slots so we stay one epoch before the target,
|
|
103
|
+
// giving the caller time to start sequencers before the target epoch arrives.
|
|
104
|
+
const nextEpoch = Number(currentEpoch) + 1;
|
|
105
|
+
const startSlot = nextEpoch * Number(epochDuration);
|
|
106
|
+
const endSlot = startSlot + Number(epochDuration);
|
|
107
|
+
logger.info(`Checking next epoch ${nextEpoch} (slots ${startSlot}-${endSlot - 1}) for proposer ${targetProposer} (current epoch: ${currentEpoch})`);
|
|
108
|
+
for(let s = startSlot; s < endSlot; s++){
|
|
109
|
+
const proposer = await epochCache.getProposerAttesterAddressInSlot(SlotNumber(s));
|
|
110
|
+
if (proposer && proposer.equals(targetProposer)) {
|
|
111
|
+
logger.warn(`Found target proposer ${targetProposer} in slot ${s} of epoch ${nextEpoch}. Staying at epoch ${currentEpoch} to allow sequencer startup.`);
|
|
112
|
+
return {
|
|
113
|
+
targetEpoch: EpochNumber(nextEpoch)
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
logger.info(`Target proposer not found in epoch ${nextEpoch}, advancing to next epoch`);
|
|
118
|
+
await cheatCodes.advanceToNextEpoch();
|
|
119
|
+
}
|
|
120
|
+
throw new Error(`Target proposer ${targetProposer} not found in any slot after ${maxAttempts} epoch attempts`);
|
|
121
|
+
}
|
|
102
122
|
export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount, timeoutSeconds = 120 }) {
|
|
103
123
|
const targetOffenseCount = waitUntilOffenseCount ?? 1;
|
|
104
124
|
logger.warn(`Waiting for ${pluralize('offense', targetOffenseCount)} to be detected`);
|
|
@@ -119,35 +139,21 @@ export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSiz
|
|
|
119
139
|
/**
|
|
120
140
|
* Await the committee to be slashed out of the validator set.
|
|
121
141
|
* Currently assumes that the committee is the same size as the validator set.
|
|
122
|
-
*/ export async function awaitCommitteeKicked({ rollup, cheatCodes, committee,
|
|
142
|
+
*/ export async function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashingProposer, slashingRoundSize, aztecSlotDuration, aztecEpochDuration, logger, offenseEpoch }) {
|
|
123
143
|
if (!slashingProposer) {
|
|
124
144
|
throw new Error('No slashing proposer configured. Cannot test slashing.');
|
|
125
145
|
}
|
|
126
146
|
await cheatCodes.debugRollup();
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// The uniqueness check is needed since a validator may be slashed more than once on the same round (eg because they let two epochs be pruned)
|
|
138
|
-
expect(unique(slashPayloadEvents[0].slashes.map((slash)=>slash.validator.toString()))).toHaveLength(committee.length);
|
|
139
|
-
} else {
|
|
140
|
-
// Use the slash offset to ensure we are in the right epoch for tally
|
|
141
|
-
const slashOffsetInRounds = await slashingProposer.getSlashOffsetInRounds();
|
|
142
|
-
const slashingRoundSizeInEpochs = slashingRoundSize / aztecEpochDuration;
|
|
143
|
-
const slashingOffsetInEpochs = Number(slashOffsetInRounds) * slashingRoundSizeInEpochs;
|
|
144
|
-
const firstEpochInOffenseRound = offenseEpoch - offenseEpoch % slashingRoundSizeInEpochs;
|
|
145
|
-
const targetEpoch = firstEpochInOffenseRound + slashingOffsetInEpochs;
|
|
146
|
-
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
147
|
-
await cheatCodes.advanceToEpoch(EpochNumber(targetEpoch), {
|
|
148
|
-
offset: -aztecSlotDuration / 2
|
|
149
|
-
});
|
|
150
|
-
}
|
|
147
|
+
// Use the slash offset to ensure we are in the right epoch for tally
|
|
148
|
+
const slashOffsetInRounds = await slashingProposer.getSlashOffsetInRounds();
|
|
149
|
+
const slashingRoundSizeInEpochs = slashingRoundSize / aztecEpochDuration;
|
|
150
|
+
const slashingOffsetInEpochs = Number(slashOffsetInRounds) * slashingRoundSizeInEpochs;
|
|
151
|
+
const firstEpochInOffenseRound = offenseEpoch - offenseEpoch % slashingRoundSizeInEpochs;
|
|
152
|
+
const targetEpoch = firstEpochInOffenseRound + slashingOffsetInEpochs;
|
|
153
|
+
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
154
|
+
await cheatCodes.advanceToEpoch(EpochNumber(targetEpoch), {
|
|
155
|
+
offset: -aztecSlotDuration / 2
|
|
156
|
+
});
|
|
151
157
|
const attestersPre = await rollup.getAttesters();
|
|
152
158
|
expect(attestersPre.length).toBe(committee.length);
|
|
153
159
|
for (const attester of attestersPre){
|
|
@@ -2,10 +2,11 @@ import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
|
2
2
|
import { type Logger } from '@aztec/aztec.js/log';
|
|
3
3
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
4
4
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
5
|
+
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
5
6
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
6
|
-
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
7
7
|
import { type EndToEndContext } from '../fixtures/setup.js';
|
|
8
8
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
9
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
9
10
|
export declare class TokenContractTest {
|
|
10
11
|
static TOKEN_NAME: string;
|
|
11
12
|
static TOKEN_SYMBOL: string;
|
|
@@ -17,6 +18,7 @@ export declare class TokenContractTest {
|
|
|
17
18
|
tokenSim: TokenSimulator;
|
|
18
19
|
node: AztecNode;
|
|
19
20
|
badAccount: InvalidAccountContract;
|
|
21
|
+
authwitProxy: GenericProxyContract;
|
|
20
22
|
wallet: TestWallet;
|
|
21
23
|
adminAddress: AztecAddress;
|
|
22
24
|
account1Address: AztecAddress;
|
|
@@ -39,4 +41,4 @@ export declare class TokenContractTest {
|
|
|
39
41
|
teardown(): Promise<void>;
|
|
40
42
|
private applyMint;
|
|
41
43
|
}
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW5fY29udHJhY3RfdGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2UyZV90b2tlbl9jb250cmFjdC90b2tlbl9jb250cmFjdF90ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0scUJBQXFCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQy9ELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBSXRGLE9BQU8sRUFBRSxLQUFLLGVBQWUsRUFBeUQsTUFBTSxzQkFB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test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_token_contract/token_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAItF,OAAO,EAAE,KAAK,eAAe,EAAyD,MAAM,sBAAsB,CAAC;AAEnH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,UAAU,SAAU;IAC3B,MAAM,CAAC,YAAY,SAAS;IAC5B,MAAM,CAAC,cAAc,SAAO;IAC5B,OAAO,EAAG,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAG,aAAa,CAAC;IACtB,QAAQ,EAAG,cAAc,CAAC;IAC1B,IAAI,EAAG,SAAS,CAAC;IAEjB,UAAU,EAAG,sBAAsB,CAAC;IACpC,YAAY,EAAG,oBAAoB,CAAC;IACpC,MAAM,EAAG,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