Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slasher: Fixes double votes false positive and attester slashings duplication. #13596

Merged
merged 5 commits into from
Feb 12, 2024

Conversation

nalepae
Copy link
Contributor

@nalepae nalepae commented Feb 8, 2024

Please read this PR commit by commit.

What type of PR is this?
Bug fix

This pull requests fixes 2 bugs:

Double votes false positive

  • For a given validator, when two different attestations with the same target epochs are received by the slasher in the same batch, the slasher detects them as a slashable offence. ==> ✅
  • However, for a given validator, when two different attestations with the same target epochs are received by the slasher in two different batches, the slasher does not detect any slashable offence. ==> ❌. This PR fixes this point.

Redondant attester slashing objects sent
When an equivocating attestation is detected, then the same attester slashing object is sent multiple times. The number of copies of the same object depends of the number of validators actually slashable. This PR ensure that each attester slashing object is sent exactly once.

Which issues(s) does this PR fix?

@nalepae nalepae force-pushed the slasher-double-votes-false-negative-13590 branch 3 times, most recently from f008348 to c7daf0c Compare February 9, 2024 14:34
@nalepae nalepae changed the title Slasher - Fixes double block proposals false positive. Slasher: Fixes double block proposals false positive and attester slashings duplication. Feb 9, 2024
@nalepae nalepae changed the title Slasher: Fixes double block proposals false positive and attester slashings duplication. Slasher: Fixes double votes false positive and attester slashings duplication. Feb 9, 2024
@nalepae nalepae force-pushed the slasher-double-votes-false-negative-13590 branch from c7daf0c to 80883dc Compare February 9, 2024 21:39
@nalepae nalepae marked this pull request as ready for review February 9, 2024 21:40
@nalepae nalepae requested a review from a team as a code owner February 9, 2024 21:40
@nalepae nalepae force-pushed the slasher-double-votes-false-negative-13590 branch 2 times, most recently from fecd735 to ac2cecb Compare February 12, 2024 09:56
In order to do that:
1. Each attestation of the batch is tested against the other attestations of the batch.
2. Each attestation of the batch is tested against the content of the database.
2. Attestations are saved into the database.

Fixes #13590.
@nalepae nalepae force-pushed the slasher-double-votes-false-negative-13590 branch from ac2cecb to 544918c Compare February 12, 2024 09:57
Copy link
Contributor

@rauljordan rauljordan left a comment

Choose a reason for hiding this comment

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

Nice find that we needed to dedup the slashings in a map

@nalepae nalepae added this pull request to the merge queue Feb 12, 2024
Merged via the queue into develop with commit 06a5548 Feb 12, 2024
16 checks passed
@nalepae nalepae deleted the slasher-double-votes-false-negative-13590 branch February 12, 2024 17:56
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.

2 participants