cosmos-sdk/x/consensus
2024-09-13 16:44:18 +00:00
..
exported refactor(x/consensus): audit QA v0.52 (#21416) 2024-08-27 11:22:47 +00:00
keeper fix: remove stray fmt.Println (#21661) 2024-09-11 20:06:57 +00:00
proto refactor: remove consensus as a imported type in modules (#21480) 2024-09-10 15:36:33 +00:00
types refactor: remove consensus as a imported type in modules (#21480) 2024-09-10 15:36:33 +00:00
autocli.go refactor(cli): Standardize Use field convention and update readme (#21369) 2024-08-21 08:36:34 +00:00
CHANGELOG.md refactor(x/consensus): audit QA (#21151) 2024-08-09 15:20:42 +00:00
depinject.go test(x/upgrade): fix tests (#21582) 2024-09-07 14:41:33 +00:00
go.mod build(deps): Bump google.golang.org/grpc from 1.66.1 to 1.66.2 (#21670) 2024-09-13 11:30:49 +00:00
go.sum feat: replace the cosmos-db usecases in the tests with core/testing (#21525) 2024-09-13 16:44:18 +00:00
module.go refactor(core): move amino registrar and drop legacy package (#21531) 2024-09-05 11:44:52 +00:00
README.md refactor(x/consensus): audit QA v0.52 (#21416) 2024-08-27 11:22:47 +00:00
sonar-project.properties chore: force reload sonar cloud (#20480) 2024-05-29 11:12:09 +00:00

sidebar_position
1

x/consensus

Abstract

Functionality to modify CometBFT's ABCI consensus params.

Contents

State

The x/consensus module keeps state of the consensus params from cometbft.:

Params

The consensus module stores it's params in state with the prefix of 0x05, it can be updated with governance or the address with authority.

  • Params: 0x05 | ProtocolBuffer(cometbft.ConsensusParams)
https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/consensus.proto#L9-L15

Keepers

The consensus module provides methods to Set and Get consensus params. It is recommended to use the x/consensus module keeper to get consensus params instead of accessing them through the context.

Messages

UpdateParams

Update consensus params.

https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/tx.proto#L23-L44

The message will fail under the following conditions:

  • The signer is not the set authority
  • Not all values are set

Events

The consensus module emits the following events:

Message Events

MsgUpdateParams

Type Attribute Key Attribute Value
string authority msg.Signer
string parameters consensus Parameters