Skip to content

Slashing Condition Evidence Expiration Window Inconsistency Between Slot and Epoch Units#49

Merged
JamesEjembi merged 1 commit into
VeriNode-Labs:mainfrom
Mona-i:feat/slashing-evidence-expiry-issue-13
Jul 18, 2026
Merged

Slashing Condition Evidence Expiration Window Inconsistency Between Slot and Epoch Units#49
JamesEjembi merged 1 commit into
VeriNode-Labs:mainfrom
Mona-i:feat/slashing-evidence-expiry-issue-13

Conversation

@Mona-i

@Mona-i Mona-i commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Closes #13 \n\nSummary\n- Normalize slashing evidence expiry calculations to slots.\n- Add evidence_infraction_slot_range helper to compute inclusive slot ranges for evidence (epoch -> slot normalization).\n- verify_evidence_expiry now compares earliest infraction slot against MAX_SLASHING_WINDOW (in slots), treating the boundary as inclusive.\n- verify_surround_vote validates presence and ordering of source/target epochs and checks expiry.\n- Added tests: tests/slashing/evidence_expiry_test.rs (boundary and proptest property).\n\nFiles changed\n- src/slashing/evidence_verifier.rs (new)\n- src/slashing/mod.rs (export evidence_verifier)\n- tests/slashing/evidence_expiry_test.rs (new)\n\nTesting / validation performed (instructions to run locally)\n- Ensure Rust toolchain installed.\n- Run: cargo test --all\n- Check formatting: cargo fmt -- --check\n- The repository CI should run these commands; CI was not executed in this environment.\n\nBehavior notes and risks\n- Window semantics: evidence is considered valid when current_slot == earliest_start + MAX_SLASHING_WINDOW (inclusive). Change to exclusive expiry is trivial if desired.\n- No existing code behavior was modified beyond adding the verifier module and tests. Integration into slashing_core may be needed where existing expiry checks occur.\n\nSee: https://github.com/VeriNode-Labs/VeriNode--Core/issues/13\n\nCommit: 50aa41f

…s\n\n- Added evidence_infraction_slot_range to compute inclusive slot ranges for evidence\n- verify_evidence_expiry now compares earliest infraction slot against MAX_SLASHING_WINDOW (slots)\n- verify_surround_vote validates surround epochs and expiry\n- Added tests for boundary behavior and property test\n
@JamesEjembi
JamesEjembi merged commit 55e9541 into VeriNode-Labs:main Jul 18, 2026
1 check 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.

Slashing Condition Evidence Expiration Window Inconsistency Between Slot and Epoch Units

2 participants