consensus: only call privValidator.GetPubKey once per block#5143
consensus: only call privValidator.GetPubKey once per block#5143mergify[bot] merged 7 commits intomasterfrom
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.
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.
the very first time we try to get pubkey is in node.go
Line 664 in 48426c5
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)
tac0turtle
left a comment
There was a problem hiding this comment.
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