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

Add a flag to export to allow starting at a zero height #2812

Closed
cwgoes opened this issue Nov 14, 2018 · 2 comments
Closed

Add a flag to export to allow starting at a zero height #2812

cwgoes opened this issue Nov 14, 2018 · 2 comments
Assignees
Labels
tooling dev tooling within the sdk

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Nov 14, 2018

So we don't need tendermint/tendermint#2543 for GoS.

Withdraw all rewards and check that bond heights are consistent.

@zmanian
Copy link
Member

zmanian commented Nov 14, 2018

How are hard is this to do?

@cwgoes cwgoes self-assigned this Nov 15, 2018
@cwgoes
Copy link
Contributor Author

cwgoes commented Nov 15, 2018

How are hard is this to do?

Hopefully not very, working on it in a bit.

jaekwon pushed a commit that referenced this issue Nov 26, 2018
Closes #2812

This PR adds the flag --for-zero-height to gaiad export, which runs several alterations to the application state to prepare for restarting a new chain in a consistent fashion.

It also:

* Moves Gaia's export code to cmd/gaia/app/export.go for cleaner separation.
* Fixes an inconsistency where we treated the initChainer as happening at height -1 - it should now happen at height 0, since the first header sent by Tendermint has height 1.
* Runs the runtime invariant checks on start (in initChainer)
* Adds a few auxiliary functions to clear slashing periods
* Removes the Height field from Delegation objects in x/stake, which was not used anywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling dev tooling within the sdk
Projects
None yet
Development

No branches or pull requests

2 participants