Add local sequencer integration tests#140
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an opt-in local sequencer integration harness to the existing Rust integration test suites, plus a local-sequencer helper tool to clone/build the pinned LEZ checkout (and circuits cache) and run the feature-gated tests in CI and locally.
Changes:
- Introduces
tools/local-sequencerto manage a pinned LEZ checkout, circuits caching, and asetup/testworkflow. - Adds a
local-sequencer-testsfeature tointegration_teststhat swapsV03Stateusage behind aTestStatewrapper that mirrors transitions through a spawned sequencer. - Wires documentation, Makefile clippy, and CI to run the local sequencer integration suite.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/local-sequencer/src/main.rs | New helper CLI to prepare LEZ checkout, circuits cache, and run feature-gated integration tests |
| tools/local-sequencer/Cargo.toml | New workspace tool crate definition |
| README.md | Documents local sequencer harness usage and stablecoin integration coverage |
| programs/integration_tests/tests/token.rs | Switches to integration_tests::TestState alias and adds local-sequencer-specific assertions |
| programs/integration_tests/tests/stablecoin.rs | Switches to integration_tests::TestState alias |
| programs/integration_tests/tests/ata.rs | Switches to integration_tests::TestState alias |
| programs/integration_tests/tests/amm.rs | Switches to integration_tests::TestState alias |
| programs/integration_tests/src/local_sequencer.rs | New feature-gated local sequencer harness (spawn, seed, submit/poll, mirror state) |
| programs/integration_tests/src/lib.rs | Feature-gated TestState export (wrapper vs type alias) |
| programs/integration_tests/Cargo.toml | Adds local-sequencer-tests feature + optional deps (base64/borsh/rocksdb/serde_json) |
| Makefile | Runs clippy for integration_tests with local-sequencer-tests enabled |
| CLAUDE.md | Updates repository structure notes to include stablecoin integration tests |
| Cargo.toml | Adds tools/local-sequencer and workspace deps for base64/rocksdb |
| Cargo.lock | Adds dependency graph entries for new optional deps (e.g., rocksdb/librocksdb-sys/bindgen) |
| .github/workflows/ci.yml | Adds CI job to run cargo run -p local-sequencer -- test with caching |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I've found some issues/PRs and created new issues that would make the local-sequencer wrapper unnecessary and let us depend on scaffold tool directly. Existing scaffold work that is adjacent, but not enough:
Missing pieces were submitted as issues as follow-up scaffold requirements:
|
9b66271 to
6c0caa8
Compare
6c0caa8 to
eb5c7f8
Compare
|
Now this PR uses scaffold. Scaffold currently don't do that, and this results in tests taking too long. While this is not implemented, I won't recommend merging this PR. I opened the issue here logos-co/scaffold#227 |
Summary
local-sequencerhelper crate with scaffold-managedtest-nodeintegration.scaffold.tomland depend onlogos-scaffoldso local-sequencer tests use the scaffold Rust API for node lifecycle, transaction outcomes, block context, account reads, and proof reads.TestStatecan start a scaffold test node from full-fidelityV03State.local-sequencer-testsflow.Closes #134.
Tests
cargo +nightly fmt --all -- --checktaplo fmt --check .git diff --checkRISC0_SKIP_BUILD=1 cargo +1.94.0 clippy --workspace --all-targets -- -D warningsRISC0_SKIP_BUILD=1 cargo +1.94.0 clippy -p integration_tests --all-targets --features local-sequencer-tests -- -D warningsRISC0_DEV_MODE=1 cargo +1.94.0 test --workspace --exclude integration_testsRISC0_DEV_MODE=1 cargo +1.94.0 test -p integration_testsRISC0_DEV_MODE=1 RUST_TEST_THREADS=1 cargo +1.94.0 test -p integration_tests --features local-sequencer-tests -- --nocapturecargo +1.94.0 build -p idl-gen --release*/methods/guest/src/bin/*.rs