Skip to content

Commit

Permalink
chore: package release prep + update UPGRADING.md (#22864)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Dec 16, 2024
1 parent 5761530 commit 8ff9f48
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 36 deletions.
55 changes: 30 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

The Cosmos SDK is a framework for building blockchain applications. [CometBFT (BFT Consensus)](https://github.com/cometbft/cometbft) and the Cosmos SDK are written in the Go programming language. Cosmos SDK is used to build [Gaia](https://github.com/cosmos/gaia), the implementation of the Cosmos Hub.

**WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some breaking changes.

**Note**: Always use the latest maintained [Go](https://go.dev/dl) version for building Cosmos SDK applications.

## Quick Start
Expand Down Expand Up @@ -64,16 +62,23 @@ The IBC module for the Cosmos SDK has its own [cosmos/ibc-go repository](https:/

The version matrix below shows which versions of the Cosmos SDK, modules and libraries are compatible with each other.

> [!IMPORTANT]
> Cosmos SDK `v2` corresponds to a chain using the `runtime/v2`, `server/v2/**`, and `store/v2` packages. The `github.com/cosmos/cosmos-sdk` module has a less important role in a `v2` chain.
#### Core Dependencies

Core dependencies are the core libraries that an application may depend on.
Core dependencies not mentioned here as compatible across all maintained SDK versions.
See an exhaustive list of core dependencies at [cosmossdk.io](https://cosmossdk.io).

| Cosmos SDK | cosmossdk.io/core | cosmossdk.io/api | cosmossdk.io/x/tx |
| ---------- | ----------------- | ---------------- | ----------------- |
| 0.52.z | 1.y.z | 0.8.z | 1.y.z |
| 0.50.z | 0.11.z | 0.7.z | 0.13.z |
| 0.47.z | 0.5.z | 0.3.z | N/A |
| Version | v2 | 0.52.z | 0.50.z | 0.47.z |
| ------------------------ | ----- | --------- | -------------- | ------- |
| cosmossdk.io/core | 1.y.z | 1.y.z | 0.11.z | 0.5.z |
| cosmossdk.io/api | 0.8.z | 0.8.z | 0.7.z | 0.3.z |
| cosmossdk.io/x/tx | 1.y.z | 1.y.z | < 1.y.z | N/A |
| cosmossdk.io/store | N/A | >= 1.10.z | 1.0.0 >= 1.9.z | N/A |
| cosmossdk.io/store/v2 | 2.y.z | N/A | N/A | N/A |
| cosmossdk.io/collections | 1.y.z | 1.y.z | < 1.y.z | < 1.y.z |

#### Module Dependencies

Expand All @@ -83,24 +88,24 @@ Module Dependencies are the modules that an application may depend on and which
> X signals that the module was not spun out into its own go.mod file.
> N/A signals that the module was not available in the Cosmos SDK at that time.
| Cosmos SDK | 0.50.z | 0.52.z |
| --------------------------- | ------ | ------ |
| cosmossdk.io/x/accounts | N/A | 0.2.z |
| cosmossdk.io/x/bank | X | 0.2.z |
| cosmossdk.io/x/circuit | 0.1.z | 0.2.z |
| cosmossdk.io/x/consensus | X | 0.2.z |
| cosmossdk.io/x/distribution | X | 0.2.z |
| cosmossdk.io/x/epochs | N/A | 0.2.z |
| cosmossdk.io/x/evidence | 0.1.z | 0.2.z |
| cosmossdk.io/x/feegrant | 0.1.z | 0.2.z |
| cosmossdk.io/x/gov | X | 0.2.z |
| cosmossdk.io/x/group | X | 0.2.z |
| cosmossdk.io/x/mint | X | 0.2.z |
| cosmossdk.io/x/nft | 0.1.z | 0.2.z |
| cosmossdk.io/x/protocolpool | N/A | 0.2.z |
| cosmossdk.io/x/slashing | X | 0.2.z |
| cosmossdk.io/x/staking | X | 0.2.z |
| cosmossdk.io/x/upgrade | 0.1.z | 0.2.z |
| Cosmos SDK | v2 | 0.52.z | 0.50.z |
| --------------------------- | ----- | ------ | ------ |
| cosmossdk.io/x/accounts | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/bank | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/circuit | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/consensus | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/distribution | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/epochs | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/evidence | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/feegrant | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/gov | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/group | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/mint | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/nft | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/protocolpool | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/slashing | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/staking | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/upgrade | 0.2.z | 0.2.z | 0.1.z |

## Disambiguation

Expand Down
8 changes: 7 additions & 1 deletion RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ Those modules can be considered as part of the Cosmos SDK, but features and impr
* When a module is supposed to be used in an app (e.g `x/` modules), due to the dependency on the SDK, tagging a new version of a module must be done from a Cosmos SDK release branch. A compatibility matrix must be provided in the `README.md` of that module with the corresponding versions.
* Modules that import the SDK but do not need to be imported in an app (`e.g. cosmovisor`) must be released from the `main` branch and follow the process defined below.

> [!IMPORTANT]
> A module depending on a non stabilized version of `github.com/cosmos/cosmos-sdk` (any version prior to the removal of baseapp, runtime, server) SHOULD NOT be tagged following semver.
> For instance, modules are still using 0ver until the main `github.com/cosmos/cosmos-sdk` has stabilized.
### Modules that do not depend on the Cosmos SDK

Modules that do not depend on the Cosmos SDK can be released at any time from the `main` branch of the Cosmos SDK repository.
Expand All @@ -246,7 +250,9 @@ The Cosmos SDK uses a monorepo structure with multiple Go modules. Some componen

Here's the strategy for managing this structure:

All modules that do not depend on the Cosmos SDK and tagged from main in a release branch must be removed from the release branch.
All modules that do not depend on the Cosmos SDK and tagged from main in a release branch **must be removed from the release branch**.

There are two exceptions to this rule, due to the stabilization of core v1: `cosmossdk.io/x/tx` and `cosmossdk.io/store` are still tagged from the `release/v0.50.x` branch for `v0.50.x` releases.

### Rationale

Expand Down
14 changes: 14 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,16 @@ This change was made to allow legacy proposals to be compatible with server/v2.
If you wish to migrate to server/v2, you should update your proposal handler to take in a `context.Context` and use services.
On the other hand, if you wish to keep using baseapp, simply unwrap the sdk context in your proposal handler.

#### `x/mint`

The `x/mint` module has been updated to work with a mint function [`MintFn`](https://docs.cosmos.network/v0.52/build/modules/mint#mintfn).

When using the default inflation calculation function and runtime, no change is required. The depinject configuration of mint automatically sets it if none is provided. However, when not using runtime, the mint function must be set in on the mint keeper:

```diff
+ mintKeeper.SetMintFn(keeper.DefaultMintFn(types.DefaultInflationCalculationFn, stakingKeeper, mintKeeper))
```

#### `x/protocolpool`

Introducing a new `x/protocolpool` module to handle community pool funds. Its store must be added while upgrading to v0.52.x.
Expand Down Expand Up @@ -532,6 +542,10 @@ storetypes.StoreUpgrades{
Introducing `x/validate` a module that is solely used for registering default ante/post handlers and global tx validators when using runtime and runtime/v2. If you wish to set your custom ante/post handlers, no need to use this module.
You can however always extend them by adding extra tx validators (see `x/validate` documentation).

#### `tools/benchmark`

Introducing [`tools/benchmark`](https://github.com/cosmos/cosmos-sdk/tree/main/tools/benchmark) a Cosmos SDK module for benchmarking your chain. It is a standalone module that can be added to your chain to stress test it. This module should NOT be added in a production environment.

## [v0.50.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0-alpha.0)

### Migration to CometBFT (Part 2)
Expand Down
2 changes: 2 additions & 0 deletions collections/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

## [v1.0.0](https://github.com/cosmos/cosmos-sdk/releases/tag/collections%2Fv1.0.0)

### Features

* [#22641](https://github.com/cosmos/cosmos-sdk/pull/22641) Add reverse iterator support for `Triple`.
Expand Down
3 changes: 3 additions & 0 deletions core/testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

## [v0.0.1](https://github.com/cosmos/cosmos-sdk/releases/tag/core/testing%2Fv0.0.1)

* Initial tag.
2 changes: 2 additions & 0 deletions docs/build/building-modules/00-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ While there are no definitive guidelines for writing modules, here are some impo
The SDK provides a set of APIs that a module can implement, and a set of services that a module can use.
Those APIs are defined in the `cosmossdk.io/core/appmodule` package, and are used to defined the module capabilities, which is used by `runtime` during the wiring of the application.

Whenever possible, a module should strive to use only the core APIs (`cosmossdk.io/core`) and not import the `github.com/cosmos/cosmos-sdk` module. This makes modules reusable accross SDK versions and reduces the risk of breaking changes.

Learn more about the core APIs for modules [here](../../learn/advanced/02-core.md).

## Main Components of Cosmos SDK Modules
Expand Down
4 changes: 4 additions & 0 deletions schema/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
# Changelog

## [Unreleased]

## [v1.0.0](https://github.com/cosmos/cosmos-sdk/releases/tag/schema%2Fv1.0.0)

Introduce `cosmossdk.io/schema` module.
21 changes: 18 additions & 3 deletions store/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,31 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

> **Disclaimer**: Numbers from v1.0.x to v1.9.x are reserved for the v0.50 line.
> cosmossdk.io/store compatible with the v0.50 line is tagged from release/v0.50.x
> Numbers from v1.10.x onwards are reserved for the 0.52+ line.
> With Cosmos SDK v2 (with store/v2), CometBFT has been pushed to the boundaries, so issues like this
> are not expected to happen again.
## [Unreleased]

## v1.10.0 (December 13, 2024)

### Improvements

* (store) [#22305](https://github.com/cosmos/cosmos-sdk/pull/22305) Add `LatestVersion` to the `Committer` interface to get the latest version of the store.
* [#22305](https://github.com/cosmos/cosmos-sdk/pull/22305) Add `LatestVersion` to the `Committer` interface to get the latest version of the store.
* Upgrade IAVL to IAVL v1.3.x.

### Bug Fixes

* (store) [#20425](https://github.com/cosmos/cosmos-sdk/pull/20425) Fix nil pointer panic when query historical state where a new store don't exist.
* (store) [#20644](https://github.com/cosmos/cosmos-sdk/pull/20644) Avoid nil error on not exhausted payload stream.
* [#20425](https://github.com/cosmos/cosmos-sdk/pull/20425) Fix nil pointer panic when query historical state where a new store don't exist.
* [#20644](https://github.com/cosmos/cosmos-sdk/pull/20644) Avoid nil error on not exhausted payload stream.

## v1.1.1 (September 06, 2024)

### Improvements

* [#21574](https://github.com/cosmos/cosmos-sdk/pull/21574) Upgrade IAVL to IAVL 1.2.0.

## v1.1.0 (March 20, 2024)

Expand Down
6 changes: 0 additions & 6 deletions x/group/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ require (
cosmossdk.io/math v1.4.0
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
cosmossdk.io/x/accounts v0.0.0-20240913065641-0064ccbce64e
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
Expand Down Expand Up @@ -187,13 +186,8 @@ replace (
cosmossdk.io/client/v2 => ../../client/v2
cosmossdk.io/store => ../../store
cosmossdk.io/x/accounts => ../accounts
cosmossdk.io/x/accounts/defaults/base => ../accounts/defaults/base
cosmossdk.io/x/accounts/defaults/lockup => ../accounts/defaults/lockup
cosmossdk.io/x/accounts/defaults/multisig => ../accounts/defaults/multisig
cosmossdk.io/x/authz => ../authz
cosmossdk.io/x/bank => ../bank
cosmossdk.io/x/consensus => ../consensus
cosmossdk.io/x/distribution => ../distribution
cosmossdk.io/x/epochs => ../epochs
cosmossdk.io/x/gov => ../gov
cosmossdk.io/x/mint => ../mint
Expand Down
1 change: 0 additions & 1 deletion x/group/testutil/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package testutil

import (
_ "cosmossdk.io/x/accounts" // import as blank for app wiring
_ "cosmossdk.io/x/authz" // import as blank for app wiring
_ "cosmossdk.io/x/bank" // import as blank for app wiring
_ "cosmossdk.io/x/consensus" // import as blank for app wiring
_ "cosmossdk.io/x/group/module" // import as blank for app wiring
Expand Down

0 comments on commit 8ff9f48

Please sign in to comment.