Skip to content

Commit

Permalink
chore: Add release notes for 0.43.0-rc0 (cosmos#9584)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Nov 1, 2021
1 parent 51997c8 commit e0815db
Showing 1 changed file with 46 additions and 13 deletions.
59 changes: 46 additions & 13 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
# Cosmos SDK v0.44.1 Release Notes
# Cosmos SDK v0.43.0 Release Notes

This release introduces bug fixes and improvements on the Cosmos SDK v0.44 series.
This release introduces several new important updates to the Cosmos SDK. The release notes below provide an overview of the larger high-level changes introduced in the v0.43 release series.

The main bug fix concerns all users performing in-place store migrations from v0.42 to v0.44. A source of non-determinism in the upgrade process has been [detected and fixed](https://github.com/cosmos/cosmos-sdk/pull/10189) in this release, causing consensus errors. As such, **v0.44.0 is not safe to use when performing v0.42->v0.44 in-place store upgrades**, please use this release v0.44.1 instead. This does not impact genesis JSON dump upgrades nor fresh chains starting with v0.44.
That being said, this release does contain many more minor and module-level changes besides those mentioned below. For a comprehsive list of all breaking changes and improvements since the v0.42 "Stargate" release series, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-rc0/CHANGELOG.md).

Another bug fix concerns calling the ABCI `Query` method using `client.Context`. We modified ABCI queries to use `abci.QueryRequest`'s `Height` field if it is non-zero, otherwise continue using `client.Context`'s height. This is a minor client-breaking change for users of the `client.Context`.
## Two new modules: `x/authz` and `x/feegrant`

Some CLI fixes are also included, such as:
The v0.43 release focused on simplifying [keys and fee management](https://github.com/cosmos/cosmos-sdk/issues/7074) for SDK users, by introducing the two following modules:

- using pre-configured data for the CLI `add-genesis-account` command ([\#9969](https://github.com/cosmos/cosmos-sdk/pull/9969)),
- ensuring the `init` command reads the `--home` flag value correctly ([#10104](https://github.com/cosmos/cosmos-sdk/pull/10104)),
- fixing the error message when `period` or `period-limit` flag is not set on a feegrant grant transaction [\#10049](https://github.com/cosmos/cosmos-sdk/issues/10049).
- `x/feegrant` allows one account, the "granter" to grant another account, the "grantee" an allowance to spend the granter's account balance for fees within certain well-defined limits. It solves the problem of signing accounts needing to possess a sufficient balance in order to pay fees.
- See [ADR-029](https://github.com/cosmos/cosmos-sdk/blob/8f21e26a6506c9ee81686bad6cf9be3f0e8e11d7/docs/architecture/adr-029-fee-grant-module.md) introducing the module.
- Read the [documentation](https://docs.cosmos.network/master/modules/feegrant/).
- Check out its [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/master/proto/cosmos/feegrant/v1beta1).
- `x/authz` provides functionality for granting arbitrary privileges from one account (the "granter") to another account (the "grantee"). These privileges, called [`Authorization`](https://github.com/cosmos/cosmos-sdk/blob/f2cea6a137ce19ad8987fa8a0cb99f4b37c4484d/x/authz/authorizations.go#L11)s in the code, can for example allow grantees to execute `Msg`s on behalf of the granter.
- See [ADR-030](https://github.com/cosmos/cosmos-sdk/blob/8f21e26a6506c9ee81686bad6cf9be3f0e8e11d7/docs/architecture/adr-030-authz-module.md) introducing the module.
- Read the [documentation](https://docs.cosmos.network/master/modules/authz/).
- Check out its [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/master/proto/cosmos/authz/v1beta1).

v0.44.1 also includes performance improvements, namely:
These two modules have a slightly different folder structure compared to previously existing modules. For example, all Protobuf-generated files are generated in the module root folder instead of the `types/` folder, and the module itself is defined inside a `module` sub-package. Moving forward, we believe this folder structure is clearer and sets a better example for module developers. To learn more about building modules following this structure, please read our [building modules](https://docs.cosmos.network/master/building-modules/intro.html) documentation.

- IAVL update to v0.17.1 which includes performance improvements on a batch load [\#10040](https://github.com/cosmos/cosmos-sdk/pull/10040),
- Speedup coins.AmountOf(), by removing many intermittent regex calls [\#10021](https://github.com/cosmos/cosmos-sdk/pull/10021),
- Improve CacheKVStore datastructures / algorithms, to no longer take O(N^2) time when interleaving iterators and insertions [\#10026](https://github.com/cosmos/cosmos-sdk/pull/10026).
## ADR-028 Addresses

See the [Cosmos SDK v0.44.1 milestone](https://github.com/cosmos/cosmos-sdk/milestone/56?closed=1) on our issue tracker for the exhaustive list of all changes.
In the SDK versions v0.42 and earlier, addresses were all 20-bytes long, generated by truncating the first 20 bytes of the SHA-256 hash of some given bytes (e.g. the public key for normal accounts, or the module name for module accounts). Unfortunately, this significantly decreases the security of Cosmos SDK due to address space collisions.

ADR-028 introduces a new specification for deriving addresses for all kinds of addressable accounts. Following is a quick summary:

- secp256k1 public keys still have 20-byte addresses to keep backwards-compatibility,
- new public key types (e.g. ed25519) and module accounts will have 32-byte address to increase collision resistance,
- new algorithms have also been specified for composed accounts (like multisigs) or derived accounts (like module sub-accounts).

[Link to ADR-028](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md).

## ADR-041 In-place store migrations

Chain upgrades were historically done with the Cosmos SDK by creating an upgrade proposal, halting the chain at the given height, exporting state to a JSON file, making the necessary JSON file changes, and creating a new chain with the modified JSON file as genesis. This procedure is tedious, and could take up to several hours.

Cosmos SDK v0.43 introduces a new way of handling upgrades. Whan an upgrade happens, instead of starting a new chain, the new binary will read the existing database, and perform in-place modifications of the store. We expect this method to significantly reduce the migration time.

For more information:

- see the [upgrading modules](https://docs.cosmos.network/master/building-modules/upgrade.html) documentation to learn how to modify your module to be able to support in-place store migrations,
- check out how to [set up an upgrade handler](https://docs.cosmos.network/master/core/upgrade.html) that perform in-place store migrations in your `app.go`,
- read [ADR-041](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-041-in-place-store-migrations.md) introducing this feature.

## Protobuf Client-Side Breaking Changes

In this release, we deprecated a couple of fields in our Protobuf definitions. When using these fields, some changes in behavior might occur whether you're hitting an v0.42 or a v0.43 node.

- `cosmos.gov.v1beta1.Vote#option` is deprecated in favor of `cosmos.gov.v1beta1.Vote#options` (with an "s") to support x/gov [split votes](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-037-gov-split-vote.md). There are no breaking changes in `Msg`s, as a new `MsgWeightedVote` has been added to support split votes. However, when querying, the deprecated `option` field is populated only when the underlying vote has one VoteOption with weight 1. For other split votes, the `option` field will be equal to `OptionEmpty`.
- `cosmos.upgrade.v1beta1.Plan#time` is deprecated, because the SDK stops supporting time-based upgrades in favor or height-based upgrades. If an upgrade Plan is created with a non-empty time, the node will error.
- `cosmos.upgrade.v1beta1.Plan#upgraded_client_state` is deprecated as IBC logic has been moved to the IBC repo. If this field is set, the node will error.

The SDK team is planning to document Protobuf change process using an ADR. It will be a guideline for all chain developers, follow [#9477](https://github.com/cosmos/cosmos-sdk/issues/9477) for more info.

0 comments on commit e0815db

Please sign in to comment.