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

docs: re-arrange and clarify migration docs #15575

Merged
merged 10 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ ways in stable releases and `main` branch.

### Migrations

To smoothen the update to the latest stable release, the SDK includes a set of CLI commands for managing migrations between SDK versions, under the `migrate` subcommand. Only migration scripts between stable releases are included. For the current major release, and later, migrations are supported.
See the SDK's policy on migrations [here](https://docs.cosmos.network/main/migrations/intro).

### What qualifies as a Stable Release Update (SRU)

Expand Down
10 changes: 5 additions & 5 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ This is no longer the case, the assertion has been loosened to only require modu

The following modules `NewKeeper` function now take a `KVStoreService` instead of a `StoreKey`:

- `x/auth`
- `x/consensus`
* `x/auth`
* `x/consensus`

When not using depinject, the `runtime.NewKVStoreService` method can be used to create a `KVStoreService` from a `StoreKey`:

```diff
- app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String())
+ app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(
app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]),
+ keys[consensusparamtypes.StoreKey]
+ runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
```
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ docs/docs/tooling/02-depinject.md
docs/docs/tooling/03-confix.md
docs/docs/tooling/04-hubl.md
docs/run-node/04-rosetta.md
docs/migrations/02-upgrading.md

# Misc
.DS_Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
sidebar_position: 1
---

# Pre-Upgrade Handling
# Migrations
Copy link
Member Author

Choose a reason for hiding this comment

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

Put the migrations to perform by a chain under building-apps, what do you think?
Then the migration, more SDK related is under the migration section.
I think it makes sense, but curious about your input.


:::note
This document describes how to upgrade your application. If you are looking specifically for the changes to perform between SDK versions, see the [SDK migrations documentation](https://docs.cosmos.network/main/migrations/intro)
:::

## Pre-Upgrade Handling

Cosmovisor supports custom pre-upgrade handling. Use pre-upgrade handling when you need to implement application config changes that are required in the newer version before you perform the upgrade.

Expand Down
14 changes: 9 additions & 5 deletions docs/docs/migrations/00-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
sidebar_position: 1
---

# Introduction to Migrations
# SDK Migrations

This document contains all the migration guides to update your app and modules to the current Cosmos SDK.
To smoothen the update to the latest stable release, the SDK includes a CLI command for hard-fork migrations (under the `<appd> genesis migrate` subcommand).
Additionally, the SDK includes in-place migrations for its core modules. These in-place migrations are useful to migrate between major releases.

1. Chain Upgrade Guide to v0.47:
* See [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/UPGRADING.md) for breaking changes and deprecations upgrade instructions.
* See [Release Notes](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/RELEASE_NOTES.md) and [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/CHANGELOG.md) for the exhaustive list of API and State Machine breaking changes.
* Hard-fork migrations are supported from the last major release to the current one.
* In-place module migrations are supported from the two last major releases to the current one.

Migration from a version older than the two last major releases is not supported.

When migrating from a previous version, refer to the `UPGRADING.md` and the `CHANGELOG` of the version you are migrating to.
2 changes: 1 addition & 1 deletion docs/docs/migrations/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "Migrations",
"label": "SDK Migrations",
"position": 6,
"link": null
}
1 change: 1 addition & 0 deletions docs/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ rm -rf docs/run-node/04-rosetta.md
rm -rf docs/architecture
rm -rf docs/spec
rm -rf docs/rfc
rm -rf docs/migrations/02-upgrading.md
rm -rf versioned_docs versioned_sidebars versions.json
5 changes: 4 additions & 1 deletion docs/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ cp -r ./architecture ./docs
cp -r ./spec ./docs

## Add rfc documentation
cp -r ./rfc ./docs
cp -r ./rfc ./docs

## Add SDK migration documentation
cp -r ../UPGRADING.md ./docs/migrations/02-upgrading.md
Copy link
Member Author

@julienrbrt julienrbrt Mar 28, 2023

Choose a reason for hiding this comment

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

This will render the UPGRADING.md directly on the website.