perf(e2e): parallelize setup & p2p work, lighten throwaway txs#24448
Open
spalladino wants to merge 4 commits into
Open
perf(e2e): parallelize setup & p2p work, lighten throwaway txs#24448spalladino wants to merge 4 commits into
spalladino wants to merge 4 commits into
Conversation
The telemetry client, shared blob storage, and ACVM/BB config resolution in setupInner run after the L1 deploy and write disjoint config keys, so they no longer depend on each other's ordering. Run them concurrently with a single Promise.all instead of four sequential awaits, shaving startup latency off every e2e setup.
submitTransactions builds its own TestWallet/PXE per call, so per-node submissions are independent. The gossip_network, preferred_gossip_network, and rediscovery suites submitted to each node in a serial for-loop; switch to Promise.all over the node list. Promise.all preserves input order, so txsSentViaDifferentNodes[i] stays aligned with nodes[i] and all downstream index-based access is unchanged. gossip_network_no_cheat is intentionally left serial since it exercises real validator addition.
fetchFeeData issues 5 rollup reads on every new L1 block to populate L2 fee/oracle fields. Add a ChainMonitorOptions.includeFeeData flag (default true, preserving current behavior); when false, the monitor skips fetchFeeData and the l2-fees emission entirely. No caller's default is changed, so this ships the opt-out with zero behavior change; realizing the saving by disabling it on non-fee suites is a follow-up.
submitTxsTo deployed a full Schnorr account (class + instance publication + private initializer) for every throwaway tx, when its callers only need txs that get mined/gossiped/attested. Register a single TestContract instance per wallet and send emit_nullifier (#[noinitcheck], so it runs on a register-only instance) instead. Same tx count, much lighter per-tx proving and DA, across the P2P and slashing throwaway-tx paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Round of low-risk e2e test-suite speedups that touch only test fixtures and test-support code (no production behavior change).
Approach
setupInner— they write disjoint config keys, soPromise.allis safe.submitTransactionsloops in the gossip / preferred-gossip / rediscovery P2P tests (Promise.allpreserves index order;gossip_network_no_cheatdeliberately left serial).submitTxsTowith register-onlyTestContract.emit_nullifierthrowaway txs (#[noinitcheck], so no on-chain deploy) — same tx count, much lighter per-tx proving and DA across the P2P and slashing throwaway-tx paths.ChainMonitorfee-data polling (default preserves current behavior) so slot-heavy tests can skip 5 rollup reads per L1 block.