Skip to content

Commit 858ec2f

Browse files
authored
chore: readmes + upgrading docs (#21271)
1 parent 1cb2336 commit 858ec2f

6 files changed

Lines changed: 177 additions & 127 deletions

File tree

CHANGELOG.md

Lines changed: 102 additions & 87 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,41 +66,42 @@ The version matrix below shows which versions of the Cosmos SDK, modules and lib
6666

6767
#### Core Dependencies
6868

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

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

7978
#### Module Dependencies
8079

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

83-
> 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.
84-
85-
| Cosmos SDK | 0.50.z | 0.y.z |
86-
| --------------------------- | --------- | ----- |
87-
| cosmossdk.io/x/auth || |
88-
| cosmossdk.io/x/accounts || |
89-
| cosmossdk.io/x/bank || |
90-
| cosmossdk.io/x/circuit | 0.1.z | |
91-
| cosmossdk.io/x/consensus || |
92-
| cosmossdk.io/x/distribution || |
93-
| cosmossdk.io/x/evidence | 0.1.z | |
94-
| cosmossdk.io/x/feegrant | 0.1.z | |
95-
| cosmossdk.io/x/gov || |
96-
| cosmossdk.io/x/group || |
97-
| cosmossdk.io/x/mint || |
98-
| cosmossdk.io/x/nft | 0.1.z | |
99-
| cosmossdk.io/x/protcolpool || |
100-
| cosmossdk.io/x/slashing || |
101-
| cosmossdk.io/x/staking || |
102-
| cosmossdk.io/x/tx | =< 0.13.z | |
103-
| cosmossdk.io/x/upgrade | 0.1.z | |
82+
> Note: The version table only goes back to 0.50.x, as modules started to become modular with 0.50.z.
83+
> X signals that the module was not spun out into its own go.mod file.
84+
> N/A signals that the module was not available in the Cosmos SDK at that time.
85+
86+
| Cosmos SDK | 0.50.z | 0.52.z |
87+
| --------------------------- | ------ | ------ |
88+
| cosmossdk.io/x/auth | X | 0.2.z |
89+
| cosmossdk.io/x/accounts | N/A | 0.2.z |
90+
| cosmossdk.io/x/bank | X | 0.2.z |
91+
| cosmossdk.io/x/circuit | 0.1.z | 0.2.z |
92+
| cosmossdk.io/x/consensus | X | 0.2.z |
93+
| cosmossdk.io/x/distribution | X | 0.2.z |
94+
| cosmossdk.io/x/epochs | N/A | 0.2.z |
95+
| cosmossdk.io/x/evidence | 0.1.z | 0.2.z |
96+
| cosmossdk.io/x/feegrant | 0.1.z | 0.2.z |
97+
| cosmossdk.io/x/gov | X | 0.2.z |
98+
| cosmossdk.io/x/group | X | 0.2.z |
99+
| cosmossdk.io/x/mint | X | 0.2.z |
100+
| cosmossdk.io/x/nft | 0.1.z | 0.2.z |
101+
| cosmossdk.io/x/protocolpool | N/A | 0.2.z |
102+
| cosmossdk.io/x/slashing | X | 0.2.z |
103+
| cosmossdk.io/x/staking | X | 0.2.z |
104+
| cosmossdk.io/x/upgrade | 0.1.z | 0.2.z |
104105

105106
## Disambiguation
106107

UPGRADING.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ messages, while maintaining the default behavior for other message types.
3232

3333
Here is an example on how `SetIncludeNestedMsgsGas` option could be set to calculate the gas of a gov proposal
3434
nested messages:
35+
3536
```go
3637
baseAppOptions = append(baseAppOptions, baseapp.SetIncludeNestedMsgsGas([]sdk.Message{&gov.MsgSubmitProposal{}}))
3738
// ...
3839
app.App = appBuilder.Build(db, traceStore, baseAppOptions...)
3940
```
4041

42+
## [v0.52.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0-alpha.0)
43+
44+
Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.
45+
It is additional to the changes described here.
46+
4147
### SimApp
4248

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

184190
With the introduction of [environment in modules](#core-api), depinject automatically creates the environment for all modules.
185-
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.
186-
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`:
191+
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`:
187192

188193
```diff
189194
InitGenesis: []string{
@@ -203,7 +208,20 @@ There is no longer a need for the Cosmos SDK to host these protos for itself and
203208
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).
204209
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.
205210

206-
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.
211+
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:
212+
213+
```diff
214+
version: v1
215+
plugins:
216+
- name: gocosmos
217+
out: ..
218+
- opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm
219+
+ opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any,Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm
220+
- name: grpc-gateway
221+
out: ..
222+
opt: logtostderr=true,allow_colon_final_segments=true
223+
224+
```
207225

208226
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.
209227

collections/CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
3333

3434
### Features
3535

36-
* [#19343](https://github.com/cosmos/cosmos-sdk/pull/19343) Simplify IndexedMap creation by allowing to infer indexes through reflection.
37-
* [#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.
38-
* [#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.
36+
* [#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.
37+
* [#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.
38+
* [#19343](https://github.com/cosmos/cosmos-sdk/pull/19343) Simplify IndexedMap creation by allowing to infer indexes through reflection.
3939
* [#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.
40+
* [#21090](https://github.com/cosmos/cosmos-sdk/pull/21090) Introduces `Quad`, a composite key with four keys.
4041

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

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

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

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

tools/confix/CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ Ref: https://keepachangelog.com/en/1.0.0/
3131

3232
## [Unreleased]
3333

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

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

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

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

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

4546
* [#17904](https://github.com/cosmos/cosmos-sdk/pull/17904) Add `view` command.

tools/confix/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ An implementation example can be found in `simapp`.
3939

4040
The command will be available as `simd config`.
4141

42+
```tip
43+
Using confix directly in the application can have less features than using it standalone.
44+
This is because confix is versioned with the SDK, while `latest` is the standalone version.
45+
```
46+
4247
### Using Confix Standalone
4348

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

144+
### Compatibility
145+
146+
The recommended standalone version is `latest`, which is using the latest development version of the Confix.
147+
148+
| SDK Version | Confix Version |
149+
| ----------- | -------------- |
150+
| v0.50 | v0.1.x |
151+
| v0.52 | v0.2.x |
152+
139153
## Credits
140154

141155
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 commit comments

Comments
 (0)