Skip to content

test(devnet): add LEP-6 chain-side lifecycle e2e tests#134

Open
j-rafique wants to merge 1 commit intomasterfrom
LEP-6-devnet-tests
Open

test(devnet): add LEP-6 chain-side lifecycle e2e tests#134
j-rafique wants to merge 1 commit intomasterfrom
LEP-6-devnet-tests

Conversation

@j-rafique
Copy link
Copy Markdown
Contributor

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

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
@j-rafique j-rafique self-assigned this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant