-
Notifications
You must be signed in to change notification settings - Fork 35
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
Backport of https://github.com/cosmos/cosmos-sdk/pull/18959 #538
Conversation
@@ -19,7 +19,8 @@ | |||
// Iterate over all the validators which *should* have signed this block | |||
// store whether or not they have actually signed it and slash/unbond any | |||
// which have missed too many blocks in a row (downtime slashing) | |||
params := k.GetParams(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
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.
we already had this panic path alas
for _, voteInfo := range req.LastCommitInfo.GetVotes() { | ||
k.HandleValidatorSignature(ctx, voteInfo.Validator.Address, voteInfo.Validator.Power, voteInfo.SignedLastBlock) | ||
k.HandleValidatorSignatureWithParams(ctx, params, voteInfo.Validator.Address, voteInfo.Validator.Power, voteInfo.SignedLastBlock) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
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.
ACK
(cherry picked from commit c4a2b32)
(cherry picked from commit c4a2b32)
(cherry picked from commit c4a2b32)
(cherry picked from commit c4a2b32) Co-authored-by: Dev Ojha <[email protected]>
(cherry picked from commit c4a2b32) Co-authored-by: Dev Ojha <[email protected]>
(cherry picked from commit c4a2b32) Co-authored-by: Dev Ojha <[email protected]>
Slight state compatible speedup to slashing.GetParams
This is a .3% state machine processing time speedup on IAVL v0, .5% on v1 no fast nodes.
Backporting this to more easily backport our more significant write reduction PR we made upstream.