Skip to content

perf(e2e): parallelize setup & p2p work, lighten throwaway txs#24448

Open
spalladino wants to merge 4 commits into
merge-train/spartan-v5from
spl/e2e-speed-up-followups-2
Open

perf(e2e): parallelize setup & p2p work, lighten throwaway txs#24448
spalladino wants to merge 4 commits into
merge-train/spartan-v5from
spl/e2e-speed-up-followups-2

Conversation

@spalladino

Copy link
Copy Markdown
Contributor

Round of low-risk e2e test-suite speedups that touch only test fixtures and test-support code (no production behavior change).

Approach

  • Parallelize the four independent setup boot steps (telemetry client, shared blob storage, ACVM config, BB config) in setupInner — they write disjoint config keys, so Promise.all is safe.
  • Parallelize the per-node submitTransactions loops in the gossip / preferred-gossip / rediscovery P2P tests (Promise.all preserves index order; gossip_network_no_cheat deliberately left serial).
  • Replace the per-tx full Schnorr account deployment in submitTxsTo with register-only TestContract.emit_nullifier throwaway 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.
  • Add an opt-out flag to ChainMonitor fee-data polling (default preserves current behavior) so slot-heavy tests can skip 5 rollup reads per L1 block.

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.
@spalladino spalladino added the S-do-not-merge Status: Do not merge this PR label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-do-not-merge Status: Do not merge this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant