consensus_params - Cosmos

consensus_params. Discover how to access and update consensus parameters

consensus_params - Cosmos [Value: 20CU]
Retrieves how to access and update consensus parameters
Use cases

Use cases

  • Retrieve consensus parameters for a specific block height
  • Analyze block size, gas limits, and evidence parameters
  • Validate validator key types and consensus rules
Constraints

Constraints

  • Only valid for finalized blocks
  • May vary significantly between versions
  • Limited to current consensus rules at block height
Get started
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_params",
    "params": [
        20431584
    ],
    "id": 1
}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "block": {
      "max_bytes": "22020096",
      "max_gas": "-1",
      "time_iota_ms": "1000"
    },
    "evidence": {
      "max_age_num_blocks": "100000",
      "max_age_duration": "172800000000000",
      "max_bytes": "1048576"
    },
    "validator": {
      "pub_key_types": ["ed25519"]
    },
    "version": "v0.34.13"
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersinteger
integer
heightstring
The block height for which the consensus parameters are being requested. If omitted, the latest consensus parameters are returned.

Response

200
Contains the consensus parameters for the specified block heigh

Response params

object
idinteger
jsonrpcstring
resultobject
object
block_heightstring
Indicates the block height for which the consensus parameters were retrieved.
consensus_paramsobject
Object holding various consensus settings, including those related to blocks, evidence, validators, and more.
object
blockobject
Parameters defining block constraints, such as maximum size and gas limits.
object
max_bytesstring
The maximum allowable size of a block in bytes.
max_gasstring
The maximum gas limit a block can have.
evidenceobject
Parameters governing the handling of evidence within the blockchain.
object
max_age_num_blocksstring
The maximum number of blocks within which evidence remains valid.
max_age_durationstring
The maximum time duration for which evidence is considered valid, in nanoseconds.
max_bytesstring
The maximum size of evidence allowed, in bytes.
validatorobject
Parameters related to the validators, including supported public key types.
object
pub_key_typesarray
An array listing the types of public keys that validators can use.
versionobject
Information about the application version.
object
app_versionstring
Specifies the version of the application running on the network.
synchronyobject
Settings related to the timing and synchronization of events on the blockchain.
object
precisionstring
Defines the precision for synchronization, in nanoseconds.
message_delaystring
Specifies the delay for message synchronization, in nanoseconds.
timeoutobject
Timeout settings for various stages of block creation and validation.
object
proposestring
The duration allowed for proposing a block, in nanoseconds.
propose_deltastring
The additional time given for proposing a block, in nanoseconds.
votestring
The time allocated for voting on a block, in nanoseconds.
vote_deltastring
The additional time given for voting, in nanoseconds.
commitstring
The duration allowed for committing a block, in nanoseconds.
bypass_commit_timeoutboolean
Indicates whether the commit timeout can be bypassed.
abciobject
Application Blockchain Interface (ABCI) related settings.
object
vote_extensions_enable_heightstring
The block height at which vote extensions are enabled.
recheck_txboolean
Indicates whether transactions should be rechecked.