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

Insert over-the-wire slashing to forkchoice #10615

Merged
merged 26 commits into from
May 7, 2022
Merged

Conversation

terencechain
Copy link
Member

This PR ensures we can insert over the wire slashing objects to forkchoice to account for equivocation in #10597

@@ -36,6 +36,10 @@ func (s *Service) NewSlot(ctx context.Context, slot types.Slot) error {
return errors.Wrap(err, "could not reset boosted proposer root in fork choice")
}

// Insert slashings to forkchoice.
slashings := s.cfg.SlashingPool.PendingAttesterSlashings(ctx, s.head.state, true)
s.insertSlashingsToForkChoiceStore(ctx, slashings)
Copy link
Contributor

Choose a reason for hiding this comment

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

What worries me about this approach is that we will be going over the following loops on every slot:

  1. Check that each slashing has not been included on chain or not
  2. Send the slashings to forkchoice, which will be a noop (I will fix this now)
    We shouldn' t be sending all slashings every single slot until the pending queue dissapears.

@prylabs-bulldozer prylabs-bulldozer bot merged commit 122c3f4 into develop May 7, 2022
@delete-merged-branch delete-merged-branch bot deleted the p2p-slashings branch May 7, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants