Skip to content

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

Merged
j-rafique merged 1 commit into
1.12.0from
LEP-6-devnet-tests
May 11, 2026
Merged

test(devnet): add LEP-6 chain-side lifecycle e2e tests#134
j-rafique merged 1 commit into
1.12.0from
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

@j-rafique j-rafique self-assigned this May 8, 2026
@j-rafique j-rafique changed the base branch from master to 1.12.0 May 11, 2026 15:40
@a-ok123 a-ok123 requested a review from Copilot May 11, 2026 15:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-lep6 Make target and a new devnet/tests/lep6/lep6_test.sh script that drives audit storage-truth flows via lumerad inside the 5-validator Docker devnet.
  • Tune devnet/default-config/devnet-genesis.json LEP-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.

Comment thread devnet/tests/lep6/lep6_test.sh Outdated
Comment thread devnet/tests/lep6/lep6_test.sh Outdated
Comment thread devnet/tests/lep6/lep6_test.sh
Comment thread devnet/tests/lep6/lep6_test.sh
Comment thread devnet/tests/lep6/lep6_test.sh Outdated
Comment thread docs/plans/LEP6_DEVNET_TEST_PLAN.md Outdated
Comment thread docs/plans/LEP6_DEVNET_TEST_PLAN.md Outdated
Comment thread docs/plans/LEP6_DEVNET_TEST_PLAN.md Outdated
Comment thread docs/plans/LEP6_DEVNET_TEST_PLAN.md Outdated
Comment thread docs/plans/LEP6_DEVNET_TEST_PLAN.md Outdated
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 force-pushed the LEP-6-devnet-tests branch from 82ed2e2 to 601fedf Compare May 11, 2026 18:17
@j-rafique j-rafique merged commit 1422c72 into 1.12.0 May 11, 2026
7 checks passed
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.

3 participants