eth_syncing

Returns an object with data about the sync status or false.

Parameters

None

Result

An object with data about the sync status.

Result Fields

KeyTypeDetail
SYNC STATUSBooleanIf the node is synced, return false. Otherwise, return the syncing status in details as shown in currentBlock, highestBlock and startingBlock.
currentBlockStringA hex code of an integer that represents the current block, same as eth_blockNumber. If currentBlock is showed, then SYNC STATUS will not showed.
highestBlockStringA hex code of an integer that represents the estimated highest block. If highestBlock is showed, then SYNC STATUS will not showed.
startingBlockStringA hex code of an integer that represents the block at which the import started. If startingBlock is showed, then SYNC STATUS will not showed.

If node is syncing using snap-sync it will also contains the following:

KeyTypeDetail
healedBytecodeBytesBooleanA hex code of an integer that represents the number of bytecodes persisted to disk.
healedBytecodesStringA hex code of an integer that represents the number of bytecodes downloaded.
healedTrienodeBytesStringA hex code of an integer that represents the number of state trie bytes persisted to disk.
healedTrienodesStringA hex code of an integer that represents the number of state trie nodes downloaded.
healingBytecodeStringA hex code of an integer that represents the number of bytecodes pending.
healingTrienodesStringA hex code of an integer that represents the number of state trie nodes pending.
syncedAccountBytesStringA hex code of an integer that represents the number of account trie bytes persisted to disk.
syncedAccountsStringA hex code of an integer that represents the number of accounts downloaded.
syncedBytecodeBytesStringA hex code of an integer that represents the number of bytecode bytes downloaded.
syncedBytecodesStringA hex code of an integer that represents the number of bytecodes downloaded.
syncedStorageStringA hex code of an integer that represents the number of storage slots downloaded.
syncedStorageBytesStringA hex code of an integer that represents the number of storage trie bytes persisted to disk.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}'

Return

a) The node is synced

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": false
}

b) The node is syncing

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "currentBlock": "0xdbf055",
        "healedBytecodeBytes": "0x0",
        "healedBytecodes": "0x0",
        "healedTrienodeBytes": "0x0",
        "healedTrienodes": "0x0",
        "healingBytecode": "0x0",
        "healingTrienodes": "0x0",
        "highestBlock": "0xdc81a0",
        "startingBlock": "0xdbe954",
        "syncedAccountBytes": "0x0",
        "syncedAccounts": "0x0",
        "syncedBytecodeBytes": "0x0",
        "syncedBytecodes": "0x0",
        "syncedStorage": "0x0",
        "syncedStorageBytes": "0x0"
    }
}
Language
Click Try It! to start a request and see the response here!