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

Source lrg target #7839

Merged
merged 8 commits into from
Nov 17, 2020
Merged

Source lrg target #7839

merged 8 commits into from
Nov 17, 2020

Conversation

shayzluf
Copy link
Contributor

Feature

What does this PR do? Why is it needed?
Attestation with higher source than target epoch could be potentially found in the network
This pr makes an improvement in handling these edge cases on:

  • update spans
  • detection
  • sig update

Which issues(s) does this PR fix?

Fixes #7161

@shayzluf shayzluf requested a review from a team as a code owner November 17, 2020 10:38
if (targetEpoch - sourceEpoch) > params.BeaconConfig().WeakSubjectivityPeriod {
dis := targetEpoch - sourceEpoch

if sourceEpoch > targetEpoch { //Prevent underflow and handle source > target slashable cases.
Copy link
Member

Choose a reason for hiding this comment

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

why flip source and target epoch here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

spans are recorded at source epoch. we need to get the right spans for detection to work right

@prylabs-bulldozer prylabs-bulldozer bot merged commit 2976bf7 into master Nov 17, 2020
@delete-merged-branch delete-merged-branch bot deleted the source_lrg_target branch November 17, 2020 17:17
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.

Slasher doesnt handle attestation edge case well
3 participants