Skip to main content
Version: Next

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)
proto/cosmos/consensus/v1/consensus.proto
loading...

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.

proto/cosmos/consensus/v1/tx.proto
loading...

The message will fail under the following conditions:

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

Consensus Messages

The consensus module has a consensus message that is used to set the consensus params when the chain initializes. It is similar to the UpdateParams message but it is only used once at the start of the chain.

proto/cosmos/consensus/v1/consensus.proto
loading...

Events

The consensus module emits the following events:

Message Events

MsgUpdateParams

TypeAttribute KeyAttribute Value
stringauthoritymsg.Signer
stringparametersconsensus Parameters