Cross-Shard Production E2E Tests: Improved/Innovative New Test Case

⏱️ 1–1.5 hours📊 Level 5Design + wiring lab

Why this lab

The repo today has a rich simulation cross-shard E2E (cross_shard_tx_sim) but no dedicated production integration test that exercises a full cross-shard transaction on live wiring. This module is a design-and-observability lab: you map the simulation test to production ingress, threading, and multi-validator topology, then write acceptance criteria for a future test_production_cross_shard_*—the same spirit as Single-Shard Production E2E hands-on, extended across shards.

Prerequisites

Step 1 — Simulation spec as source of truth

In crates/simulation/tests/scenarios.rs, list (in a short markdown note or comment block you keep locally):

  1. What split_config() / ScenarioConfig sets (num_shards, validator count, connectivity).
  2. How the test picks shard-0 and shard-1 accounts (seed loop + shard_for_node).
  3. What “done” means in the poll loop (completed, executed, finalized).

This list becomes the checklist for production parity.

Step 2 — Production gap analysis

Search crates/production/tests/ for cross-shard or multi-shard coverage (today: typically none). Re-read runner_boots_listens_and_shuts_down_cleanly from single-shard production hands-on.

Write a table with three columns: Signal (e.g. listen address up, tx in mempool, cross-shard receipt), Single-shard prod test today, Needed for cross-shard prod E2E. Aim for at least six rows.

Step 3 — Ingress and topology sketch

Without implementing a full new test yet, draft pseudocode or bullet steps for a future integration test:

Reference crates/paths from production harness analysis.

Step 4 — Optional code touch

If you want a minimal repo change, add comment-only markers in crates/production/tests/ (near the existing network runner test) pointing to this lab’s acceptance criteria— or add a #[ignore] stub test named test_production_cross_shard_transaction with todo!() and your checklist in the doc comment. Do not leave flaky or failing tests enabled in CI.

What “done” looks like

Next

Continue to Performance measurement.