Skip to content

Commit a1978c2

Browse files
authored
docs(x/consensus): fixes (#22114)
1 parent 080ff34 commit a1978c2

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

Diff for: x/consensus/README.md

+30-10
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,53 @@ Functionality to modify CometBFT's ABCI consensus params.
1010

1111
## Contents
1212

13+
* [Abstract](#abstract)
14+
* [Contents](#contents)
1315
* [State](#state)
1416
* [Params](#params)
15-
* [Keepers](#keepers)
17+
* [Keeper](#keeper)
1618
* [Messages](#messages)
17-
* [Consensus Messages](#consensus-messages)
19+
* [UpdateParams](#updateparams)
1820
* [Events](#events)
19-
* [Message Events](#message-events)
20-
2121

2222
## State
2323

24-
The `x/consensus` module keeps state of the consensus params from cometbft.:
24+
The `x/consensus` module keeps state of the consensus params from CometBFT.
2525

2626
## Params
2727

28-
The consensus module stores it's params in state with the prefix of `0x05`,
28+
The consensus module stores its params in state with the prefix of `0x05`,
2929
it can be updated with governance or the address with authority.
3030

3131
* Params: `0x05 | ProtocolBuffer(cometbft.ConsensusParams)`
3232

3333
```protobuf reference
34-
https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/consensus.proto#L9-L15
34+
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/consensus/proto/cosmos/consensus/v1/query.proto#L21-L27
35+
```
36+
37+
```protobuf reference
38+
https://github.com/cometbft/cometbft/blob/v0.34.35/proto/tendermint/types/params.proto#L11-L18
3539
```
3640

37-
## Keepers
41+
## Keeper
42+
43+
The Keeper of the `x/consensus` module provides the following functions:
44+
45+
* `Params`: Retrieves the current consensus parameters.
46+
47+
* `UpdateParams`: Updates the consensus parameters. Only the authority can perform this operation.
48+
49+
* `BlockParams`: Returns the maximum gas and bytes allowed in a block.
50+
51+
* `ValidatorPubKeyTypes`: Provides the list of public key types allowed for validators.
52+
53+
* `EvidenceParams`: Returns the evidence parameters, including maximum age and bytes.
54+
55+
* `AppVersion`: Returns the current application version.
56+
57+
58+
Note: It is recommended to use the `x/consensus` module keeper to get consensus params instead of accessing them through the context.
3859

39-
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.
4060

4161
## Messages
4262

@@ -45,7 +65,7 @@ The consensus module provides methods to Set and Get consensus params. It is rec
4565
Update consensus params.
4666

4767
```protobuf reference
48-
https://github.com/cosmos/cosmos-sdk/blob/release/v0.52.x/x/consensus/proto/cosmos/consensus/v1/tx.proto#L23-L44
68+
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/consensus/proto/cosmos/consensus/v1/tx.proto#L24-L44
4969
```
5070

5171
The message will fail under the following conditions:

0 commit comments

Comments
 (0)