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

[Merged by Bors] - Avoid unnecessary slashing protection when publishing blocks #3188

Closed
wants to merge 8 commits into from

Conversation

tthebst
Copy link
Contributor

@tthebst tthebst commented May 17, 2022

Issue Addressed

#3141

Proposed Changes

Changes the algorithm for proposing blocks from

For each BN (first success):
   - Produce a block
   - Sign the block and store its root in the slashing protection DB
   - Publish the block

to

For each BN (first success):
   - Produce a block
Sign the block and store its root in the slashing protection DB
For each BN (first success):
   - Publish the block

Separating the producing from the publishing makes sure that we only add a signed block once to the slashing DB.

@michaelsproul michaelsproul added the ready-for-review The code is ready for review label May 17, 2022
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels May 18, 2022
@michaelsproul
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request May 18, 2022
## Issue Addressed

#3141 

## Proposed Changes

Changes the algorithm for proposing blocks from

```
For each BN (first success):
   - Produce a block
   - Sign the block and store its root in the slashing protection DB
   - Publish the block
```
to
```
For each BN (first success):
   - Produce a block
Sign the block and store its root in the slashing protection DB
For each BN (first success):
   - Publish the block
```

Separating the producing from the publishing makes sure that we only add a signed block once to the slashing DB.
@bors bors bot changed the title Avoid unnecessary slashing protection when publishing blocks [Merged by Bors] - Avoid unnecessary slashing protection when publishing blocks May 18, 2022
@bors bors bot closed this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants