-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initialHeight == 0
not treated identically to initialHeight == 1
#5986
Comments
As mentioned in the PR, the genesis state is normalized with I don't doubt that you're seeing an error, but I've tried to trace all the calls paths to |
Putting this one in the icebox until we have more details. |
Closing this due to inactivity. |
Sorry about the tardiness on getting back on this one, needed to find some time to dig. You are quite right my kneejerk PR does not fix the issue. We create the Tendermint node programmatically and pass in a Tendermint saves the genesis doc from the provider here: Lines 1426 to 1434 in b9b55db
When we restart tendermint performs a replay loading the original genesis doc from the function linked above. This genesis doc in our case has a zeroed Lines 348 to 351 in b9b55db
initialHeight had been normalised to 1 we'd never enter that block.
So it seems like we should be calling I've opened a PR that I think would fix this (just quickly to illustrate, untested! soz): #6059 Here is the stack trace:
|
This change: #5191
Introduced support for an arbitrary
initialHeight
in genesis. The spec:https://github.com/tendermint/spec/blob/master/rfc/002-nonzero-genesis.md
States:
However, currently this is not the case in the following code:
https://github.com/tendermint/tendermint/blob/master/state/execution.go#L348-L349
Here, if
initialHeight
is 0 then loading validators will throw. In Burrow we use a checkpointing mechanism that will replay the previous block during a crash, if we have a chain with just the initial block thenInfoSync
will announce block height 0 (which also has meaning for 'state restored' chains) and this line will get hit withstore.LoadValidators(0)
and fail. The old behaviour avoided this because it checkedblock.Height > 1
Here is my suggested fix: #5985
The text was updated successfully, but these errors were encountered: