test(devnet): add LEP-6 chain-side lifecycle e2e tests#134
Merged
Conversation
a-ok123
approved these changes
May 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds devnet-level end-to-end coverage for the LEP-6 storage-truth lifecycle by introducing a new CLI-driven test runner, tuning devnet genesis parameters for deterministic/fast execution, and wiring the tests into devnet documentation and Make targets.
Changes:
- Add
devnet-tests-lep6Make target and a newdevnet/tests/lep6/lep6_test.shscript that drives audit storage-truth flows vialumeradinside the 5-validator Docker devnet. - Tune
devnet/default-config/devnet-genesis.jsonLEP-6 params for testability (e.g., divisor=1, enforcement=SOFT, heal threshold=8, postpone thresholds). - Update devnet docs to document the new test target; add an implementation-plan doc.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile.devnet | Adds devnet-tests-lep6 target to run the new LEP-6 devnet test script. |
| docs/plans/LEP6_DEVNET_TEST_PLAN.md | Adds a LEP-6 devnet test plan/runbook (currently has mismatches vs delivered implementation). |
| devnet/tests/lep6/lep6_test.sh | New bash-based chain-side LEP-6 lifecycle e2e tests using lumerad in Docker devnet containers. |
| devnet/Readme.md | Documents devnet-tests-everlight and devnet-tests-lep6 Make targets. |
| devnet/go.mod | Bumps go directive to align with the repository’s Go version. |
| devnet/default-config/devnet-genesis.json | Adjusts audit storage-truth params to make LEP-6 lifecycle testable in devnet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes the missing devnet-test gap for LEP-6 storage-truth (Anton: 'LEP-6
doesn't even have devnet tests'). Chain-side lifecycle e2e under the live
5-validator Docker devnet, modeled on devnet/tests/everlight/everlight_test.sh.
Tests (4, all chain-side, no supernode runtime dependency):
T1 TestLEP6_ParamsAndEpochAnchor — params readback, divisor/mode/epoch_length
sanity, current-epoch-anchor query, active SN set check.
T2 TestLEP6_SubmitEpochReport_HappyPath — host report + peer observations +
storage proof results submitted by prober; storage-challenge-reports query
confirms indexed.
T3 TestLEP6_SubmitStorageRecheckEvidence_UpdatesSuspicionScore — INVALID_TRANSCRIPT
seed -> RECHECK_CONFIRMED_FAIL; verifies +15 NodeSuspicion delta and +8
TicketDeterioration delta (LEP-6 spec scoring constants).
T4 TestLEP6_HealOpLifecycle_ClaimVerifyFinalize — drives ticket deterioration
past heal_threshold via repeated rechecks, EndBlock creates heal op,
claim-heal-complete + submit-heal-verification x2 -> HEAL_OP_STATUS_VERIFIED.
Files:
- new: devnet/tests/lep6/lep6_test.sh (1062 lines, bash)
- new: docs/plans/LEP6_DEVNET_TEST_PLAN.md
- mod: devnet/default-config/devnet-genesis.json (5 LEP-6 param tweaks for
testability: divisor=1, mode=SOFT, postpone_threshold=100, decay=1000
(no decay), consecutive_epochs_to_postpone=100; epoch_length_blocks=20
was already present)
- mod: Makefile.devnet (devnet-tests-lep6 target + .PHONY)
- mod: devnet/Readme.md (§6.7 table — adds everlight + lep6 rows)
Self-bootstrap registration: devnet bundle ships only lumerad + libwasmvm
(no supernode binary), so supernode-setup.sh skips. Test self-registers each
validator's own key as a supernode if no SNs exist (mirrors
everlight_test.sh:ensure_supernode_registered_for_service).
Validation: 15/15 PASS, 0 FAIL, 0 SKIP against live 5-validator devnet
(2026-05-03). All LEP-6 spec scoring constants verified end-to-end under
real BFT consensus.
Out of scope (follow-up PRs):
- Full supernode<->lumera e2e (gated on supernode #286/#287/#288 merge)
- Postponement / recovery / edge cases (already covered in
tests/systemtests/audit_storage_truth_*)
- devnet-upgrade-1120 rehearsal target (separate concern)
Note for everlight_test.sh maintainer: S7.7's 'set epoch_length_blocks=20
via gov' is now redundant — the param became genesis-immutable upstream and
this PR makes the genesis ship at 20.
Run with:
make devnet-up-detach
make devnet-tests-lep6
82ed2e2 to
601fedf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the missing devnet-test gap for LEP-6 storage-truth (Anton: 'LEP-6 doesn't even have devnet tests'). Chain-side lifecycle e2e under the live 5-validator Docker devnet, modeled on devnet/tests/everlight/everlight_test.sh.
Tests (4, all chain-side, no supernode runtime dependency):
T1 TestLEP6_ParamsAndEpochAnchor — params readback, divisor/mode/epoch_length
sanity, current-epoch-anchor query, active SN set check.
T2 TestLEP6_SubmitEpochReport_HappyPath — host report + peer observations +
storage proof results submitted by prober; storage-challenge-reports query
confirms indexed.
T3 TestLEP6_SubmitStorageRecheckEvidence_UpdatesSuspicionScore — INVALID_TRANSCRIPT
seed -> RECHECK_CONFIRMED_FAIL; verifies +15 NodeSuspicion delta and +8
TicketDeterioration delta (LEP-6 spec scoring constants).
T4 TestLEP6_HealOpLifecycle_ClaimVerifyFinalize — drives ticket deterioration
past heal_threshold via repeated rechecks, EndBlock creates heal op,
claim-heal-complete + submit-heal-verification x2 -> HEAL_OP_STATUS_VERIFIED.
Files:
Self-bootstrap registration: devnet bundle ships only lumerad + libwasmvm (no supernode binary), so supernode-setup.sh skips. Test self-registers each validator's own key as a supernode if no SNs exist (mirrors everlight_test.sh:ensure_supernode_registered_for_service).
Validation: 15/15 PASS, 0 FAIL, 0 SKIP against live 5-validator devnet (2026-05-03). All LEP-6 spec scoring constants verified end-to-end under real BFT consensus.
Out of scope (follow-up PRs):
Note for everlight_test.sh maintainer: S7.7's 'set epoch_length_blocks=20 via gov' is now redundant — the param became genesis-immutable upstream and this PR makes the genesis ship at 20.
Run with:
make devnet-up-detach
make devnet-tests-lep6