post https://api.infstones.com/core/mainnet/
Returns an object with data about the sync status or false.
Parameters
None
Result
An object with data about the sync status.
Result Fields
Key | Type | Detail |
---|---|---|
SYNC STATUS | Boolean | If the node is synced, return false . Otherwise, return the syncing status in details as shown in currentBlock , highestBlock and startingBlock . |
currentBlock | String | A hex code of an integer that represents the current block, same as eth_blockNumber . If currentBlock is showed, then SYNC STATUS will not showed. |
highestBlock | String | A hex code of an integer that represents the estimated highest block. If highestBlock is showed, then SYNC STATUS will not showed. |
startingBlock | String | A 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 the node is syncing using snap-sync
it will also contains the following:
Key | Type | Detail |
---|---|---|
healedBytecodeBytes | Boolean | A hex code of an integer that represents the number of bytecodes persisted to disk. |
healedBytecodes | String | A hex code of an integer that represents the number of bytecodes downloaded. |
healedTrienodeBytes | String | A hex code of an integer that represents the number of state trie bytes persisted to disk. |
healedTrienodes | String | A hex code of an integer that represents the number of state trie nodes downloaded. |
healingBytecode | String | A hex code of an integer that represents the number of bytecodes pending. |
healingTrienodes | String | A hex code of an integer that represents the number of state trie nodes pending. |
syncedAccountBytes | String | A hex code of an integer that represents the number of account trie bytes persisted to disk. |
syncedAccounts | String | A hex code of an integer that represents the number of accounts downloaded. |
syncedBytecodeBytes | String | A hex code of an integer that represents the number of bytecode bytes downloaded. |
syncedBytecodes | String | A hex code of an integer that represents the number of bytecodes downloaded. |
syncedStorage | String | A hex code of an integer that represents the number of storage slots downloaded. |
syncedStorageBytes | String | A 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
{
"jsonrpc": "2.0",
"id": 1,
"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"
}
}