eth_syncing - Somnia

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

This method returns the sync status of the Somnia node. If the node is fully synced, it returns false. If syncing, it returns an object with sync progress details.

Parameters

  • None

Request Example

curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "eth_syncing",
  "params": []
}'

Response Example (Synced)

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

Response Example (Syncing)

Response Parameters

Parameter
Type
Description

startingBlock

string

Block where sync started

currentBlock

string

Current synced block

highestBlock

string

Estimated highest block

Use Cases

  • Check node readiness

  • Monitor sync progress

  • Health checks for applications

  • Validate data reliability

Error Handling

Error Code
Description

-32603

Internal error - node processing issues

SDK Integration

Last updated

Was this helpful?