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

Support arbitrary initial height #7018

Closed
4 tasks
erikgrinaker opened this issue Aug 12, 2020 · 10 comments · Fixed by #7089
Closed
4 tasks

Support arbitrary initial height #7018

erikgrinaker opened this issue Aug 12, 2020 · 10 comments · Fixed by #7089
Assignees
Labels

Comments

@erikgrinaker
Copy link
Contributor

erikgrinaker commented Aug 12, 2020

Summary

In tendermint/tendermint#5191 (will be released in 0.34.0-rc3), Tendermint added support for starting from an arbitrary initial height, given to the application via RequestInitChain.initial_height. IAVL added support for starting from an arbitrary version in cosmos/iavl#299 (released in 0.15.0-rc1). The SDK will need to configure itself accordingly.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

We probably need to write up an ADR for how to support this and the expected use-cases. Thanks @erikgrinaker.

@erikgrinaker
Copy link
Contributor Author

erikgrinaker commented Aug 12, 2020

The primary use-case would be for e.g. the Cosmos Hub upgrade to Stargate to continue from the same block height as the previous chain, see RFC-002 for details.

@alexanderbez
Copy link
Contributor

alexanderbez commented Aug 12, 2020

@zmanian do we want to do this for stargate? We're gonna need to get at the very least:

  • ADR
  • Implementation (hopefully super trivial)
  • Simulation updates to test this new flow
  • Integration tests to test this new flow

@zmanian
Copy link
Member

zmanian commented Aug 12, 2020

Yeah I want this for stargate and I willing to help with above

@alexanderbez alexanderbez added this to the v0.40 [Stargate] milestone Aug 12, 2020
@alexanderbez alexanderbez self-assigned this Aug 12, 2020
@alexanderbez
Copy link
Contributor

tm-rc3 has been released, correct @erikgrinaker? I'm thinking this might be easier than I thought -- I think we can just pass the last version (height) from BaseApp to RequestInitChain.initial_height. I'd like a version of Tendermint I can run this theory on. I think @marbar3778 has a WIP branch, but afaik, that doesn't build and/or run, correct @marbar3778?

@erikgrinaker
Copy link
Contributor Author

Yes, rc3 is out. Not sure what you mean by passing from BaseApp; Tendermint/genesis specifies the initial height, not the app.

@tac0turtle
Copy link
Member

. I'd like a version of Tendermint I can run this theory on. I think @marbar3778 has a WIP branch, but afaik, that doesn't build and/or run, correct @marbar3778?

Nope it runs. I had a testnet running and zakis testnet is with my wip branch

@alexanderbez
Copy link
Contributor

@erikgrinaker right, I meant we load that height from the request.

@aaronc
Copy link
Member

aaronc commented Aug 14, 2020

In discussing with @marbar3778, there are basically two things we need to do:

  • handle initial_height in InitChain
  • export height + in ExportGenesis

@alexanderbez
Copy link
Contributor

Yes, this is what I also had in mind as the core components to look at. I believe the latter will be trivial, whereas the former we'll need to maybe load that height at the very beginning of InitChain.

@clevinson clevinson linked a pull request Aug 21, 2020 that will close this issue
10 tasks
@mergify mergify bot closed this as completed in #7089 Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants