docs: update cometbft migration docs (#15085)

This commit is contained in:
Julien Robert 2023-02-20 16:29:35 +01:00 committed by GitHub
parent 96876f8e01
commit 67f04e6296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,12 +4,12 @@ This guide provides instructions for upgrading to specific versions of Cosmos SD
## [Unreleased]
### Consensus Engine
### Migration to CometBFT (Part 2)
The Cosmos SDK has migrated to CometBFT as its default consensus engine.
CometBFT is an implementation of the Tendermint consensus algorithm, and the successor of Tendermint Core.
Due to the import changes, this is a breaking change that needs chains to re-generate their protos.
Some functions have been renamed to reflect the naming change, following an exhaustive list:
The Cosmos SDK has migrated in, its previous versions, to CometBFT.
Some functions have been renamed to reflect the naming change.
Following an exhaustive list:
* `client.TendermintRPC` -> `client.CometRPC`
* `clitestutil.MockTendermintRPC` -> `clitestutil.MockCometRPC`
@ -41,8 +41,6 @@ Use `confix` to clean-up your `app.toml`. A nginx (or alike) reverse-proxy can b
ClevelDB, BoltDB and BadgerDB are not supported anymore. To migrate from a unsupported database to a supported database please use the database migration tool.
<!-- TODO: write database migration tool -->
#### GoLevelDB
GoLevelDB version has been pinned to `v1.0.1-0.20210819022825-2ae1ddf74ef7`, following versions might cause unexpected behavior.
@ -126,6 +124,20 @@ All the upgrade imports are now renamed to use `cosmossdk.io/x/upgrade` instead
## [v0.47.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0)
### Migration to CometBFT (Part 1)
The Cosmos SDK has migrated to CometBFT, as its default consensus engine.
CometBFT is an implementation of the Tendermint consensus algorithm, and the successor of Tendermint Core.
Due to the import changes, this is a breaking change. Chains need to remove **entierely** their imports of Tendermint Core in their codebase, from direct and indirects imports in their `go.mod`.
* Replace `github.com/tendermint/tendermint` by `github.com/cometbft/cometbft`
* Replace `github.com/tendermint/tm-db` by `github.com/cometbft/cometbft-db`
* Verify `github.com/tendermint/tendermint` is not an indirect or direct dependency
* Run `make proto-gen`
Other than that, the migration should be seamless.
On the SDK side, clean-up of variables, functions to reflect the new name will only happen from v0.48 (part 2).
### Simulation
Remove `RandomizedParams` from `AppModuleSimulation` interface. Previously, it used to generate random parameter changes during simulations, however, it does so through ParamChangeProposal which is now legacy. Since all modules were migrated, we can now safely remove this from `AppModuleSimulation` interface.