diff --git a/x/consensus/README.md b/x/consensus/README.md index 2af97a6a32db..83add3f0bc95 100644 --- a/x/consensus/README.md +++ b/x/consensus/README.md @@ -10,33 +10,53 @@ Functionality to modify CometBFT's ABCI consensus params. ## Contents +* [Abstract](#abstract) +* [Contents](#contents) * [State](#state) * [Params](#params) -* [Keepers](#keepers) +* [Keeper](#keeper) * [Messages](#messages) -* [Consensus Messages](#consensus-messages) + * [UpdateParams](#updateparams) * [Events](#events) - * [Message Events](#message-events) - ## State -The `x/consensus` module keeps state of the consensus params from cometbft.: +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`, +The consensus module stores its params in state with the prefix of `0x05`, it can be updated with governance or the address with authority. * Params: `0x05 | ProtocolBuffer(cometbft.ConsensusParams)` ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/consensus.proto#L9-L15 +https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/consensus/proto/cosmos/consensus/v1/query.proto#L21-L27 +``` + +```protobuf reference +https://github.com/cometbft/cometbft/blob/v0.34.35/proto/tendermint/types/params.proto#L11-L18 ``` -## Keepers +## Keeper + +The Keeper of the `x/consensus` module provides the following functions: + +* `Params`: Retrieves the current consensus parameters. + +* `UpdateParams`: Updates the consensus parameters. Only the authority can perform this operation. + +* `BlockParams`: Returns the maximum gas and bytes allowed in a block. + +* `ValidatorPubKeyTypes`: Provides the list of public key types allowed for validators. + +* `EvidenceParams`: Returns the evidence parameters, including maximum age and bytes. + +* `AppVersion`: Returns the current application version. + + +Note: It is recommended to use the `x/consensus` module keeper to get consensus params instead of accessing them through the context. -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 @@ -45,7 +65,7 @@ The consensus module provides methods to Set and Get consensus params. It is rec Update consensus params. ```protobuf reference -https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/tx.proto#L23-L44 +https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/consensus/proto/cosmos/consensus/v1/tx.proto#L24-L44 ``` The message will fail under the following conditions: