only retrieve pubkey once for all validators (partially fixes #4865)#4895
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! 🚀 |
consensus/state.go
Outdated
| var ( | ||
| commitSize = block.LastCommit.Size() | ||
| valSetLen = len(cs.LastValidators.Validators) | ||
| address types.Address = types.Address{} |
There was a problem hiding this comment.
| address types.Address = types.Address{} | |
| address types.Address |
nit
There was a problem hiding this comment.
what's the standard here; fixes in the PR and squash on merge, or update my branch to have a single squashed commit?
There was a problem hiding this comment.
fixes in PR and then we squash on merge
tac0turtle
left a comment
There was a problem hiding this comment.
utACK
thanks for making the pr 😄
|
Thank you for the issue and the quick fix, @joe-bowman! Would you mind adding a changelog entry so we can credit you in the next release? |
|
It would also be cool to have some kind of regression test, but given the way you surfaced this, I'm not sure if that will be straightforward. Thoughts? |
done :) |
Co-authored-by: Marko <markobaricevic3778@gmail.com>
Description
in consensus/state.go, when calulating metrics, retrieve address (ergo, pubkey) once prior to iterating over validatorset to ensure we do not make excessive calls to signer.
Partially closes: #4865