Skip to content

Commit 3ce2934

Browse files
authored
Merge branch 'main' into chore/deprecate-nft
2 parents 2460cf9 + 36e90bb commit 3ce2934

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+967
-728
lines changed

RELEASE_NOTES.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# Cosmos SDK v0.50.12 Release Notes
1+
# Cosmos SDK v0.53.0 Release Notes
22

33
💬 [**Release Discussion**](https://github.com/orgs/cosmos/discussions/58)
44

55
## 🚀 Highlights
66

7-
This patch release fixes [GHSA-x5vx-95h7-rv4p](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-x5vx-95h7-rv4p).
8-
It resolves a `x/group` module issue that can halt chain when handling a malicious proposal.
9-
Only users of the `x/group` module are affected by this issue.
7+
Announcing Cosmos SDK v0.53
108

11-
We recommended to upgrade to this patch release as soon as possible.
12-
When upgrading from <= v0.50.11, please use a chain upgrade to ensure that 2/3 of the validator power upgrade to v0.50.12.
9+
We are pleased to announce the release of Cosmos SDK v0.53! We’re excited to be delivering a new version of the Cosmos SDK that provides key features and updates while minimizing breaking changes so you can focus on what matters most: building.
10+
11+
Upgrading to this verison of the Cosmos SDK from any `v0.50.x` release will **require a coordinated chain upgrade**.
12+
13+
For more upgrade information, check out our [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/UPGRADING.md)
1314

1415
## 📝 Changelog
1516

16-
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.50.12/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.11...v0.50.12) from the last release.
17+
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.12...v0.53.0) from the last release.

UPGRADE_GUIDE.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -406,36 +406,56 @@ Lastly, add an entry for epochs in the ModuleConfig:
406406

407407
## Enable Unordered Transactions **OPTIONAL**
408408

409-
To enable unordered transaction support on an application, the ante handler options must be updated.
409+
To enable unordered transaction support on an application, the `x/auth` keeper must be supplied with the `WithUnorderedTransactions` option.
410+
411+
Note that unordered transactions require sequence values to be zero, and will **FAIL** if a non-zero sequence value is set.
412+
Please ensure no sequence value is set when submitting an unordered transaction.
413+
Services that rely on prior assumptions about sequence values should be updated to handle unordered transactions.
414+
Services should be aware that when the transaction is unordered, the transaction sequence will always be zero.
415+
416+
```go
417+
app.AccountKeeper = authkeeper.NewAccountKeeper(
418+
appCodec,
419+
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
420+
authtypes.ProtoBaseAccount,
421+
maccPerms,
422+
authcodec.NewBech32Codec(sdk.Bech32MainPrefix),
423+
sdk.Bech32MainPrefix,
424+
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
425+
authkeeper.WithUnorderedTransactions(true), // new option!
426+
)
427+
```
428+
429+
If using dependency injection, update the auth module config.
430+
431+
```go
432+
{
433+
Name: authtypes.ModuleName,
434+
Config: appconfig.WrapAny(&authmodulev1.Module{
435+
Bech32Prefix: "cosmos",
436+
ModuleAccountPermissions: moduleAccPerms,
437+
EnableUnorderedTransactions: true, // remove this line if you do not want unordered transactions.
438+
}),
439+
},
440+
```
441+
442+
By default, unordered transactions use a transaction timeout duration of 10 minutes and a default gas charge of 2240 gas units.
443+
To modify these default values, pass in the corresponding options to the new `SigVerifyOptions` field in `x/auth's` `ante.HandlerOptions`.
410444

411445
```go
412446
options := ante.HandlerOptions{
413-
// ...
414-
UnorderedNonceManager: app.AccountKeeper,
415-
// The following options are set by default.
416-
// If you do not want to change these, you may remove the UnorderedTxOptions field entirely.
417-
UnorderedTxOptions: []ante.UnorderedTxDecoratorOptions{
418-
ante.WithUnorderedTxGasCost(2240),
419-
ante.WithTimeoutDuration(10 * time.Minute),
447+
SigVerifyOptions: []ante.SigVerificationDecoratorOption{
448+
// change below as needed.
449+
ante.WithUnorderedTxGasCost(ante.DefaultUnorderedTxGasCost),
450+
ante.WithMaxUnorderedTxTimeoutDuration(ante.DefaultMaxTimoutDuration),
420451
},
421452
}
453+
```
422454

