@aztec/end-to-end 0.0.1-commit.2448fdb → 0.0.1-commit.2606882
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 +15 -1
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +17 -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 +25 -35
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +2 -0
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +3 -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 +13 -4
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +15 -4
- 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 +39 -7
- package/dest/e2e_deploy_contract/deploy_test.d.ts +3 -3
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +2 -1
- package/dest/e2e_epochs/epochs_test.d.ts +23 -2
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +83 -12
- package/dest/e2e_fees/fees_test.d.ts +5 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +31 -5
- 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 +2 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +3 -3
- package/dest/e2e_p2p/p2p_network.d.ts +11 -10
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +47 -28
- package/dest/e2e_p2p/reqresp/utils.d.ts +1 -1
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
- package/dest/e2e_p2p/reqresp/utils.js +42 -13
- package/dest/e2e_p2p/shared.d.ts +23 -26
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +62 -80
- package/dest/e2e_token_contract/token_contract_test.d.ts +3 -3
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +4 -2
- package/dest/fixtures/e2e_prover_test.d.ts +6 -5
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +9 -13
- 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 +70 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +65 -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 +2 -2
- package/dest/fixtures/ha_setup.d.ts.map +1 -1
- package/dest/fixtures/ha_setup.js +1 -1
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
- package/dest/fixtures/setup.d.ts +44 -10
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +145 -19
- package/dest/fixtures/setup_p2p_test.d.ts +10 -6
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +8 -8
- package/dest/fixtures/token_utils.d.ts +1 -1
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +2 -5
- 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/install_legacy_contracts.d.cts +1 -1
- package/dest/install_legacy_contracts.d.cts.map +1 -1
- package/dest/legacy-jest-resolver.d.cts +1 -1
- package/dest/legacy-jest-resolver.d.cts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +4 -2
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +9 -5
- package/dest/shared/gas_portal_test_harness.d.ts +8 -5
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +17 -8
- package/dest/shared/jest_setup.js +41 -1
- package/dest/shared/submit-transactions.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts.map +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 +50 -32
- package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
- package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
- package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
- package/dest/simulators/lending_simulator.d.ts +10 -3
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +23 -11
- package/dest/simulators/token_simulator.js +1 -1
- 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 +67 -43
- package/dest/spartan/tx_metrics.d.ts +18 -4
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +74 -21
- package/dest/spartan/utils/config.d.ts +10 -30
- 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 +2 -1
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +2 -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 +11 -11
- 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 +3 -2
- package/dest/test-wallet/test_wallet.d.ts.map +1 -1
- package/dest/test-wallet/test_wallet.js +52 -28
- package/dest/test-wallet/utils.d.ts +3 -3
- package/dest/test-wallet/utils.d.ts.map +1 -1
- package/dest/test-wallet/utils.js +2 -7
- package/dest/test-wallet/wallet_worker_script.js +7 -2
- package/dest/test-wallet/worker_wallet.d.ts +2 -1
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet.js +6 -2
- package/dest/test-wallet/worker_wallet_schema.d.ts +110 -224
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet_schema.js +14 -2
- package/package.json +48 -46
- package/src/bench/client_flows/benchmark.ts +19 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +62 -51
- package/src/bench/utils.ts +2 -1
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +21 -4
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +49 -11
- package/src/e2e_deploy_contract/deploy_test.ts +3 -2
- package/src/e2e_epochs/epochs_test.ts +85 -9
- package/src/e2e_fees/fees_test.ts +37 -4
- package/src/e2e_nested_contract/nested_contract_test.ts +3 -1
- package/src/e2e_p2p/inactivity_slash_test.ts +3 -3
- package/src/e2e_p2p/p2p_network.ts +58 -40
- package/src/e2e_p2p/reqresp/utils.ts +51 -12
- package/src/e2e_p2p/shared.ts +60 -113
- package/src/e2e_token_contract/token_contract_test.ts +12 -2
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +15 -18
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +83 -0
- package/src/fixtures/get_bb_config.ts +7 -6
- package/src/fixtures/ha_setup.ts +4 -2
- package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
- package/src/fixtures/setup.ts +175 -24
- package/src/fixtures/setup_p2p_test.ts +13 -9
- package/src/fixtures/token_utils.ts +1 -4
- package/src/fixtures/utils.ts +2 -0
- package/src/guides/up_quick_start.sh +0 -2
- package/src/install_legacy_contracts.cjs +9 -5
- package/src/legacy-jest-resolver.cjs +15 -4
- package/src/shared/cross_chain_test_harness.ts +14 -4
- package/src/shared/gas_portal_test_harness.ts +20 -10
- package/src/shared/jest_setup.ts +51 -1
- package/src/shared/submit-transactions.ts +1 -4
- package/src/shared/uniswap_l1_l2.ts +84 -40
- package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
- package/src/simulators/lending_simulator.ts +27 -13
- package/src/simulators/token_simulator.ts +1 -1
- package/src/spartan/setup_test_wallets.ts +65 -40
- package/src/spartan/tx_metrics.ts +82 -24
- package/src/spartan/utils/config.ts +2 -0
- package/src/spartan/utils/index.ts +3 -0
- package/src/spartan/utils/nodes.ts +17 -12
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/test-wallet/test_wallet.ts +49 -24
- package/src/test-wallet/utils.ts +3 -7
- package/src/test-wallet/wallet_worker_script.ts +5 -2
- package/src/test-wallet/worker_wallet.ts +7 -3
- package/src/test-wallet/worker_wallet_schema.ts +2 -2
package/dest/e2e_p2p/shared.js
CHANGED
|
@@ -7,6 +7,7 @@ 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 { SchnorrHardcodedKeyAccountContract } from '../fixtures/schnorr_hardcoded_account_contract.js';
|
|
10
11
|
import { submitTxsTo } from '../shared/submit-transactions.js';
|
|
11
12
|
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
12
13
|
import { proveInteraction } from '../test-wallet/utils.js';
|
|
@@ -30,13 +31,21 @@ export const submitComplexTxsTo = async (logger, from, spamContract, numTxs, opt
|
|
|
30
31
|
export const submitTransactions = async (logger, node, numTxs, fundedAccount)=>{
|
|
31
32
|
const rpcConfig = getRpcConfig();
|
|
32
33
|
rpcConfig.proverEnabled = false;
|
|
33
|
-
const wallet = await TestWallet.create(node,
|
|
34
|
+
const wallet = await TestWallet.create(node, // Use checkpointed chain tip to avoid anchoring on provisional blocks that the archiver can prune
|
|
35
|
+
// when their slot ends without a checkpoint landing on L1.
|
|
36
|
+
{
|
|
34
37
|
...getPXEConfig(),
|
|
35
|
-
proverEnabled: false
|
|
38
|
+
proverEnabled: false,
|
|
39
|
+
syncChainTip: 'checkpointed'
|
|
36
40
|
}, {
|
|
37
41
|
loggerActorLabel: 'pxe-tx'
|
|
38
42
|
});
|
|
39
|
-
const
|
|
43
|
+
const contract = new SchnorrHardcodedKeyAccountContract();
|
|
44
|
+
const fundedAccountManager = await wallet.createAccount({
|
|
45
|
+
secret: fundedAccount.secret,
|
|
46
|
+
salt: fundedAccount.salt,
|
|
47
|
+
contract
|
|
48
|
+
});
|
|
40
49
|
return submitTxsTo(wallet, fundedAccountManager.address, numTxs, logger);
|
|
41
50
|
};
|
|
42
51
|
export async function prepareTransactions(logger, node, numTxs, fundedAccount) {
|
|
@@ -44,11 +53,17 @@ export async function prepareTransactions(logger, node, numTxs, fundedAccount) {
|
|
|
44
53
|
rpcConfig.proverEnabled = false;
|
|
45
54
|
const wallet = await TestWallet.create(node, {
|
|
46
55
|
...getPXEConfig(),
|
|
47
|
-
proverEnabled: false
|
|
56
|
+
proverEnabled: false,
|
|
57
|
+
syncChainTip: 'checkpointed'
|
|
48
58
|
}, {
|
|
49
59
|
loggerActorLabel: 'pxe-tx'
|
|
50
60
|
});
|
|
51
|
-
const
|
|
61
|
+
const accountContract = new SchnorrHardcodedKeyAccountContract();
|
|
62
|
+
const fundedAccountManager = await wallet.createAccount({
|
|
63
|
+
secret: fundedAccount.secret,
|
|
64
|
+
salt: fundedAccount.salt,
|
|
65
|
+
contract: accountContract
|
|
66
|
+
});
|
|
52
67
|
const testContractInstance = await getContractInstanceFromInstantiationParams(TestContractArtifact, {
|
|
53
68
|
salt: Fr.random()
|
|
54
69
|
});
|
|
@@ -68,24 +83,12 @@ export function awaitProposalExecution(slashingProposer, timeoutSeconds, logger)
|
|
|
68
83
|
logger.warn(`Timed out waiting for proposal execution`);
|
|
69
84
|
reject(new Error(`Timeout waiting for proposal execution after ${timeoutSeconds}s`));
|
|
70
85
|
}, timeoutSeconds * 1000);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
logger.warn(`Proposal ${args.payload} from round ${args.round} executed`);
|
|
74
|
-
clearTimeout(timeout);
|
|
75
|
-
unwatch();
|
|
76
|
-
resolve(args.round);
|
|
77
|
-
});
|
|
78
|
-
} else if (slashingProposer.type === 'tally') {
|
|
79
|
-
const unwatch = slashingProposer.listenToRoundExecuted((args)=>{
|
|
80
|
-
logger.warn(`Slash from round ${args.round} executed`);
|
|
81
|
-
clearTimeout(timeout);
|
|
82
|
-
unwatch();
|
|
83
|
-
resolve(args.round);
|
|
84
|
-
});
|
|
85
|
-
} else {
|
|
86
|
+
const unwatch = slashingProposer.listenToRoundExecuted((args)=>{
|
|
87
|
+
logger.warn(`Slash from round ${args.round} executed`);
|
|
86
88
|
clearTimeout(timeout);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
unwatch();
|
|
90
|
+
resolve(args.round);
|
|
91
|
+
});
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
export async function awaitCommitteeExists({ rollup, logger }) {
|
|
@@ -101,28 +104,41 @@ export async function awaitCommitteeExists({ rollup, logger }) {
|
|
|
101
104
|
return committee.map((c)=>c.toString());
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
|
-
* Advance epochs until we find one where the target proposer is selected for at least
|
|
105
|
-
* then stop one epoch before it. This leaves time for the caller to
|
|
106
|
-
* warping to the target epoch, avoiding the race where the target epoch
|
|
107
|
-
* are ready.
|
|
107
|
+
* Advance epochs until we find one where the target proposer is selected for a slot at least
|
|
108
|
+
* `warmupSlots` into the epoch, then stop one epoch before it. This leaves time for the caller to
|
|
109
|
+
* start sequencers before warping to the target epoch, avoiding the race where the target epoch
|
|
110
|
+
* passes before sequencers are ready.
|
|
111
|
+
*
|
|
112
|
+
* The first `warmupSlots` slots of the epoch are skipped on purpose. Callers warp to one slot
|
|
113
|
+
* before the target epoch and, under proposer pipelining, the proposer begins building one slot
|
|
114
|
+
* before its proposal slot. If the proposer were in the first slot of the epoch, that build would
|
|
115
|
+
* begin at the exact instant of the warp, leaving the freshly-started sequencer no warm-up margin;
|
|
116
|
+
* it then serializes its (often AVM-heavy) proposal past the slot boundary and honest receivers
|
|
117
|
+
* reject it as late. Picking a slot at least `warmupSlots` into the epoch guarantees that many full
|
|
118
|
+
* slots of wall-clock between the warp and the start of the proposer's build.
|
|
108
119
|
*
|
|
109
|
-
* Returns the target epoch
|
|
110
|
-
|
|
120
|
+
* Returns the target epoch and the concrete target slot so the caller can warp to it after starting
|
|
121
|
+
* sequencers.
|
|
122
|
+
*/ export async function advanceToEpochBeforeProposer({ epochCache, cheatCodes, targetProposer, logger, maxAttempts = 20, warmupSlots = 1 }) {
|
|
111
123
|
const { epochDuration } = await cheatCodes.getConfig();
|
|
112
124
|
for(let attempt = 0; attempt < maxAttempts; attempt++){
|
|
113
125
|
const currentEpoch = await cheatCodes.getEpoch();
|
|
114
126
|
// Check the NEXT epoch's slots so we stay one epoch before the target,
|
|
115
127
|
// giving the caller time to start sequencers before the target epoch arrives.
|
|
116
128
|
const nextEpoch = Number(currentEpoch) + 1;
|
|
117
|
-
const
|
|
118
|
-
|
|
129
|
+
const epochStartSlot = nextEpoch * Number(epochDuration);
|
|
130
|
+
// Skip the first `warmupSlots` slots so the caller keeps a warm-up margin after warping to one
|
|
131
|
+
// slot before the epoch (see the doc comment above).
|
|
132
|
+
const startSlot = epochStartSlot + warmupSlots;
|
|
133
|
+
const endSlot = epochStartSlot + Number(epochDuration);
|
|
119
134
|
logger.info(`Checking next epoch ${nextEpoch} (slots ${startSlot}-${endSlot - 1}) for proposer ${targetProposer} (current epoch: ${currentEpoch})`);
|
|
120
135
|
for(let s = startSlot; s < endSlot; s++){
|
|
121
136
|
const proposer = await epochCache.getProposerAttesterAddressInSlot(SlotNumber(s));
|
|
122
137
|
if (proposer && proposer.equals(targetProposer)) {
|
|
123
138
|
logger.warn(`Found target proposer ${targetProposer} in slot ${s} of epoch ${nextEpoch}. Staying at epoch ${currentEpoch} to allow sequencer startup.`);
|
|
124
139
|
return {
|
|
125
|
-
targetEpoch: EpochNumber(nextEpoch)
|
|
140
|
+
targetEpoch: EpochNumber(nextEpoch),
|
|
141
|
+
targetSlot: SlotNumber(s)
|
|
126
142
|
};
|
|
127
143
|
}
|
|
128
144
|
}
|
|
@@ -131,29 +147,6 @@ export async function awaitCommitteeExists({ rollup, logger }) {
|
|
|
131
147
|
}
|
|
132
148
|
throw new Error(`Target proposer ${targetProposer} not found in any slot after ${maxAttempts} epoch attempts`);
|
|
133
149
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Advance epochs until we find one where the target proposer is selected for at least one slot.
|
|
136
|
-
* With N validators and M slots per epoch, a specific proposer may not be selected in any given epoch.
|
|
137
|
-
* For example, with 4 validators and 2 slots/epoch, there is about a 44% chance per epoch.
|
|
138
|
-
*/ export async function awaitEpochWithProposer({ epochCache, cheatCodes, targetProposer, logger, maxAttempts = 20 }) {
|
|
139
|
-
const { epochDuration } = await cheatCodes.getConfig();
|
|
140
|
-
for(let attempt = 0; attempt < maxAttempts; attempt++){
|
|
141
|
-
const currentEpoch = await cheatCodes.getEpoch();
|
|
142
|
-
const startSlot = Number(currentEpoch) * Number(epochDuration);
|
|
143
|
-
const endSlot = startSlot + Number(epochDuration);
|
|
144
|
-
logger.info(`Checking epoch ${currentEpoch} (slots ${startSlot}-${endSlot - 1}) for proposer ${targetProposer}`);
|
|
145
|
-
for(let s = startSlot; s < endSlot; s++){
|
|
146
|
-
const proposer = await epochCache.getProposerAttesterAddressInSlot(SlotNumber(s));
|
|
147
|
-
if (proposer && proposer.equals(targetProposer)) {
|
|
148
|
-
logger.warn(`Found target proposer ${targetProposer} in slot ${s} of epoch ${currentEpoch}`);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
logger.info(`Target proposer not found in epoch ${currentEpoch}, advancing to next epoch`);
|
|
153
|
-
await cheatCodes.advanceToNextEpoch();
|
|
154
|
-
}
|
|
155
|
-
throw new Error(`Target proposer ${targetProposer} not found in any slot after ${maxAttempts} epoch attempts`);
|
|
156
|
-
}
|
|
157
150
|
export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount, timeoutSeconds = 120 }) {
|
|
158
151
|
const targetOffenseCount = waitUntilOffenseCount ?? 1;
|
|
159
152
|
logger.warn(`Waiting for ${pluralize('offense', targetOffenseCount)} to be detected`);
|
|
@@ -174,42 +167,31 @@ export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSiz
|
|
|
174
167
|
/**
|
|
175
168
|
* Await the committee to be slashed out of the validator set.
|
|
176
169
|
* Currently assumes that the committee is the same size as the validator set.
|
|
177
|
-
*/ export async function awaitCommitteeKicked({ rollup, cheatCodes, committee,
|
|
170
|
+
*/ export async function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashingProposer, slashingRoundSize, aztecSlotDuration, aztecEpochDuration, logger, offenseEpoch }) {
|
|
178
171
|
if (!slashingProposer) {
|
|
179
172
|
throw new Error('No slashing proposer configured. Cannot test slashing.');
|
|
180
173
|
}
|
|
181
174
|
await cheatCodes.debugRollup();
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// 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)
|
|
193
|
-
expect(unique(slashPayloadEvents[0].slashes.map((slash)=>slash.validator.toString()))).toHaveLength(committee.length);
|
|
194
|
-
} else {
|
|
195
|
-
// Use the slash offset to ensure we are in the right epoch for tally
|
|
196
|
-
const slashOffsetInRounds = await slashingProposer.getSlashOffsetInRounds();
|
|
197
|
-
const slashingRoundSizeInEpochs = slashingRoundSize / aztecEpochDuration;
|
|
198
|
-
const slashingOffsetInEpochs = Number(slashOffsetInRounds) * slashingRoundSizeInEpochs;
|
|
199
|
-
const firstEpochInOffenseRound = offenseEpoch - offenseEpoch % slashingRoundSizeInEpochs;
|
|
200
|
-
const targetEpoch = firstEpochInOffenseRound + slashingOffsetInEpochs;
|
|
201
|
-
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
202
|
-
await cheatCodes.advanceToEpoch(EpochNumber(targetEpoch), {
|
|
203
|
-
offset: -aztecSlotDuration / 2
|
|
204
|
-
});
|
|
205
|
-
}
|
|
175
|
+
// Use the slash offset to ensure we are in the right epoch for tally
|
|
176
|
+
const slashOffsetInRounds = await slashingProposer.getSlashOffsetInRounds();
|
|
177
|
+
const slashingRoundSizeInEpochs = slashingRoundSize / aztecEpochDuration;
|
|
178
|
+
const slashingOffsetInEpochs = Number(slashOffsetInRounds) * slashingRoundSizeInEpochs;
|
|
179
|
+
const firstEpochInOffenseRound = offenseEpoch - offenseEpoch % slashingRoundSizeInEpochs;
|
|
180
|
+
const targetEpoch = firstEpochInOffenseRound + slashingOffsetInEpochs;
|
|
181
|
+
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
182
|
+
await cheatCodes.advanceToEpoch(EpochNumber(targetEpoch), {
|
|
183
|
+
offset: -aztecSlotDuration / 2
|
|
184
|
+
});
|
|
206
185
|
const attestersPre = await rollup.getAttesters();
|
|
207
186
|
expect(attestersPre.length).toBe(committee.length);
|
|
208
187
|
for (const attester of attestersPre){
|
|
209
188
|
const attesterInfo = await rollup.getAttesterView(attester);
|
|
210
189
|
expect(attesterInfo.status).toEqual(1); // Validating
|
|
211
190
|
}
|
|
212
|
-
|
|
191
|
+
// Allow up to four round-lengths so that under proposer pipelining, where individual rounds
|
|
192
|
+
// sometimes fail to gather quorum because parts of the committee miss votes due to chain-state
|
|
193
|
+
// races, we still see a later round execute the slash.
|
|
194
|
+
const timeout = slashingRoundSize * 4 * aztecSlotDuration + 30;
|
|
213
195
|
logger.info(`Waiting for slash to be executed (timeout ${timeout}s)`);
|
|
214
196
|
await awaitProposalExecution(slashingProposer, timeout, logger);
|
|
215
197
|
// The attesters should still form the committee but they should be reduced to the "living" status
|
|
@@ -4,7 +4,7 @@ import type { AztecNode } from '@aztec/aztec.js/node';
|
|
|
4
4
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
5
5
|
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
6
6
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
7
|
-
import { type EndToEndContext } from '../fixtures/setup.js';
|
|
7
|
+
import { type EndToEndContext, type SetupOptions } from '../fixtures/setup.js';
|
|
8
8
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
9
9
|
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
10
10
|
export declare class TokenContractTest {
|
|
@@ -37,8 +37,8 @@ export declare class TokenContractTest {
|
|
|
37
37
|
*/
|
|
38
38
|
applyMintSnapshot(): void;
|
|
39
39
|
private applyBaseSetup;
|
|
40
|
-
setup(): Promise<void>;
|
|
40
|
+
setup(opts?: Partial<SetupOptions>): Promise<void>;
|
|
41
41
|
teardown(): Promise<void>;
|
|
42
42
|
private applyMint;
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW5fY29udHJhY3RfdGVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2UyZV90b2tlbl9jb250cmFjdC90b2tlbl9jb250cmFjdF90ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0scUJBQXFCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQy9ELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBSXRGLE9BQU8sRUFDTCxLQUFLLGVBQWUsRUFDcEIsS0FBSyxZQUFZLEVBTWxCLE1BQU0sc0JBQXNCLENBQUM7QUFFOUIsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBSWhFLHFCQUFhLGlCQUFpQjtJQUM1QixNQUFNLENBQUMsVUFBVSxTQUFVO0lBQzNCLE1BQU0sQ0FBQyxZQUFZLFNBQVM7SUFDNUIsTUFBTSxDQUFDLGNBQWMsU0FBTztJQUM1QixPQUFPLEVBQUcsZUFBZSxDQUFDO0lBQzFCLE1BQU0sRUFBRSxNQUFNLENBQUM7SUFDZixXQUFXLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDckIsS0FBSyxFQUFHLGFBQWEsQ0FBQztJQUN0QixRQUFRLEVBQUcsY0FBYyxDQUFDO0lBQzFCLElBQUksRUFBRyxTQUFTLENBQUM7SUFFakIsVUFBVSxFQUFHLHNCQUFzQixDQUFDO0lBQ3BDLFlBQVksRUFBRyxvQkFBb0IsQ0FBQztJQUNwQyxNQUFNLEVBQUcsVUFBVSxDQUFDO0lBQ3BCLFlBQVksRUFBRyxZQUFZLENBQUM7SUFDNUIsZUFBZSxFQUFHLFlBQVksQ0FBQztJQUMvQixlQUFlLEVBQUcsWUFBWSxDQUFDO0lBRS9CLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBUztJQUNyQyxPQUFPLENBQUMsZUFBZSxDQUFTO0lBRWhDLFlBQVksUUFBUSxFQUFFLE1BQU0sRUFHM0I7SUFFRDs7O09BR0c7SUFDSCxrQkFBa0IsU0FFakI7SUFFRDs7O09BR0c7SUFDSCxpQkFBaUIsU0FFaEI7WUFLYSxjQUFjO0lBeUR0QixLQUFLLENBQUMsSUFBSSxHQUFFLE9BQU8sQ0FBQyxZQUFZLENBQU0saUJBZTNDO0lBRUssUUFBUSxrQkFFYjtZQUVhLFNBQVM7Q0ErQnhCIn0=
|
|
@@ -1 +1 @@
|
|
|
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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AQ,EAAE,MAAM,EAG3B;IAED;;;OAGG;IACH,kBAAkB,SAEjB;IAED;;;OAGG;IACH,iBAAiB,SAEhB;YAKa,cAAc;IAyDtB,KAAK,CAAC,IAAI,GAAE,OAAO,CAAC,YAAY,CAAM,iBAe3C;IAEK,QAAQ,kBAEb;YAEa,SAAS;CA+BxB"}
|
|
@@ -3,7 +3,7 @@ import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
|
3
3
|
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
4
4
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
5
5
|
import { jest } from '@jest/globals';
|
|
6
|
-
import { deployAccounts, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
6
|
+
import { deployAccounts, ensureAuthRegistryPublished, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
7
7
|
import { mintTokensToPrivate } from '../fixtures/token_utils.js';
|
|
8
8
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
9
9
|
const { METRICS_PORT: metricsPort } = process.env;
|
|
@@ -55,6 +55,7 @@ export class TokenContractTest {
|
|
|
55
55
|
this.wallet = this.context.wallet;
|
|
56
56
|
[this.adminAddress, this.account1Address, this.account2Address] = deployedAccounts.map((acc)=>acc.address);
|
|
57
57
|
this.logger.info('Applying base setup - deploying token contract');
|
|
58
|
+
await ensureAuthRegistryPublished(this.wallet, this.adminAddress);
|
|
58
59
|
this.logger.verbose(`Public deploy accounts...`);
|
|
59
60
|
await publicDeployAccounts(this.wallet, [
|
|
60
61
|
this.adminAddress,
|
|
@@ -86,8 +87,9 @@ export class TokenContractTest {
|
|
|
86
87
|
from: this.adminAddress
|
|
87
88
|
})).result).toBe(this.adminAddress.toBigInt());
|
|
88
89
|
}
|
|
89
|
-
async setup() {
|
|
90
|
+
async setup(opts = {}) {
|
|
90
91
|
this.context = await setup(0, {
|
|
92
|
+
...opts,
|
|
91
93
|
metricsPort: this.metricsPort,
|
|
92
94
|
fundSponsoredFPC: true,
|
|
93
95
|
skipAccountDeployment: true
|
|
@@ -3,14 +3,14 @@ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
|
3
3
|
import { type Logger } from '@aztec/aztec.js/log';
|
|
4
4
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
5
5
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
6
|
-
import {
|
|
6
|
+
import type { ClientProtocolCircuitVerifier } from '@aztec/bb-prover';
|
|
7
7
|
import type { DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
8
8
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
9
9
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
10
10
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
11
11
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
12
12
|
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
13
|
-
import { type EndToEndContext } from './setup.js';
|
|
13
|
+
import { type EndToEndContext, type SetupOptions } from './setup.js';
|
|
14
14
|
/**
|
|
15
15
|
* Largely taken from the e2e_token_contract test file. We deploy 2 accounts and a token contract.
|
|
16
16
|
* However, we then setup a second PXE with a full prover instance.
|
|
@@ -35,7 +35,8 @@ export declare class FullProverTest {
|
|
|
35
35
|
private provenComponents;
|
|
36
36
|
private bbConfigCleanup?;
|
|
37
37
|
private acvmConfigCleanup?;
|
|
38
|
-
|
|
38
|
+
/** Returns the proof verifier from the prover node (for test assertions). */
|
|
39
|
+
get circuitProofVerifier(): ClientProtocolCircuitVerifier | undefined;
|
|
39
40
|
provenAsset: TokenContract;
|
|
40
41
|
context: EndToEndContext;
|
|
41
42
|
private proverAztecNode;
|
|
@@ -47,9 +48,9 @@ export declare class FullProverTest {
|
|
|
47
48
|
private realProofs;
|
|
48
49
|
constructor(testName: string, minNumberOfTxsPerBlock: number, coinbase: EthAddress, realProofs?: boolean);
|
|
49
50
|
private applyBaseSetup;
|
|
50
|
-
setup(): Promise<this>;
|
|
51
|
+
setup(opts?: Partial<SetupOptions>): Promise<this>;
|
|
51
52
|
private mintFeeJuice;
|
|
52
53
|
teardown(): Promise<void>;
|
|
53
54
|
private applyMint;
|
|
54
55
|
}
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZTJlX3Byb3Zlcl90ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZml4dHVyZXMvZTJlX3Byb3Zlcl90ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFbEUsT0FBTyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0scUJBQXFCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDdEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sS0FBSyxFQUFFLDZCQUE2QixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFdEUsT0FBTyxLQUFLLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQztBQUlsRyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUMxRSxPQUFPLEtBQUssRUFBRSxjQUFjLEVBQUUsTUFBTSxpQ0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sT0FBTyxDQUFDLGVBQWUsQ0FBb0I7SUFDM0MsT0FBTyxDQUFDLHdCQUF3QixDQUFvQjtJQUM3QyxXQUFXLEVBQUcsZ0NBQWdDLENBQUM7SUFDL0MsYUFBYSxFQUFHLFVBQVUsQ0FBQztJQUNsQyxPQUFPLENBQUMsc0JBQXNCLENBQVM7SUFDdkMsT0FBTyxDQUFDLFFBQVEsQ0FBYTtJQUM3QixPQUFPLENBQUMsVUFBVSxDQUFVO0lBRTVCLFlBQVksUUFBUSxFQUFFLE1BQU0sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRSxVQUFVLFVBQU8sRUFLcEc7WUFLYSxjQUFjO0lBcUN0QixLQUFLLENBQUMsSUFBSSxHQUFFLE9BQU8sQ0FBQyxZQUFZLENBQU0saUJBd0kzQztZQUVhLFlBQVk7SUFTcEIsUUFBUSxrQkFjYjtZQUVhLFNBQVM7Q0FzQ3hCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/e2e_prover_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/e2e_prover_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,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CAAC,CAAsB;IAChD,6EAA6E;IAC7E,IAAI,oBAAoB,IAAI,6BAA6B,GAAG,SAAS,CAEpE;IACD,WAAW,EAAG,aAAa,CAAC;IAC5B,OAAO,EAAG,eAAe,CAAC;IAC1B,OAAO,CAAC,eAAe,CAAoB;IAC3C,OAAO,CAAC,wBAAwB,CAAoB;IAC7C,WAAW,EAAG,gCAAgC,CAAC;IAC/C,aAAa,EAAG,UAAU,CAAC;IAClC,OAAO,CAAC,sBAAsB,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,UAAU,CAAU;IAE5B,YAAY,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,UAAO,EAKpG;YAKa,cAAc;IAqCtB,KAAK,CAAC,IAAI,GAAE,OAAO,CAAC,YAAY,CAAM,iBAwI3C;YAEa,YAAY;IASpB,QAAQ,kBAcb;YAEa,SAAS;CAsCxB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
3
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
4
|
-
import { BBCircuitVerifier, QueuedIVCVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
5
4
|
import { BackendType, Barretenberg } from '@aztec/bb.js';
|
|
6
5
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
7
6
|
import { SecretValue } from '@aztec/foundation/config';
|
|
@@ -37,7 +36,9 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
37
36
|
provenComponents = [];
|
|
38
37
|
bbConfigCleanup;
|
|
39
38
|
acvmConfigCleanup;
|
|
40
|
-
circuitProofVerifier
|
|
39
|
+
/** Returns the proof verifier from the prover node (for test assertions). */ get circuitProofVerifier() {
|
|
40
|
+
return this.proverAztecNode?.getProofVerifier();
|
|
41
|
+
}
|
|
41
42
|
provenAsset;
|
|
42
43
|
context;
|
|
43
44
|
proverAztecNode;
|
|
@@ -67,11 +68,8 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
67
68
|
this.logger.info('Applying base setup: publicly deploying accounts');
|
|
68
69
|
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
69
70
|
this.logger.info('Applying base setup: deploying token contract');
|
|
70
|
-
const {
|
|
71
|
-
from: this.accounts[0]
|
|
72
|
-
wait: {
|
|
73
|
-
returnReceipt: true
|
|
74
|
-
}
|
|
71
|
+
const { contract: asset, instance } = await TokenContract.deploy(this.wallet, this.accounts[0], FullProverTest.TOKEN_NAME, FullProverTest.TOKEN_SYMBOL, FullProverTest.TOKEN_DECIMALS).send({
|
|
72
|
+
from: this.accounts[0]
|
|
75
73
|
});
|
|
76
74
|
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
77
75
|
this.fakeProofsAsset = asset;
|
|
@@ -82,9 +80,10 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
82
80
|
from: this.accounts[0]
|
|
83
81
|
})).result).toBe(this.accounts[0].toBigInt());
|
|
84
82
|
}
|
|
85
|
-
async setup() {
|
|
83
|
+
async setup(opts = {}) {
|
|
86
84
|
this.logger.info('Setting up subsystems from fresh');
|
|
87
85
|
this.context = await setup(0, {
|
|
86
|
+
...opts,
|
|
88
87
|
startProverNode: true,
|
|
89
88
|
coinbase: this.coinbase,
|
|
90
89
|
fundSponsoredFPC: true,
|
|
@@ -120,8 +119,6 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
120
119
|
await Barretenberg.initSingleton({
|
|
121
120
|
backend: BackendType.NativeUnixSocket
|
|
122
121
|
});
|
|
123
|
-
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
124
|
-
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
125
122
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
126
123
|
await this.aztecNodeAdmin.setConfig({
|
|
127
124
|
realProofs: true,
|
|
@@ -129,7 +126,6 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
129
126
|
});
|
|
130
127
|
} else {
|
|
131
128
|
this.logger.debug(`Configuring the node min txs per block ${this.minNumberOfTxsPerBlock}...`);
|
|
132
|
-
this.circuitProofVerifier = new TestCircuitVerifier();
|
|
133
129
|
await this.aztecNodeAdmin.setConfig({
|
|
134
130
|
minTxsPerBlock: this.minNumberOfTxsPerBlock
|
|
135
131
|
});
|
|
@@ -168,7 +164,7 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
168
164
|
await this.mintFeeJuice(proverNodeSenderAddress);
|
|
169
165
|
this.logger.verbose('Starting prover node');
|
|
170
166
|
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
171
|
-
const {
|
|
167
|
+
const { genesis } = await getGenesisValues(this.context.initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress), undefined, undefined, this.context.genesis.genesisTimestamp);
|
|
172
168
|
const proverNodeConfig = {
|
|
173
169
|
...config,
|
|
174
170
|
enableProverNode: true,
|
|
@@ -200,7 +196,7 @@ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicD
|
|
|
200
196
|
]
|
|
201
197
|
}
|
|
202
198
|
}, {
|
|
203
|
-
|
|
199
|
+
genesis
|
|
204
200
|
});
|
|
205
201
|
this.logger.warn(`Proofs are now enabled`, {
|
|
206
202
|
realProofs: this.realProofs
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Samples event-loop utilization, delay histogram, and heap usage per test, writing columnar text to a file. */
|
|
2
|
+
export declare class EluMonitor {
|
|
3
|
+
private filePath;
|
|
4
|
+
private intervalMs;
|
|
5
|
+
private timer;
|
|
6
|
+
private lastELU;
|
|
7
|
+
private histogram;
|
|
8
|
+
private testName;
|
|
9
|
+
private testStart;
|
|
10
|
+
private eluSamples;
|
|
11
|
+
constructor(filePath: string, intervalMs?: number);
|
|
12
|
+
/** Begin sampling for a test. Writes a header line and starts the periodic sampler. */
|
|
13
|
+
startTest(testName: string): void;
|
|
14
|
+
/** Stop sampling and write a summary line. */
|
|
15
|
+
stopTest(): void;
|
|
16
|
+
/** Alias for stopTest — call on process exit to flush any remaining data. */
|
|
17
|
+
stop(): void;
|
|
18
|
+
private sample;
|
|
19
|
+
private writeSummary;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWx1X21vbml0b3IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9lbHVfbW9uaXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxpSEFBaUg7QUFDakgscUJBQWEsVUFBVTtJQUNyQixPQUFPLENBQUMsUUFBUSxDQUFTO0lBQ3pCLE9BQU8sQ0FBQyxVQUFVLENBQVM7SUFDM0IsT0FBTyxDQUFDLEtBQUssQ0FBNkM7SUFDMUQsT0FBTyxDQUFDLE9BQU8sQ0FBbUM7SUFDbEQsT0FBTyxDQUFDLFNBQVMsQ0FBb0I7SUFDckMsT0FBTyxDQUFDLFFBQVEsQ0FBcUI7SUFDckMsT0FBTyxDQUFDLFNBQVMsQ0FBcUI7SUFDdEMsT0FBTyxDQUFDLFVBQVUsQ0FBZ0I7SUFFbEMsWUFBWSxRQUFRLEVBQUUsTUFBTSxFQUFFLFVBQVUsQ0FBQyxFQUFFLE1BQU0sRUFJaEQ7SUFFRCx1RkFBdUY7SUFDdkYsU0FBUyxDQUFDLFFBQVEsRUFBRSxNQUFNLEdBQUcsSUFBSSxDQW1CaEM7SUFFRCw4Q0FBOEM7SUFDOUMsUUFBUSxJQUFJLElBQUksQ0FtQmY7SUFFRCwrRUFBNkU7SUFDN0UsSUFBSSxJQUFJLElBQUksQ0FFWDtJQUVELE9BQU8sQ0FBQyxNQUFNO0lBOEJkLE9BQU8sQ0FBQyxZQUFZO0NBbUJyQiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elu_monitor.d.ts","sourceRoot":"","sources":["../../src/fixtures/elu_monitor.ts"],"names":[],"mappings":"AAKA,iHAAiH;AACjH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,KAAK,CAA6C;IAC1D,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,UAAU,CAAgB;IAElC,YAAY,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAIhD;IAED,uFAAuF;IACvF,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAmBhC;IAED,8CAA8C;IAC9C,QAAQ,IAAI,IAAI,CAmBf;IAED,+EAA6E;IAC7E,IAAI,IAAI,IAAI,CAEX;IAED,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,YAAY;CAmBrB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { appendFileSync } from 'node:fs';
|
|
2
|
+
import { monitorEventLoopDelay, performance } from 'node:perf_hooks';
|
|
3
|
+
const NANOS_PER_MS = 1_000_000;
|
|
4
|
+
/** Samples event-loop utilization, delay histogram, and heap usage per test, writing columnar text to a file. */ export class EluMonitor {
|
|
5
|
+
filePath;
|
|
6
|
+
intervalMs;
|
|
7
|
+
timer;
|
|
8
|
+
lastELU;
|
|
9
|
+
histogram;
|
|
10
|
+
testName;
|
|
11
|
+
testStart;
|
|
12
|
+
eluSamples = [];
|
|
13
|
+
constructor(filePath, intervalMs){
|
|
14
|
+
this.filePath = filePath;
|
|
15
|
+
this.intervalMs = intervalMs ?? 2000;
|
|
16
|
+
this.histogram = monitorEventLoopDelay({
|
|
17
|
+
resolution: 20
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Begin sampling for a test. Writes a header line and starts the periodic sampler. */ startTest(testName) {
|
|
21
|
+
this.stopTest();
|
|
22
|
+
this.testName = testName;
|
|
23
|
+
this.testStart = performance.now();
|
|
24
|
+
this.eluSamples = [];
|
|
25
|
+
appendFileSync(this.filePath, `\n=== Test: ${testName} ===\n`);
|
|
26
|
+
appendFileSync(this.filePath, padColumns('TIME', 'ELU', 'EL_DLY_P50', 'EL_DLY_P99', 'EL_DLY_MAX', 'HEAP_MB') + '\n');
|
|
27
|
+
this.lastELU = performance.eventLoopUtilization();
|
|
28
|
+
this.histogram.enable();
|
|
29
|
+
this.timer = setInterval(()=>this.sample(), this.intervalMs);
|
|
30
|
+
// Allow the process to exit even if the timer is still running.
|
|
31
|
+
this.timer.unref();
|
|
32
|
+
}
|
|
33
|
+
/** Stop sampling and write a summary line. */ stopTest() {
|
|
34
|
+
if (!this.timer) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Take a final sample before stopping.
|
|
38
|
+
this.sample();
|
|
39
|
+
clearInterval(this.timer);
|
|
40
|
+
this.timer = undefined;
|
|
41
|
+
this.histogram.disable();
|
|
42
|
+
this.histogram.reset();
|
|
43
|
+
this.writeSummary();
|
|
44
|
+
this.lastELU = undefined;
|
|
45
|
+
this.testName = undefined;
|
|
46
|
+
this.testStart = undefined;
|
|
47
|
+
this.eluSamples = [];
|
|
48
|
+
}
|
|
49
|
+
/** Alias for stopTest — call on process exit to flush any remaining data. */ stop() {
|
|
50
|
+
this.stopTest();
|
|
51
|
+
}
|
|
52
|
+
sample() {
|
|
53
|
+
const newELU = performance.eventLoopUtilization();
|
|
54
|
+
const delta = performance.eventLoopUtilization(newELU, this.lastELU);
|
|
55
|
+
this.lastELU = newELU;
|
|
56
|
+
const elu = delta.utilization;
|
|
57
|
+
this.eluSamples.push(elu);
|
|
58
|
+
const p50 = this.histogram.percentile(50) / NANOS_PER_MS;
|
|
59
|
+
const p99 = this.histogram.percentile(99) / NANOS_PER_MS;
|
|
60
|
+
const max = this.histogram.max / NANOS_PER_MS;
|
|
61
|
+
const heapMb = Math.round(process.memoryUsage().heapUsed / (1024 * 1024));
|
|
62
|
+
const now = new Date();
|
|
63
|
+
const time = [
|
|
64
|
+
now.getHours(),
|
|
65
|
+
now.getMinutes(),
|
|
66
|
+
now.getSeconds()
|
|
67
|
+
].map((n)=>String(n).padStart(2, '0')).join(':');
|
|
68
|
+
const line = padColumns(time, elu.toFixed(2), `${p50.toFixed(1)}ms`, `${p99.toFixed(1)}ms`, `${max.toFixed(1)}ms`, String(heapMb));
|
|
69
|
+
appendFileSync(this.filePath, line + '\n');
|
|
70
|
+
// Reset histogram so next sample only reflects the new interval.
|
|
71
|
+
this.histogram.reset();
|
|
72
|
+
}
|
|
73
|
+
writeSummary() {
|
|
74
|
+
if (this.eluSamples.length === 0 || this.testStart === undefined) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const mean = this.eluSamples.reduce((a, b)=>a + b, 0) / this.eluSamples.length;
|
|
78
|
+
const maxElu = Math.max(...this.eluSamples);
|
|
79
|
+
const sorted = [
|
|
80
|
+
...this.eluSamples
|
|
81
|
+
].sort((a, b)=>a - b);
|
|
82
|
+
const p90Elu = sorted[Math.floor(sorted.length * 0.9)] ?? maxElu;
|
|
83
|
+
const durationS = ((performance.now() - this.testStart) / 1000).toFixed(1);
|
|
84
|
+
let summary = `--- Summary: mean_elu=${mean.toFixed(2)} max_elu=${maxElu.toFixed(2)} p90_elu=${p90Elu.toFixed(2)} duration=${durationS}s`;
|
|
85
|
+
if (maxElu > 0.85) {
|
|
86
|
+
summary += ' WARNING:ELU>0.85';
|
|
87
|
+
}
|
|
88
|
+
summary += ' ---\n';
|
|
89
|
+
appendFileSync(this.filePath, summary);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function padColumns(...cols) {
|
|
93
|
+
const widths = [
|
|
94
|
+
11,
|
|
95
|
+
7,
|
|
96
|
+
12,
|
|
97
|
+
12,
|
|
98
|
+
12,
|
|
99
|
+
8
|
|
100
|
+
];
|
|
101
|
+
return cols.map((col, i)=>col.padEnd(widths[i] ?? 10)).join('');
|
|
102
|
+
}
|
|
@@ -1,4 +1,73 @@
|
|
|
1
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
2
|
+
import type { GasFees } from '@aztec/stdlib/gas';
|
|
1
3
|
export declare const METRICS_PORT = 4318;
|
|
4
|
+
/** Default fee padding applied to predicted min fees in e2e tests. */
|
|
5
|
+
export declare const DEFAULT_MIN_FEE_PADDING = 5;
|
|
6
|
+
/**
|
|
7
|
+
* Large fee padding for txs that may be mined significantly later than when they were created,
|
|
8
|
+
* such as cloned txs in throughput/capacity benchmarks, where fees may spike between creation and mining.
|
|
9
|
+
*/
|
|
10
|
+
export declare const LARGE_MIN_FEE_PADDING = 15;
|
|
11
|
+
/**
|
|
12
|
+
* Fee padding used by tests running under proposer pipelining. Under pipelining the fee-asset
|
|
13
|
+
* price modifier evolves faster across the build/publish gap, so client-set maxFeesPerGas (sized
|
|
14
|
+
* for the default 5x padding) was getting bumped past by the time the tx mined a few slots later.
|
|
15
|
+
* Observed worst case in CI: fee evolved ~20x between PXE snapshot and inclusion, exceeding even
|
|
16
|
+
* LARGE_MIN_FEE_PADDING (15x).
|
|
17
|
+
*/
|
|
18
|
+
export declare const PIPELINED_FEE_PADDING = 30;
|
|
19
|
+
/**
|
|
20
|
+
* Setup option preset that opts a test into proposer pipelining. Use with `setup()`:
|
|
21
|
+
*
|
|
22
|
+
* await setup(N, { ...PIPELINING_SETUP_OPTS, ...otherOpts });
|
|
23
|
+
*
|
|
24
|
+
* The preset sets:
|
|
25
|
+
* - `inboxLag: 2` so the sequencer sources L1->L2 messages from checkpoint N-1 (already sealed),
|
|
26
|
+
* avoiding `L1ToL2MessagesNotReadyError` when building for slot N during slot N-1.
|
|
27
|
+
* - `minTxsPerBlock: 0` so empty checkpoints land even when a tx arrives late in the build window
|
|
28
|
+
* (otherwise the chain stalls on alternating slots).
|
|
29
|
+
* - `aztecSlotDuration: 12` / `ethereumSlotDuration: 4` so the pipelined cycle fits inside the
|
|
30
|
+
* default 300s Jest hook budget. Tests that depend on the env-default 72s/12s should override.
|
|
31
|
+
* - `walletMinFeePadding: PIPELINED_FEE_PADDING` (30x) to absorb the wider fee evolution window.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PIPELINING_SETUP_OPTS: {
|
|
34
|
+
readonly inboxLag: 2;
|
|
35
|
+
readonly minTxsPerBlock: 0;
|
|
36
|
+
readonly aztecSlotDuration: 12;
|
|
37
|
+
readonly ethereumSlotDuration: 4;
|
|
38
|
+
readonly walletMinFeePadding: 30;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Setup option preset that opts a test into the deterministic AutomineSequencer path.
|
|
42
|
+
* Use only for single-sequencer tests that don't exercise block-building or consensus
|
|
43
|
+
* (e.g. e2e_token, e2e_amm, e2e_authwit). Not compatible with `e2e_p2p/*`,
|
|
44
|
+
* `e2e_epochs/*`, `e2e_slashing/*`, `e2e_block_building`, or any multi-validator suite.
|
|
45
|
+
*
|
|
46
|
+
* await setup(N, { ...AUTOMINE_E2E_OPTS, ...otherOpts });
|
|
47
|
+
*
|
|
48
|
+
* The preset:
|
|
49
|
+
* - Swaps the production Sequencer for an AutomineSequencer that builds one block per
|
|
50
|
+
* submitted tx, publishes synchronously to L1, and owns all time control through a
|
|
51
|
+
* serial queue (see `sequencer-client/src/sequencer/automine/automine_sequencer.ts`).
|
|
52
|
+
* - Disables the validator client and AnvilTestWatcher (the AutomineSequencer needs
|
|
53
|
+
* neither).
|
|
54
|
+
* - Uses `inboxLag: 1` (synchronous) since the AutomineSequencer publishes one block per tx.
|
|
55
|
+
* - Switches anvil into automine mode at setup time (no interval mining); each L1 tx
|
|
56
|
+
* mines an L1 block immediately.
|
|
57
|
+
*
|
|
58
|
+
* Requires `aztecTargetCommitteeSize: 0`, which is the e2e default at `setup.ts:317`.
|
|
59
|
+
*/
|
|
60
|
+
export declare const AUTOMINE_E2E_OPTS: {
|
|
61
|
+
readonly useAutomineSequencer: true;
|
|
62
|
+
readonly disableAnvilTestWatcher: true;
|
|
63
|
+
readonly inboxLag: 1;
|
|
64
|
+
readonly minTxsPerBlock: 0;
|
|
65
|
+
readonly aztecSlotDuration: 12;
|
|
66
|
+
readonly ethereumSlotDuration: 4;
|
|
67
|
+
readonly walletMinFeePadding: 30;
|
|
68
|
+
};
|
|
69
|
+
/** Returns worst-case predicted min fees with padding applied, mirroring the BaseWallet pattern. */
|
|
70
|
+
export declare function getPaddedMaxFeesPerGas(node: AztecNode, padding?: number): Promise<GasFees>;
|
|
2
71
|
export declare const shouldCollectMetrics: () => 4318 | undefined;
|
|
3
72
|
/** Returns the boot node UDP port from environment variable or default value. */
|
|
4
73
|
export declare function getBootNodeUdpPort(): number;
|
|
@@ -16,4 +85,4 @@ export declare const DUPLICATE_NULLIFIER_ERROR: RegExp;
|
|
|
16
85
|
export declare const NO_L1_TO_L2_MSG_ERROR: RegExp;
|
|
17
86
|
export declare const STATIC_CALL_STATE_MODIFICATION_ERROR: RegExp;
|
|
18
87
|
export declare const STATIC_CONTEXT_ASSERTION_ERROR: RegExp;
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4dHVyZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RCxPQUFPLEtBQUssRUFBRSxP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