Conversation
|
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
eserilev
added this pull request to stack #10029
September 9, 2026 18:11
eserilev
force-pushed
the
slashing-protection-exhaustive-tests
branch
from
September 9, 2026 20:37
18355ea to
f7b1cd3
Compare
eserilev
force-pushed
the
slashing-protection-exhaustive-tests
branch
from
September 9, 2026 22:49
f7b1cd3 to
54d6c8b
Compare
eserilev
force-pushed
the
slashing-protection-exhaustive-tests
branch
from
September 10, 2026 05:57
54d6c8b to
70a2ed9
Compare
This branch has not been deployed
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.
Issue Addressed
Bounded exhaustive equivalence check for the attester slashing conditions.
check_attestation contains slashing rules across five SQL queries. This test suite
restates these rules in plain Rust and compares it against the production codepaths for
every attestation history up to MAX_HISTORY attestations from epochs 0..=MAX_EPOCH.
Exhaustive tests are helpful here because the rules for check_attestation only depend
on relative attestation ordering between epochs. For example attestation histories with
epochs {5, 40, 1000} work the same as ones with epochs {0, 1, 2}. The gaps between epochs
are irrelevant, so we can stick to a small range of epochs.
These tests exist to add more coverage to the SQL itself. Our other test cases test
against the same SQL queries but for a much smaller set of inputs.
Test coverage added by this PR that doesn't currently exist in unstable:
SourceLessThanLowerBoundandTargetLessThanOrEqLowerBound. The interchange test vectors reach them by accident after an import, but only check pass or fail. The exhaustive sweep cover both across thousands of histories.preliminary_check_attestationagrees withcheck_and_insert_attestation. The exhaustive tests do it for every attestation candidate on every history.