Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(x/consensus): Add missing ABCI consensus param in MsgUpdateParams #16713

Merged
merged 7 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#16547](https://github.com/cosmos/cosmos-sdk/pull/16547) Ensure a transaction's gas limit cannot exceed the block gas limit.
* (x/auth/types) [#16554](https://github.com/cosmos/cosmos-sdk/pull/16554) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking.
* (baseapp) [#16613](https://github.com/cosmos/cosmos-sdk/pull/16613) Ensure each message in a transaction has a registered handler, otherwise `CheckTx` will fail.
* (x/consensus) [#16713](https://github.com/cosmos/cosmos-sdk/pull/16713) Add missing ABCI param in MsgUpdateParams.

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

Expand Down
161 changes: 127 additions & 34 deletions api/cosmos/consensus/v1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions proto/cosmos/consensus/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ message MsgUpdateParams {
tendermint.types.BlockParams block = 2;
tendermint.types.EvidenceParams evidence = 3;
tendermint.types.ValidatorParams validator = 4;

// Since: cosmos-sdk 0.50
tendermint.types.ABCIParams abci = 5;
}

// MsgUpdateParamsResponse defines the response structure for executing a
Expand Down
10 changes: 9 additions & 1 deletion x/consensus/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress {
}

func (msg MsgUpdateParams) ToProtoConsensusParams() cmtproto.ConsensusParams {
return cmtproto.ConsensusParams{
cp := cmtproto.ConsensusParams{
Block: &cmtproto.BlockParams{
MaxBytes: msg.Block.MaxBytes,
MaxGas: msg.Block.MaxGas,
Expand All @@ -32,4 +32,12 @@ func (msg MsgUpdateParams) ToProtoConsensusParams() cmtproto.ConsensusParams {
},
Version: cmttypes.DefaultConsensusParams().ToProto().Version, // Version is stored in x/upgrade
}

if msg.Abci != nil {
cp.Abci = &cmtproto.ABCIParams{
VoteExtensionsEnableHeight: msg.Abci.VoteExtensionsEnableHeight,
}
}

return cp
}
Loading
Loading