Skip to content

Commit

Permalink
chore: readmes + upgrading docs (#21271)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Aug 15, 2024
1 parent 1cb2336 commit 858ec2f
Show file tree
Hide file tree
Showing 6 changed files with 177 additions and 127 deletions.
189 changes: 102 additions & 87 deletions CHANGELOG.md

Large diffs are not rendered by default.

59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,41 +66,42 @@ The version matrix below shows which versions of the Cosmos SDK, modules and lib

#### Core Dependencies

Core Dependencies are the core libraries that an application may depend on.
Core dependencies are the core libraries that an application may depend on.
Core dependencies not mentionned here as compatible across all maintained SDK versions.

> Note: the ❌ signals that the version of the Cosmos SDK does not need to import the dependency.
| Cosmos SDK | cosmossdk.io/core | cosmossdk.io/api | cosmossdk.io/math | cosmossdk.io/errors | cosmossdk.io/depinject | cosmossdk.io/log | cosmossdk.io/store |
| ---------- | ----------------- | ---------------- | ----------------- | ------------------- | ---------------------- | ---------------- | ------------------ |
| 0.50.z | 0.11.z | 0.7.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z |
| 0.47.z | 0.5.z | 0.3.z | 1.y.z | 1.y.z | 1.y.z | 1.y.z ||
| 0.46.z ||| 1.y.z | 1.y.z ||||
| Cosmos SDK | cosmossdk.io/core | cosmossdk.io/api | cosmossdk.io/x/tx |
| ---------- | ----------------- | ---------------- | ----------------- |
| 0.52.z | 1.y.z | 0.8.z | 0.14.z |
| 0.50.z | 0.11.z | 0.7.z | 0.13.z |
| 0.47.z | 0.5.z | 0.3.z | N/A |

#### Module Dependencies

Module Dependencies are the modules that an application may depend on and which version of the Cosmos SDK they are compatible with.

> Note: The version table only goes back to 0.50.x, this is due to the reason that modules were not spun out into their own go.mods until 0.50.z. ❌ signals that the module was not spun out into its own go.mod file.
| Cosmos SDK | 0.50.z | 0.y.z |
| --------------------------- | --------- | ----- |
| cosmossdk.io/x/auth || |
| cosmossdk.io/x/accounts || |
| cosmossdk.io/x/bank || |
| cosmossdk.io/x/circuit | 0.1.z | |
| cosmossdk.io/x/consensus || |
| cosmossdk.io/x/distribution || |
| cosmossdk.io/x/evidence | 0.1.z | |
| cosmossdk.io/x/feegrant | 0.1.z | |
| cosmossdk.io/x/gov || |
| cosmossdk.io/x/group || |
| cosmossdk.io/x/mint || |
| cosmossdk.io/x/nft | 0.1.z | |
| cosmossdk.io/x/protcolpool || |
| cosmossdk.io/x/slashing || |
| cosmossdk.io/x/staking || |
| cosmossdk.io/x/tx | =< 0.13.z | |
| cosmossdk.io/x/upgrade | 0.1.z | |
> Note: The version table only goes back to 0.50.x, as modules started to become modular with 0.50.z.
> 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/auth | X | 0.2.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 |

## Disambiguation

Expand Down
24 changes: 21 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ messages, while maintaining the default behavior for other message types.

Here is an example on how `SetIncludeNestedMsgsGas` option could be set to calculate the gas of a gov proposal
nested messages:

```go
baseAppOptions = append(baseAppOptions, baseapp.SetIncludeNestedMsgsGas([]sdk.Message{&gov.MsgSubmitProposal{}}))
// ...
app.App = appBuilder.Build(db, traceStore, baseAppOptions...)
```

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

Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.
It is additional to the changes described here.

### SimApp

In this section we describe the changes made in Cosmos SDK' SimApp.
Expand Down Expand Up @@ -182,8 +188,7 @@ for more details.
### Depinject `app_config.go` / `app.yml`

With the introduction of [environment in modules](#core-api), depinject automatically creates the environment for all modules.
Learn more about environment [here](https://example.com) <!-- TODO -->. Given the fields of environment, this means runtime creates a kv store service for all modules by default.
It can happen that some modules do not have a store necessary (such as `x/auth/tx` for instance). In this case, the store creation should be skipped in `app_config.go`:
Learn more about environment [here](https://example.com) <!-- TODO -->. Given the fields of environment, this means runtime creates a kv store service for all modules by default. It can happen that some modules do not have a store necessary (such as `x/auth/tx` for instance). In this case, the store creation should be skipped in `app_config.go`:

```diff
InitGenesis: []string{
Expand All @@ -203,7 +208,20 @@ There is no longer a need for the Cosmos SDK to host these protos for itself and
That package containing proto v2 generated code, but the SDK now uses [buf generated go SDK instead](https://buf.build/docs/bsr/generated-sdks/go).
If you were depending on `cosmossdk.io/api/tendermint`, please use the buf generated go SDK instead, or ask CometBFT host the generated proto v2 code.

The `codectypes.Any` has moved to `github.com/cosmos/gogoproto/types/any`. Module developers need to update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for directly mapping the`Any` type to its new location. This change is optional, but recommended, as `codectypes.Any` is aliased to `gogoproto.Any` in the SDK.
The `codectypes.Any` has moved to `github.com/cosmos/gogoproto/types/any`. Module developers need to update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for directly mapping the`Any` type to its new location:

```diff
version: v1
plugins:
- name: gocosmos
out: ..
- opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm
+ opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any,Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm
- name: grpc-gateway
out: ..
opt: logtostderr=true,allow_colon_final_segments=true

```

Also, any usages of the interfaces `AnyUnpacker` and `UnpackInterfacesMessage` must be replaced with the interfaces of the same name in the `github.com/cosmos/gogoproto/types/any` package.

Expand Down
11 changes: 6 additions & 5 deletions collections/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

* [#19343](https://github.com/cosmos/cosmos-sdk/pull/19343) Simplify IndexedMap creation by allowing to infer indexes through reflection.
* [#18933](https://github.com/cosmos/cosmos-sdk/pull/18933) Add LookupMap implementation. It is basic wrapping of the standard Map methods but is not iterable.
* [#17656](https://github.com/cosmos/cosmos-sdk/pull/17656) Introduces `Vec`, a collection type that allows to represent a growable array on top of a KVStore.
* [#17656](https://github.com/cosmos/cosmos-sdk/pull/17656) Introduces `Vec`, a collection type that allows to represent a growable array on top of a KVStore.
* [#18933](https://github.com/cosmos/cosmos-sdk/pull/18933) Add LookupMap implementation. It is basic wrapping of the standard Map methods but is not iterable.
* [#19343](https://github.com/cosmos/cosmos-sdk/pull/19343) Simplify IndexedMap creation by allowing to infer indexes through reflection.
* [#19861](https://github.com/cosmos/cosmos-sdk/pull/19861) Add `NewJSONValueCodec` value codec as an alternative for `codec.CollValue` from the SDK for non protobuf types.
* [#21090](https://github.com/cosmos/cosmos-sdk/pull/21090) Introduces `Quad`, a composite key with four keys.

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

Expand All @@ -58,8 +59,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

* [#16074](https://github.com/cosmos/cosmos-sdk/pull/16607) Introduces `Clear` method for `Map` and `KeySet`
* [#16773](https://github.com/cosmos/cosmos-sdk/pull/16773)
* Adds `AltValueCodec` which provides a way to decode a value in two ways.
* Adds the possibility to specify an alternative way to decode the values of `KeySet`, `indexes.Multi`, `indexes.ReversePair`.
* Adds `AltValueCodec` which provides a way to decode a value in two ways.
* Adds the possibility to specify an alternative way to decode the values of `KeySet`, `indexes.Multi`, `indexes.ReversePair`.

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

Expand Down
7 changes: 4 additions & 3 deletions tools/confix/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Features
* [#21052](https://github.com/cosmos/cosmos-sdk/pull/21052) Add a migration to v2 config.

* (confix) [#21202](https://github.com/cosmos/cosmos-sdk/pull/21202) Allow customization of migration `PlanBuilder`.
## [v0.1.2](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.2) - 2024-08-13

* [#21202](https://github.com/cosmos/cosmos-sdk/pull/21202) Allow customization of migration `PlanBuilder`.

## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.1) - 2023-12-11

* [#18496](https://github.com/cosmos/cosmos-sdk/pull/18496) Remove invalid non SDK config from app.toml migration templates.


## [v0.1.0](https://github.com/cosmos/cosmos-sdk/releases/tag/tools/confix/v0.1.0) - 2023-11-07

* [#17904](https://github.com/cosmos/cosmos-sdk/pull/17904) Add `view` command.
Expand Down
14 changes: 14 additions & 0 deletions tools/confix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ An implementation example can be found in `simapp`.

The command will be available as `simd config`.

```tip
Using confix directly in the application can have less features than using it standalone.
This is because confix is versioned with the SDK, while `latest` is the standalone version.
```

### Using Confix Standalone

To use Confix standalone, without having to add it in your application, install it with the following command:
Expand Down Expand Up @@ -136,6 +141,15 @@ confix view ~/.simapp/config/client.toml # views the current app client conf
At each SDK modification of the default configuration, add the default SDK config under `data/v0.XX-app.toml`.
This allows users to use the tool standalone.

### Compatibility

The recommended standalone version is `latest`, which is using the latest development version of the Confix.

| SDK Version | Confix Version |
| ----------- | -------------- |
| v0.50 | v0.1.x |
| v0.52 | v0.2.x |

## Credits

This project is based on the [CometBFT RFC 019](https://github.com/cometbft/cometbft/blob/5013bc3f4a6d64dcc2bf02ccc002ebc9881c62e4/docs/rfc/rfc-019-config-version.md) and their own implementation of [confix](https://github.com/cometbft/cometbft/blob/v0.36.x/scripts/confix/confix.go).

0 comments on commit 858ec2f

Please sign in to comment.