consensus_params - TAC

Returns the consensus parameters (block size, evidence, and validator params) at a given height.

Method

consensus_params

Parameters

ParameterTypeDescription
heightstringBlock height (omit for latest)

Example

bashexport TAC_TM=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

# JSON-RPC over HTTP (POST)
curl -X POST "${TAC_TM}" -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "consensus_params", "params": {"height": "5123456"}}'

# URI over HTTP (GET)
curl "${TAC_TM}consensus_params?height=5123456"

Response

json{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "block_height": "5123456",
        "consensus_params": {
            "block": {
                "max_bytes": "22020096",
                "max_gas": "-1"
            },
            "evidence": {},
            "validator": {
                "pub_key_types": [
                    "ed25519"
                ]
            }
        }
    }
}

Response Fields

FieldTypeDescription
block_heightstringHeight the params apply to
consensus_paramsobjectBlock, evidence, and validator parameters

Use Cases

  • Limits: Read max block size and gas
  • Tooling: Configure clients to chain limits

Error Handling

ErrorMessageDescription
-32600 / Invalid requestInvalid requestThe JSON-RPC envelope was malformed
-32602 / Invalid paramsInvalid paramsA parameter was missing or of the wrong type
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect