-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Docs update #4176
Merged
+257
−131
Merged
Docs update #4176
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
udate upgrade node doc
- Loading branch information
commit dcdd5973502169b2453df241d2e56a4c5b631159
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
# Upgrade Your Node | ||
|
||
<<<<<<< HEAD | ||
This document describes the upgrade procedure of a `gaiad` full-node from a version <current_version> to a version <new_version>. | ||
======= | ||
::: warning | ||
The detailed procedure to upgrade a mainnet node from `cosmoshub-1` to `cosmoshub-2` can be found [here](https://gist.github.com/alexanderbez/5e87886221eb304b9e85ad4b167c99c8). | ||
::: | ||
|
||
This document describes the upgrade procedure of a `gaiad` full-node to a new version. | ||
>>>>>>> 0a51d56e902f6629f92470c1d303b6cb293b596b | ||
This document describes the upgrade procedure of a `gaiad` full-node to a new version. | ||
|
||
## Software Upgrade | ||
|
||
|
@@ -28,44 +20,48 @@ See the [testnet repo](https://github.com/cosmos/testnets) for details on which | |
|
||
Your full node has been cleanly upgraded! | ||
|
||
## Fetch new genesis | ||
## Ugrade Genesis File | ||
|
||
:::warning | ||
If the new version you are upgrading to has breaking changes, you will have to restart your chain. If it is not breaking, you can skip to [Restart](#restart) | ||
::: | ||
|
||
The procedure varies depending on the network you want to connect to. | ||
|
||
### Mainnet | ||
To upgrade the genesis file, you can either fetch it from a trusted source or export it locally. | ||
|
||
Follow the [official upgrade guide](https://gist.github.com/alexanderbez/5e87886221eb304b9e85ad4b167c99c8). | ||
### Fetching from a Trusted Source | ||
|
||
### Public Testnet | ||
If you are joining the mainnet, fetch the genesis from the [mainnet repo](https://github.com/cosmos/launc). If you are joining a public testnet, fetch the genesis from the appropriate testnet in the [testnet repo](https://github.com/cosmos/testnets). Otherwise, fetch it from your trusted source. | ||
|
||
If you are joining a new public testnet, fetch the genesis from the appropriate testnet in the [testnet repo](https://github.com/cosmos/testnets). Save the new genesis as `new_genesis.json`. Then replace the old `genesis.json` with `new_genesis.json` | ||
Save the new genesis as `new_genesis.json`. Then replace the old `genesis.json` with `new_genesis.json` | ||
|
||
```bash | ||
cd $HOME/.gaiad/config | ||
cp -f genesis.json new-_enesis.json | ||
mv new_genesis.json genesis.json | ||
``` | ||
|
||
### Local Testnet | ||
Then, go to the [reset data](#reset-data) section. | ||
|
||
If you are running your own local testnet, you can either start with a brand new genesis using `gaiad init`, or export the state from you previous network as a new genesis. To do so, use the following command | ||
### Exporting State to a New Genesis Locally | ||
|
||
If you were running a node in the previous version of the network and want to build your new genesis locally from a state of this previous network, use the following command: | ||
|
||
```bash | ||
cd $HOME/.gaiad/config | ||
gaiad export --for-zero-height --height=<export-height> > new_genesis.json | ||
``` | ||
|
||
The command above take a state at a certain height `<export-height>` and turns it into a new genesis file that can be used to start a new network. | ||
|
||
Then, replace the old `genesis.json` with `new_genesis.json`. | ||
|
||
```bash | ||
cp -f genesis.json new-_enesis.json | ||
mv new_genesis.json genesis.json | ||
``` | ||
|
||
At this point, you might want to run a script to update the exported genesis into a genesis that is compatible with your new version. For example, the attributes of a the `Account` type changed, a script should query encoded account from the account store, unmarshall them, update their type, re-marhsall and re-store them. You can find an example of such script [here](https://github.com/cosmos/cosmos-sdk/blob/develop/contrib/export/v0.33.x-to-v0.34.0.py). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will update |
||
|
||
## Reset Data | ||
|
||
:::warning | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this guide needs a rethink and shouldn't block the rest of this PR. This should be a doc that describes the process for upgrading a network generically and explains each of the steps. This guide kinda jumps in at the mainnet upgrade and then has that content in less detail at the bottom of the doc.