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

Upgrade descriptions for cosmoshub-3 #585

Merged
merged 10 commits into from
Feb 4, 2021
Merged

Upgrade descriptions for cosmoshub-3 #585

merged 10 commits into from
Feb 4, 2021

Conversation

toschdev
Copy link
Contributor

Closes: #569

Description

Cosmoshub-3 Upgrade procedure for full node maintainers


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@toschdev toschdev marked this pull request as draft January 27, 2021 14:56
@codecov
Copy link

codecov bot commented Jan 27, 2021

Codecov Report

Merging #585 (efb4e57) into main (b06e42a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #585   +/-   ##
=======================================
  Coverage   12.33%   12.33%           
=======================================
  Files           8        8           
  Lines         697      697           
=======================================
  Hits           86       86           
  Misses        593      593           
  Partials       18       18           

Copy link
Contributor

@shahankhatch shahankhatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not seeing these lines which are mentioned in the proposal:

  1. Validators should (AFTER ENSURING IT IS BACKED UP!) delete their ~/.gaiad directory and create a new one with gaiad init [name] and then edit their configuration files or recover the config files from backups.
  2. Validators should then start cosmoshub-4 with gaiad start. Automated audits of the genesis state can take 30-120 min using the crisis module. This can be disabled by gaiad start --x-crisis-skip-assert-invariants.

docs/migration/cosmoshub-3.md Outdated Show resolved Hide resolved
docs/migration/cosmoshub-3.md Show resolved Hide resolved
docs/migration/cosmoshub-3.md Show resolved Hide resolved
@shahankhatch
Copy link
Contributor

I noticed that this doc also has a couple of points which would be relevant to the upgrade path, e.g., new app configuration options like state sync:
https://github.com/cosmos/cosmos-sdk/blob/master/docs/migrations/chain-upgrade-guide-040.md

However, I think it would be good to verify whether any configuration changes should be applied after starting the chain, and not before running the crisis module or immediately after starting the node with an migrated state.

@zmanian
Copy link
Member

zmanian commented Feb 2, 2021

Gaia 2.0.15 is out and supports halt time

@toschdev toschdev closed this Feb 2, 2021
@toschdev toschdev reopened this Feb 2, 2021
@toschdev
Copy link
Contributor Author

toschdev commented Feb 2, 2021

Resolved all comments. Thanks for the feedback, keep it coming!

@toschdev toschdev marked this pull request as ready for review February 2, 2021 19:47
Copy link
Contributor

@shahankhatch shahankhatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @Tosch110!

@shahankhatch
Copy link
Contributor

Not necessary for this PR, but I plan to integrate some of the content from the stargate launch repo, including the breaking changes list.

@shahankhatch shahankhatch merged commit 81d3004 into cosmos:main Feb 4, 2021
Copy link
Member

@ebuchman ebuchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Tosch110 ! Main thing to fix is the genesis time param, other stuff is minor

1. Verify you are currently running the correct version (v4.0.0) of the _Gaia_:

The upgrade time as agreed upon by governance:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this go below the next block? Looks like the version block should be here and the time underneath


```bash
$ gaiad migrate cosmoshub_3_genesis_export.json --chain-id=cosmoshub-4 --genesis-time=[PLACEHOLDER]> genesis.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the following line are a bit confusing - can the exact PLACEHOLDER time be filled in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, do we use the time of 2021-02-18T06:00:00Z + 60 minutes with the subseconds truncated leading to

2021-02-18T07:00:00Z ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have 5M+ blocks, maybe we even need more than an hour? Exporting and importing genesis can take a bit under these circumstances.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh @zmanian and @shahankhatch have been testing right? How long does it take?


Compare this value with other validators / full node operators of the network.
It is important that each parties can reproduce the same genesis.json file from the steps accordingly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is important that each parties can reproduce the same genesis.json file from the steps accordingly.
It is important that each party can reproduce the same genesis.json file from the steps accordingly.

```

1. Move the new `genesis.json` to your `.gaiad/config/` directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Move the new `genesis.json` to your `.gaiad/config/` directory
1. Move the new `genesis.json` to your `.gaia/config/` directory


In case you have been running REST server with the command `gaiacli rest-server` previously, running this command will not be necessary anymore.
API server is now in-process with daemon and can be enabled/disabled by API configuration in your `.gaiad/config/app.toml`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.gaiad -> .gaia and a bunch more below

