Skip to content
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

Export genesis - Block Time #1533

Closed
5 tasks
RafilxTenfen opened this issue Jun 13, 2022 · 3 comments
Closed
5 tasks

Export genesis - Block Time #1533

RafilxTenfen opened this issue Jun 13, 2022 · 3 comments

Comments

@RafilxTenfen
Copy link

Summary of Bug

  • When restarting a chain from only an exported genesis (without data/*.db files) the next block time uses genesis time 🤔

  • This way if you stop the chain at block height 4 and export the genesis, delete the data/*.db, and restart the chain the block height 5 would use the genesis_time as the time for the new generated block

  • When loading the tendermint state it uses the genesis file when there is no state from *.db and then it sets the context LastBlockTime with the genesis time like LastBlockTime: genDoc.GenesisTime and then the context header time is filled with the time from the GenesisTime

  • This seems a bit weird because it happens at the tendermint layer, but tendermint doesn't have the export command

Version

  • git commit hash: cd27aaaf39cc7819b5164e4baf3fd5aad23ec52a
  • gaiad version: v7.0.2

Steps to Reproduce

./gaia-exported-genesis-timed.sh ./path_to_bin/gaiad-v702

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
  • Is a spike necessary to map out how the issue should be approached?
@robert-zaremba
Copy link

robert-zaremba commented Jun 15, 2022

Sounds like a Tendermint/Cosmos SDK issue. genDoc.GenesisTime has a wrong time set.

@robert-zaremba
Copy link

robert-zaremba commented Jun 15, 2022

So basically this is set to original "block 0" time.

@robert-zaremba
Copy link

let's close this issue. I created a new one in Tendermint. (see log above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants