For the complete documentation index, see llms.txt. This page is also available as Markdown.

consensus_getLatest - Tempo

Example code for the consensus_getLatest JSON-RPC method. Complete guide on how to use consensus_getLatest JSON-RPC in GetBlock Web3 documentation.

Returns the current consensus state snapshot: the latest finalized block and (if ahead) the latest notarized block. Useful for monitoring consensus liveness and catching reorgs at the consensus layer (though Tempo's deterministic finality means notarized → finalized is fast and reliable).

Parameters

  • None

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "consensus_getLatest",
    "params": [],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "finalized": {
            "epoch": 42,
            "view": 387213,
            "digest": "0x6baa8fa86b9a7e5d3f1c8a4b6e9d2f5a8c3e7b1d4f9a6c2e5b8d3f7a1c4e9b2d",
            "certificate": "0xc4b5a6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6",
            "block": {
                "number": "0x9c40",
                "hash": "0x6baa8fa86b9a7e5d3f1c8a4b6e9d2f5a8c3e7b1d4f9a6c2e5b8d3f7a1c4e9b2d"
            }
        },
        "notarized": {
            "epoch": 42,
            "view": 387214,
            "digest": "0x4f3a1d6e8c2b9a7e5d3f1c8a4b6e9d2f5a8c3e7b1d4f9a6c2e5b8d3f7a1c4e9b",
            "certificate": "0xa1b2c3d4...",
            "block": {
                "number": "0x9c41",
                "hash": "0x4f3a1d6e8c2b9a7e..."
            }
        }
    }
}

Response Parameters

Field
Type
Description

result.finalized

CertifiedBlock | null

Latest finalized block

result.notarized

CertifiedBlock | null

Latest notarized block, if ahead of finalized; null otherwise

Use Cases

  • Validator-side consensus liveness monitoring

  • Detecting notarized-but-not-yet-finalized blocks for low-latency UX

  • Building consensus-layer dashboards

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32601

Method not found

Method does not exist or is not enabled on this node

429

Too Many Requests

Rate limit exceeded for your plan

-32601

Method not found

This is a validator-only method — not exposed on shared infrastructure

Last updated

Was this helpful?