455+
```go
423456
anteDecorators := []sdk.AnteDecorator{
424-
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
425-
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
426-
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
427-
ante.NewValidateBasicDecorator(),
428-
ante.NewTxTimeoutHeightDecorator(),
429-
ante.NewValidateMemoDecorator(options.AccountKeeper),
430-
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
431-
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
432-
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
433-
ante.NewValidateSigCountDecorator(options.AccountKeeper),
434-
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
435-
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
436-
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
437-
// NEW !! NEW !! NEW !!
438-
ante.NewUnorderedTxDecorator(options.UnorderedNonceManager, options.UnorderedTxOptions...)
457+
// ... other decorators ...
458+
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigVerifyOptions...), // supply new options
439459
}
440460
```
441461

UPGRADING.md

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,58 @@ To submit an unordered transaction, clients must set the `unordered` flag to
2525
used as a TTL for the transaction and provides replay protection. Each transaction's `timeout_timestamp` must be
2626
unique to the account; however, the difference may be as small as a nanosecond. See [ADR-070](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-070-unordered-transactions.md) for more details.
2727

28+
Note that unordered transactions require sequence values to be zero, and will **FAIL** if a non-zero sequence value is set.
29+
Please ensure no sequence value is set when submitting an unordered transaction.
30+
Services that rely on prior assumptions about sequence values should be updated to handle unordered transactions.
31+
Services should be aware that when the transaction is unordered, the transaction sequence will always be zero.
32+
2833
#### Enabling Unordered Transactions
2934

30-
To enable unordered transactions, set the new `UnorderedNonceManager` field in the `x/auth` `ante.HandlerOptions`.
35+
To enable unordered transactions, supply the `WithUnorderedTransactions` option to the `x/auth` keeper:
36+
37+
```go
38+
app.AccountKeeper = authkeeper.NewAccountKeeper(
39+
appCodec,
40+
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
41+
authtypes.ProtoBaseAccount,
42+
maccPerms,
43+
authcodec.NewBech32Codec(sdk.Bech32MainPrefix),
44+
sdk.Bech32MainPrefix,
45+
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
46+
authkeeper.WithUnorderedTransactions(true), // new option!
47+
)
48+
```
49+
50+
If using dependency injection, update the auth module config.
51+
52+
```go
53+
{
54+
Name: authtypes.ModuleName,
55+
Config: appconfig.WrapAny(&authmodulev1.Module{
56+
Bech32Prefix: "cosmos",
57+
ModuleAccountPermissions: moduleAccPerms,
58+
EnableUnorderedTransactions: true, // remove this line if you do not want unordered transactions.
59+
}),
60+
},
61+
```
3162

32-
By default, unordered transactions use a transaction timeout duration of 10 minutes and a default gas charge of 2240 gas.
33-
To modify these default values, pass in the corresponding options to the new `UnorderedTxOptions` field in `x/auth's` `ante.HandlerOptions`.
63+
By default, unordered transactions use a transaction timeout duration of 10 minutes and a default gas charge of 2240 gas units.
64+
To modify these default values, pass in the corresponding options to the new `SigVerifyOptions` field in `x/auth's` `ante.HandlerOptions`.
3465

3566
```go
3667
options := ante.HandlerOptions{
37-
UnorderedNonceManager: app.AccountKeeper,
38-
// The following options are set by default.
39-
// If you do not want to change these, you may remove the UnorderedTxOptions field entirely.
40-
UnorderedTxOptions: []ante.UnorderedTxDecoratorOptions{
41-
ante.WithUnorderedTxGasCost(2240),
42-
ante.WithTimeoutDuration(10 * time.Minute),
68+
SigVerifyOptions: []ante.SigVerificationDecoratorOption{
69+
// change below as needed.
70+
ante.WithUnorderedTxGasCost(ante.DefaultUnorderedTxGasCost),
71+
ante.WithMaxUnorderedTxTimeoutDuration(ante.DefaultMaxTimoutDuration),
4372
},
4473
}
4574
```
4675

4776
```go
4877
anteDecorators := []sdk.AnteDecorator{
49-
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
50-
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
51-
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
52-
ante.NewValidateBasicDecorator(),
53-
ante.NewTxTimeoutHeightDecorator(),
54-
ante.NewValidateMemoDecorator(options.AccountKeeper),
55-
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
56-
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
57-
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
58-
ante.NewValidateSigCountDecorator(options.AccountKeeper),
59-
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
60-
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
61-
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
62-
// NEW !! NEW !! NEW !!
63-
ante.NewUnorderedTxDecorator(options.UnorderedNonceManager, options.UnorderedTxOptions...)
78+
// ... other decorators ...
79+
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigVerifyOptions...), // supply new options
6480
}
6581
```
6682

0 commit comments

Comments
 (0)