lssa/test_fixtures
moudyellaz a16e22c46c refactor!(cross-zone): deploy programs at genesis instead of builtins
Cross-zone builtin programs are no longer registered in the production
genesis. A zone that participates declares the ones it uses via a new
GenesisAction::DeployProgram (sequencer) and a matching deploy_programs
list (indexer), both resolved through CrossZoneProgram and registered
with with_programs. Cross-zone genesis accounts (inbox config,
wrapped-token config) are seeded through the state constructor for a
receiving zone, and bridge-lock holdings are seeded from their actions
regardless of receiving config, dropping V03State::insert_genesis_account.
GenesisAction amounts now use the Balance alias. Documents cross_zone as
the reference LEZ adapter and the bridge demo as not production-safe.

The sequencer's DeployProgram set and the indexer's deploy_programs are
configured separately, so both nodes now log a deterministic genesis
fingerprint (V03State::genesis_fingerprint) at startup: equal values
confirm the two genesis states agree, a mismatch flags a divergent
deploy set.

BREAKING CHANGE: the genesis state root changes (cross-zone builtins are
out of production genesis) and the sequencer/indexer configs gain the
DeployProgram / deploy_programs list that cross-zone-participating zones
must set.
2026-07-13 19:12:24 +02:00
..

test_fixtures

Shared test/bench fixtures that spin up bedrock + sequencer + indexer + wallet end-to-end.

Library

TestContext drives the full stack for integration tests and benches:

let ctx = TestContext::new().await?;              // fast: restores the prebuilt db dump
let ctx = TestContext::builder()
    .from_scratch()                                // apply genesis + claim supply live
    .with_genesis(actions)                         // custom genesis (implies from_scratch)
    .disable_indexer()
    .build().await?;

TestContext::new() restores fixtures/prebuilt_sequencer_db.dump (genesis + initial-supply claim blocks) instead of re-applying genesis and re-proving the private claims, then syncs the wallet. Use from_scratch() to build genesis live.

Binary

regenerate_test_fixture regenerates that dump (needs Docker):

just regenerate-test-fixture   # RISC0_DEV_MODE=1 cargo run -p test_fixtures --bin regenerate_test_fixture

Rerun and commit fixtures/prebuilt_sequencer_db.dump after changing genesis, the default accounts, block format, or initial state.