getConsensusBlock | TON v2

The getConsensusBlock method retrieves information about the latest consensus block in the TON blockchain. This method provides crucial details about the most recent block that has achieved consensus across the network.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

JSON-RPC example

curl -X POST \
  'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getConsensusBlock",
    "params": {}
  }'

Parameters

This method doesn't require any parameters.

Response

  • consensus_block (integer) — The sequence number of the latest consensus block.
  • timestamp (integer) — The Unix timestamp of the latest consensus block.
  • timestamp_string (string) — The human-readable timestamp of the latest consensus block.

Use case

A possible use case for the getConsensusBlock method in TON is for applications or services that need to track the current state of the blockchain consensus. This method can be used to:

  1. Determine the latest block that has achieved network-wide consensus.
  2. Synchronize application state with the confirmed blockchain state.
  3. Implement waiting mechanisms for transaction confirmation based on consensus blocks.
  4. Monitor the progress and health of the TON network by tracking consensus block updates.

Try the getConsensusBlock RPC method yourself

Language
Click Try It! to start a request and see the response here!