@ebuchman
Copy link
Member

ebuchman commented Feb 4, 2021

Also it's been noted that these instructions differ from whats in the proposal 37 cc @zmanian . Presumably the instructions here should be canonical ?

@marcotradenet
Copy link

In my opinion there should be some instructions for who uses tmkms. To be compatible with Tendermint it should be updated to the latest version and the configuration should change, I think: need to add protocol_version = "v0.33" in tmkms configuration.
State file, state_file parameter in configuration, should be deleted.

@toschdev
Copy link
Contributor Author

toschdev commented Feb 4, 2021

Also it's been noted that these instructions differ from whats in the proposal 37 cc @zmanian . Presumably the instructions here should be canonical ?

I actually did find this difference: #608 with using --initial-height - any other difference you can see?

@marcotradenet
Copy link

I actually did find this difference: #608 with using --initial-height - any other difference you can see?

RAM amount requirement (16 gb): no reference about that in the official documentation.

@tony-iqlusion
Copy link
Member

@marcotradenet there are TMKMS upgrade instructions in its CHANGELOG: https://github.com/iqlusioninc/tmkms/blob/main/CHANGELOG.md#0100-unreleased

@marcotradenet
Copy link

@marcotradenet there are TMKMS upgrade instructions in its CHANGELOG: https://github.com/iqlusioninc/tmkms/blob/main/CHANGELOG.md#0100-unreleased

Ok, but there is no reference to those instructions on https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-3.md.
Also nowhere is it mentioned to move or delete the state file indicated in the state_file parameter.
When you unsafe-reset-all with gaiad the file priv_validator_state.json is taken to its initial state, but if you use tmkms I think the operation must be done where the tmkms service is running.
However maybe I'm writing things that everyone already knows or not correct 😄

@tony-iqlusion
Copy link
Member

tony-iqlusion commented Feb 12, 2021

Yes, the instructions should also note the state file name should be changed to reflect the new chain ID.

Do NOT move or delete the original TMKMS cosmoshub-3 state file: if rollback is required, the original state file should still be around, otherwise you're at risk of double signing.

@toschdev
Copy link
Contributor Author

Yes, the instructions should also note the state file name should be changed to reflect the new chain ID.

Do NOT move or delete the original TMKMS cosmoshub-3 state file: if rollback is required, the original state file should still be around, otherwise you're at risk of double signing.

Thanks @tony-iqlusion
Would you mind creating a PR against the instructions with a step-by-step guide on the upgrade with tmkms?

@tony-iqlusion
Copy link
Member

TMKMS v0.10.0 is out. You can view the release notes here:

iqlusioninc/tmkms#300

Feel free to ask any questions related to the upgrade in the comments section of that PR.

@marcotradenet
Copy link

marcotradenet commented Feb 17, 2021

At point 7. on https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-3.md the commit hash seems wrong: it should be a279d091c6f66f8a91c87943139ebaecdd84f689 as reported on the releases page https://github.com/cosmos/gaia/releases.

At point 3. instructions are

mv ~/.gaiad ./gaiad_backup

but in at point 4. are

cat ~/.gaiad/config/data/priv_validator_state.json | jq '.height'
gaiad export --for-zero-height --height=<height> > cosmoshub_3_genesis_export.json

I think the right commands should be

cat ~/gaiad_backup/config/data/priv_validator_state.json | jq '.height'
gaiad export --for-zero-height --height=<height> --home=~/gaiad_backup  > cosmoshub_3_genesis_export.json

or invert point 3 with point 4

At point 4.

cat ~/.gaiad/config/data/priv_validator_state.json | jq '.height'

should be

cat ~/.gaiad/data/priv_validator_state.json | jq '.height'

