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

consensus_subscribe - Tempo

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

WebSocket subscription to consensus events. Emits events when blocks are notarized, finalized, or views are nullified. Available on validator nodes over WebSocket only.

Parameters

  • None

Request Example

# WebSocket-only method. Use wscat (or similar) to connect first:
wscat -c 'wss://go.getblock.io/<ACCESS-TOKEN>/'

# Then send:
{"jsonrpc": "2.0", "method": "consensus_subscribe", "params": [], "id": "getblock.io"}

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x9cef478923ff08bf67fde6c64013158d"
}

Response Parameters

Field
Type
Description

result

string

Subscription ID. Streamed events arrive as separate WebSocket messages with typenotarized | finalized | nullified

(event) type

string

One of notarized, finalized, nullified

(event) epoch

integer

Consensus epoch

(event) view

integer

Consensus view

(event) digest

string

Block digest (omitted for nullified)

(event) certificate

string

BLS certificate (omitted for nullified)

(event) block

object

Full Tempo block (omitted for nullified)

(event) seen

integer

Unix timestamp in milliseconds when the node observed the event

Use Cases

  • Validator-side real-time consensus monitoring

  • Bridge relayers that act immediately on finalization

  • Low-latency notarized-block feeds for advanced UX

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 WebSocket method — not exposed on shared infrastructure

-32600

Invalid Request

Called over HTTP instead of WebSocket

SDK Integration

Last updated

Was this helpful?