Lep 6 postponed target assignment fix#139
Merged
Merged
Conversation
a-ok123
approved these changes
May 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes LEP-6 storage-truth target assignment so supernodes in POSTPONED state remain eligible to be challenged (and thus can accumulate clean PASS proofs for recovery), by using the epoch anchor’s stored target set instead of re-filtering targets down to the active challenger set.
Changes:
- Update storage-truth target candidate selection to use the anchor’s
TargetSupernodeAccountsdirectly (keeping challenger eligibility restricted to the active/eligible set). - Add a regression test ensuring active challengers can be assigned a postponed target.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
x/audit/v1/keeper/audit_peer_assignment.go |
Adjusts storage-truth target candidate selection to include anchored (postponed-inclusive) targets. |
x/audit/v1/keeper/audit_peer_assignment_test.go |
Adds regression coverage for postponed targets being assignable to active challengers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Fix LEP-6 storage-truth target assignment so POSTPONED supernodes remain challengeable by active challengers after they are postponed.
Before this change, storage-truth assignment computed targets by intersecting the epoch anchor’s target set with the active challenger set. That accidentally removed POSTPONED supernodes from future storage-truth assignments, even though the epoch anchor already records POSTPONED nodes in TargetSupernodeAccounts.
This made the LEP-6 recovery path unreachable in some cases:
text
storage failure → suspicion threshold crossed → POSTPONED
→ target no longer assigned
→ no clean PASS proofs can accrue
→ clean-pass recovery predicate cannot be satisfied
The fix keeps challenger eligibility active-only, but uses the anchored target set as the storage-truth target candidate set.
Why this is required
LEP-6 recovery requires both:
The current chain implementation already separates:
CreateEpochAnchorIfNeeded already includes POSTPONED nodes in the target set. Existing test coverage also asserts this behavior. The assignment code was the inconsistent piece: it filtered the target set back down to active nodes, making POSTPONED targets unreachable.
Implementation
Updated computeStorageTruthTargetsForReporter so:
Added regression coverage to prove active challengers can be assigned POSTPONED storage-truth targets.
Spec / design alignment
This is aligned with LEP-6’s objective of storage-truth enforcement and recovery:
text
failure → POSTPONED → clean PASS evidence → ACTIVE recovery
This also matches the implementation guide’s SOFT/FULL behavior: storage-truth enforcement can postpone nodes, and FULL mode requires complete proof coverage for assigned storage-truth targets.
Validation
Ran targeted keeper tests:
bash
go test ./x/audit/v1/keeper -run 'TestStorageTruthAssignment(UsesOneThirdCoverage|IncludesPostponedTargets|DisabledUsesLegacyCoverage)$' -count=1
Result:
text
ok github.com/LumeraProtocol/lumera/x/audit/v1/keeper 0.071s
Also ran full keeper package after review:
bash
go test ./x/audit/v1/keeper -count=1
Result:
text
ok github.com/LumeraProtocol/lumera/x/audit/v1/keeper 0.203s
Validated through the supernode LEP-6 local E2E flow consuming this chain fix:
Result: PASS
Key passing tests: