consensus: do we really need initialHeight
in the consensus reactor?
#4491
Labels
8000
initialHeight
in the consensus reactor?
#4491
Originally posted by @cason in #4436 (comment)
This value is copied from the consensus state (the actual algorithm implementation) in order to validate received messages of a single type, which is a control message, where a node reports its current state:
I really think that once we have started a node, the
state.InitialHeight
never changes. It is setup in the genesis, loaded at startup, but it cannot be changed by the anyone. This code is super old, introduced by tendermint/tendermint#5191.Nonetheless, with more or less efficient methods we are pulling this integer every time we receive such a message from any peer (several times per consensus round). This is really inefficient and we should probably get rid of this logic.
The text was updated successfully, but these errors were encountered: