After Phase 4: Cross-Shard Transactions, you run the
deterministic multi-shard simulation E2E in the repo:
cross_shard_tx_sim (split_config(): split armed, pool surplus seats child committees).
You add trace markers, print per-shard committed heights and transaction status, and relate the polling loop
(mempool → committed → executed → finalized) to the five-phase cross-shard story—not a repeat of the single-shard height lab.
cargo test working.run_until, stats).crates/simulation/tests/scenarios.rs — cross_shard_tx_sim (multi-shard section; uses split_config()).split_config() helper near the top of the cross-shard tests.From the hyperscale-rs repository root:
cargo test -p hyperscale-simulation --test scenarios cross_shard_tx_sim -- --nocapture
Confirm the test passes. Note the ASCII diagram in the test comment (withdraw on shard 0, deposit on shard 1), seed discovery for accounts on different shards, and the final per-shard validator dump (nodes 0–2 vs 3–5).
In cross_shard_tx_sim, add two markers:
runner.initialize_genesis_with_balances(...) — e.g. println!("[lab-xshard] genesis balances set");runner.schedule_initial_event(... SubmitTransaction ...) — e.g. println!("[lab-xshard] cross-shard tx scheduled: {:?}", tx_hash);Re-run the same cargo test command and confirm both markers appear before the polling loop output.
After the existing runner.run_until(Duration::from_secs(3)); (consensus warm-up), insert a helper that prints:
0..3 (shard 0): committed_height() and whether node.execution().is_finalized(tx_hash) is true.3..6 (shard 1): the same pair.Use the tx_hash already computed in the test. Print one line per node with a [lab-xshard] prefix. You are not required to assert strict height equality across shards—cross-shard progress is tracked via mempool status and finalization on the transaction hash.
Inside the existing for iteration in 0..100 loop, when finalized first becomes true, add:
println!("[lab-xshard] finalized at iteration {} sim_elapsed={:?}", iteration, runner.now().checked_sub(start_time).unwrap());
After the loop, print runner.stats() once. In your notes (or a comment in a scratch file), map which flags flipped in order: in_mempool, committed, executed, finalized, completed.
split_bytes / pool_surplus in split_config() only in a local branch and document how that changes when children appear.single_shard_tx_sim (routing, two shard groups, cross-shard manifest).Continue to Cross-Shard Production E2E hands-on to draft what a production cross-shard integration test would need.