-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Exit early if there's no validator slashing #7587
Merged
Merged
Conversation
This file contains 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
terencechain
changed the title
Exit early if there's no slashing
Exit early if there's no validator slashing
Oct 20, 2020
Codecov Report
@@ Coverage Diff @@
## master #7587 +/- ##
==========================================
+ Coverage 61.65% 61.68% +0.02%
==========================================
Files 423 423
Lines 29666 29636 -30
==========================================
- Hits 18290 18280 -10
+ Misses 8448 8432 -16
+ Partials 2928 2924 -4 |
terencechain
commented
Oct 21, 2020
@@ -248,6 +248,16 @@ func ProcessFinalUpdates(state *stateTrie.BeaconState) (*stateTrie.BeaconState, | |||
upwardThreshold := hysteresisInc * params.BeaconConfig().HysteresisUpwardMultiplier | |||
|
|||
bals := state.Balances() | |||
var updateEffective bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this should be in a different PR
Related #7585 |
rauljordan
approved these changes
Oct 21, 2020
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.
These validators copies for process slashing are bad. We shouldn't need to copy validators if slashing is not going to happen. This PR implemented a pre condition and a circuit breaker to exit early if there's no meaningful slashing to process
Heap flames for references:
Related #7544