You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In previous versions (< v0.50.x) the nodes would stop at halt-height, whereas in v0.50 the chain produces one more block after the specified halt height causing confusion among developers and operators.
There seems to be off-by-one error in cosmos-sdk v0.50 resulting in unexpected behavior.
This PR refactored the halt-height handling for some of the cosmos-sdk releases.
It can be seen that the following lines use >= when comparing halt-height and halt-time:
This behavior can lead to weird network forks in case of a co-ordinated upgrade that does not go through governance (e.g. when fixing state issues or handling security concerns).
Cosmos SDK Version
0.50.x
How to reproduce?
Start a local node (using simd) and specify a halt-height. It can be observed that the node progresses and halts one block after the specified halt-hight.
e.g.
# cosmos-sdk v0.47halt-height = 100# chain does not produce block 100 and halts# cosmos-sdk v0.50halt-height = 100# chain produces block 100 and halts
Is there an existing issue for this?
What happened?
In previous versions (< v0.50.x) the nodes would stop at halt-height, whereas in v0.50 the chain produces one more block after the specified halt height causing confusion among developers and operators.
There seems to be off-by-one error in cosmos-sdk v0.50 resulting in unexpected behavior.
This PR refactored the halt-height handling for some of the cosmos-sdk releases.
It can be seen that the following lines use
>=
when comparing halt-height and halt-time:The latest changes use
>
which leads to incorrect and unexpected behavior:This behavior can lead to weird network forks in case of a co-ordinated upgrade that does not go through governance (e.g. when fixing state issues or handling security concerns).
Cosmos SDK Version
0.50.x
How to reproduce?
Start a local node (using
simd
) and specify ahalt-height
. It can be observed that the node progresses and halts one block after the specified halt-hight.e.g.
cc @stana-miric @dasanchez
The text was updated successfully, but these errors were encountered: