cosmos-sdk/x/consensus
mergify[bot] 7f14281acd
chore: remove accounts replaces (backport #21504) (#21509)
Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-09-02 20:21:02 +00:00
..
exported refactor(x/consensus): audit QA v0.52 (backport #21416) (#21419) 2024-08-27 11:55:54 +00:00
keeper fix(x/consensus)!: update cons params parsing checks (backport #21484) (#21492) 2024-08-31 18:48:38 +02:00
proto refactor: remove consensus messages (backport #21248) (#21260) 2024-08-12 15:18:10 +00:00
types refactor(x/consensus): audit QA v0.52 (backport #21416) (#21419) 2024-08-27 11:55:54 +00:00
autocli.go refactor(cli): Standardize Use field convention and update readme (backport #21369) (#21376) 2024-08-23 20:08:16 +00:00
CHANGELOG.md refactor(x/consensus): audit QA (backport #21151) (#21240) 2024-08-09 18:34:55 +00:00
depinject.go chore: remove auth from consensus (#20839) 2024-07-02 12:36:21 +00:00
go.mod chore: remove accounts replaces (backport #21504) (#21509) 2024-09-02 20:21:02 +00:00
go.sum chore: update schema to v0.2.0 in all go.mod's (backport #21488) (#21491) 2024-08-30 23:44:56 +02:00
module.go refactor: remove consensus messages (backport #21248) (#21260) 2024-08-12 15:18:10 +00:00
README.md refactor(x/consensus): audit QA v0.52 (backport #21416) (#21419) 2024-08-27 11:55:54 +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