ConsensusContext.HandleMessage()
creates context with earlier validator set
#3772
Labels
bug
Something isn't working
If
ConsensusContext
receives a message with higher height than current height, it tries to create a newContext
with height of received message viaConsensusContext.CreateContext()
.libplanet/Libplanet.Net/Consensus/ConsensusContext.cs
Lines 250 to 253 in 690a98c
But
ConsensusContext.CreateContext()
createsContext
with validator set ofConsensusContext.Height - 1
, so validator set of createdContext
is different from actual one, ifConsensusMessage.Height != ConsensusContext.Height
.libplanet/Libplanet.Net/Consensus/ConsensusContext.cs
Lines 442 to 444 in 690a98c
It does not make any critical problems if validator set is static, but when it varies, can be a matter.
Since
Context
cannot be generated without validator set, and validator set cannot be decided without actual block appending,Context
should not be created through this path, IMO.The text was updated successfully, but these errors were encountered: