commit - Cosmos
commit. Explore how to retrieve block commit information
commit - Cosmos [Value: 20CU]
Retrieves how to retrieve block commit information
Use cases
- Retrieve block commit information for a specific height
- Verify block finalization and commit details
- Audit block signatures and consensus process
Constraints
- Limited to finalized blocks only
- Possible delays due to block propagation
- Block data might be incomplete or unavailable
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": "commit",
"params": [
20431584
],
"id": 1
}'
Response
200
{
"jsonrpc": "2.0",
"result": {
"height": "20431584",
"hash": "0x1234567890ABCDEF...",
"header": {
"version": {
"block": "11",
"app": "0"
},
"chain_id": "cosmoshub-4",
"height": "20431584",
"time": "2022-10-12T10:55:50.385Z",
"last_block_id": {
"hash": "0x1234567890...",
"parts": {
"total": 1,
"hash": "0x9876543210..."
}
},
"last_commit_hash": "0xABCDE12345...",
"data_hash": "0x56789ABCDEF...",
"validators_hash": "0x123456789ABC...",
"next_validators_hash": "0xDEF123456789...",
"consensus_hash": "0xABCDEF123456...",
"app_hash": "0x12345ABCDEF...",
"last_results_hash": "0xFEDCBA54321...",
"evidence_hash": "0x98765ABCDE...",
"proposer_address": "12345ABCDE..."
},
"commit": {
"height": "20431584",
"round": 0,
"block_id": {
"hash": "0x1234567890ABCDEF...",
"parts": {
"total": 1,
"hash": "0x9876543210..."
}
},
"signatures": [
// Signature data
]
}
},
"id": 1
}
Request params
idinteger
jsonrpcstring
methodstring
string
heightstring
The block height for which the commit information is being requested. If omitted, the latest commit is returned.
Response
200
Contains the commit information for a specific blockResponse params
object
idinteger
jsonrpcstring
resultobject
object
signed_headerobject
The signed header containing information about the block and its commits.
object
headerobject
The header of the block, containing metadata such as chain ID, height, and timestamp.
object
versionobject
The version of the block and application.
object
blockstring
The version of the block.
appstring
The version of the application.
chain_idstring
The identifier of the blockchain.
heightstring
The height of the block.
timestring
The timestamp when the block was created.
last_block_idobject
The ID of the previous block.
object
hashstring
The hash of the previous block.
partsobject
Information about the parts of the previous block.
object
totalinteger
The total number of parts in the previous block.
hashstring
The hash of the parts of the previous block.
last_commit_hashstring
The hash of the last commit.
data_hashstring
The hash of the block's data.
validators_hashstring
The hash of the validators set for this block.
next_validators_hashstring
The hash of the next validators set.
consensus_hashstring
The hash of the consensus.
app_hashstring
The hash of the application state after this block.
last_results_hashstring
The hash of the results of the last block.
evidence_hashstring
The hash of any evidence of misbehavior.
proposer_addressstring
The address of the block proposer.
commitobject
Contains the commit details for the block, including the signatures of the validators.
object
heightstring
The height of the block being committed.
roundinteger
The round number of the commit.
block_idobject
The block ID being committed.
object
hashstring
The hash of the committed block.
partsobject
The parts of the committed block.
object
totalinteger
The total number of parts in the committed block.
hashstring
The hash of the parts of the committed block.
signaturesarray
Array of signatures from validators who committed the block.
object
block_id_flaginteger
Flag indicating the block ID.
validator_addressstring
The address of the validator.
timestampstring
The timestamp of the signature.
signaturestring
The signature of the validator.
canonicalboolean
Indicates whether the commit is canonical (true) or not (false).