alessio pushed a commit that referenced this pull request Feb 17, 2021
* Adding stub for migration guide (#586)

* Update Github actions pattern filter for go files, go.mod, and go.sum

* Updating changelog for v4

* Added PR link to changelog line item

* update discord link (#596)

* Fix Discord Links (#599)

* Update config.js

* Update overview.md

* Update README.md (#603)

Update Github license badge to branch `main` instead of former `master`

* Upgrade descriptions for cosmoshub-3 (#585)

* Upgrade descriptions for cosmoshub-3

* Remove any blockheight, since it is not known

* Add steps for the upgrade and more info around service providers

* Add info on backup

* Add info about x-crisis-skipp-assert-invariants

* Update to gaia v2.0.15

* Add grpc and state sync settings to the upgrade guide

* Replace unsafe-reset-all with init

* Use unsafe-reset-all, info about genesis hash value

* Fix repo name in license file (#604)

* Remove circleci (#597)

* ci: remove circleci

* Adding localnet sim to github action

* Remove file filter temporarily

* Re-enable file filter for action trigger

* Remove commented lines

* Linking file filter to actions

* Update .gaia directory and fixed timestamp for migrate (#607)

* Update .gaia directory and fixed timestamp for migrate

* Optimise readability in migrate step

* Add comment on new created genesis

* Adding resources to migration guide (#605)

* docs: deploy gh pages (#541)

* deploy docs to gh pages

* change base

* remove circle

* Update .github/workflows/docs.yml

* remove prefix

* push on main (#609)

* Cosmoshub 3 upgrade genesis initial height (#608)

* Change genesis timestamp to initial height

* Remove further explanation on time with initial height

* Removing dup liveness-test; was implemented in (#597) (#611)

* Bump github.com/tendermint/tm-db from 0.6.3 to 0.6.4 (#616)

* Bump github.com/tendermint/tm-db from 0.6.3 to 0.6.4

Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/tendermint/tm-db/releases)
- [Changelog](https://github.com/tendermint/tm-db/blob/master/CHANGELOG.md)
- [Commits](tendermint/tm-db@v0.6.3...v0.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* go.sum

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* Bump github.com/spf13/cobra from 1.1.1 to 1.1.2 (#617)

* Bump github.com/spf13/cobra from 1.1.1 to 1.1.2

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](spf13/cobra@v1.1.1...v1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* go.sum

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* 100 validators to 125 validators (#618)

* 100 validators to 125 validators

* Update validator-faq.md

* Update validator-faq.md

* Update validator-faq.md

* Update validator-faq.md

* Update delegator-faq.md

* Update overview.md

* Update validator-setup.md

* Updates to release process (#588)

* Initial commit of updates

* Adding new RELEASING.md file

* Update contact info in COC

* Adding info on tag deletion, fixed reproducible build cmd

* Update .github/CODEOWNERS

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* Add missing breaking changes file (#625)

* Add missing breaking changes file

* Update docs/migration/breaking_changes.md

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Bump github.com/tendermint/tendermint from 0.34.3 to 0.34.4 (#622)

* Bump github.com/tendermint/tendermint from 0.34.3 to 0.34.4

Bumps [github.com/tendermint/tendermint](https://github.com/tendermint/tendermint) from 0.34.3 to 0.34.4.
- [Release notes](https://github.com/tendermint/tendermint/releases)
- [Changelog](https://github.com/tendermint/tendermint/blob/v0.34.4/CHANGELOG.md)
- [Commits](tendermint/tendermint@v0.34.3...v0.34.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* go.sum

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* Add memory hardware requirements to the upgrade guide (#621)

* Bump github.com/spf13/cobra from 1.1.2 to 1.1.3 (#619)

* Bump github.com/spf13/cobra from 1.1.2 to 1.1.3

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](spf13/cobra@v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* go.sum

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Shahan Khatchadourian <shahan.k.code@gmail.com>

* remove version (#630)

* Add summary, pathways, full node operator guidance (#631)

* Applying fixes (#632)

* Create Cosmos Hub3 upgrade Instructions on ES_es (#613)

* Create Cosmos Hub3 upgrade Instructions on ES_es

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update docs/migration/cosmoshub-3[ES_es].md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update Cosmoshub-3 

Fedekunze's translation suggestions added.
Check (https://github.com/cosmos/gaia/pull/613#discussion_r573697546)[https://github.com/cosmos/gaia/pull/613#discussion_r573697546]

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* FIX: typo (#633)

* Depend on cosmos-sdk v0.41.1 (#635)

* FIX v4.0.0 hash (#634)

Co-authored-by: Jelena647 <34727326+Jelena647@users.noreply.github.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Tobias Schwarz <tobias@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: wimel <wimeleth85@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Nicolas Pinto <nicolas.pinto@gmail.com>
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

Successfully merging this pull request may close these issues.

Stargate Migration Guide
8 participants