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
consensus: only call privValidator.GetPubKey once per block #5143
Conversation
👋 Thanks for creating a PR! Before we can merge this PR, please make sure that all the following items have been
Thank you for your contribution to Tendermint! 🚀 |
Codecov Report
@@ Coverage Diff @@
## master #5143 +/- ##
==========================================
+ Coverage 60.83% 62.57% +1.73%
==========================================
Files 203 259 +56
Lines 20526 27272 +6746
==========================================
+ Hits 12488 17066 +4578
- Misses 6961 8716 +1755
- Partials 1077 1490 +413
|
if err := cs.updatePrivValidatorPubKey(); err != nil { | ||
cs.Logger.Error("Can't get private validator pubkey", "err", err) | ||
} |
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.
Should this be a hard error condition? If we can't fetch the validator's public key on startup, is there even any point in continuing with consensus?
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.
the very first time we try to get pubkey is in node.go
Line 664 in 48426c5
pubKey, err := privValidator.GetPubKey() |
there we exit upon failure
it's fine to continue here => validator will just not sign / vote on this block (or more depending on downtime)
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.
There is another key cache in the metrics function could this be replaced with this change? Also is there any chance we could test this and see the improvement?
I can't use
you mean write a test or test by hands? |
test by hand. I dont think we have e2e tests that could do this, do we? |
is this PR good to go into master? |
Closes #4865