consensus_state - Cosmos
consensus_state. Learn how to retrieve the current consensus state
consensus_state - Cosmos [Value: 20CU]
Retrieves how to retrieve the current consensus state
Use cases
- Monitor the current state of the consensus process
- Check validator participation in the consensus round
- Verify the current round and step in consensus
Constraints
- Real-time data may vary rapidly
- Requires understanding of consensus mechanics
- Not useful for finalized block data
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --location 'https://cosmos-hub.drpc.org' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "consensus_state",
"params": [],
"id": 1
}'
Response
200
{
"jsonrpc": "2.0",
"result": {
"round_state": {
"height": "20431584",
"round": "0",
"step": "COMMIT",
"votes": {
"prevotes": [],
"precommits": []
},
"proposer": "12345ABCDE..."
},
"validators": {
"total_voting_power": "1000000000",
"validator_set": [
{
"address": "ABCDE12345...",
"voting_power": "500000000"
},
{
"address": "67890FGHIJ...",
"voting_power": "500000000"
}
]
}
},
"id": 1
}
Request params
idinteger
jsonrpcstring
methodstring
Response
200
Contains the current consensus state of the blockchainResponse params
object
idinteger
jsonrpcstring
resultobject
object
round_stateobject
The current round state of the consensus process, including round number and step.
object
heightstring
The current block height in the consensus process.
roundinteger
The current round number in the consensus process.
stepstring
The current step in the consensus process.
proposal_blockobject
Details about the proposed block in the current round, if any.
object
block_idobject
The identifier of the proposed block.
object
hashstring
The unique hash of the proposed block.
partsobject
Information about the block parts.
object
totalinteger
The total number of parts in the block.
hashstring
The hash of the block parts.
block_parts_headerobject
Header information about the parts of the proposed block.
object
totalinteger
The total number of block parts.
hashstring
The hash of the block parts.
validatorsarray
Array of validators participating in the consensus process.
object
addressstring
The address of the validator.
pub_keystring
The public key of the validator.
voting_powerstring
The voting power of the validator.
proposer_prioritystring
The priority of the validator as a proposer.
proposalobject
Details of the current proposal in the consensus process.
object
proposal_idstring
The unique identifier of the proposal.
proposal_hashstring
The hash of the proposal.
pol_roundinteger
The round in which the proposal was locked.
pol_votesarray
Votes received in the proof-of-lock round.
object
validator_addressstring
The address of the validator who cast the vote.
vote_typestring
The type of vote cast by the validator.