I see there are few blocks missing in Near when I try to query through the archival node. Even I am unable to find them in the explorer as well. Is there any particular reason that the blocks are missing.
curl --location 'https://archival-rpc.mainnet.near.org' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "block",
"params": {
"block_id": 9820234
}
}'
Response:
{
"jsonrpc": "2.0",
"error": {
"name": "HANDLER_ERROR",
"cause": {
"info": {},
"name": "UNKNOWN_BLOCK"
},
"code": -32000,
"message": "Server error",
"data": "DB Not Found Error: BLOCK HEIGHT: 9820234 \n Cause: Unknown"
},
"id": "dontcare"
}
These blocks were skipped, which simply means the assigned block producer was unable to produce it in time. This is normal behavior of the chain, as described in the consenus chapter of the nomicon. https://nomicon.io/ChainSpec/Consensus
You can verify that this particular block was skipped by querying blocks 9820233 and 9820235 and comparing
hashof 9820233 withprev_hashof 9820235.gives
and
gives
You can see that they are both
"6bJN8kR3KUgQ4NziFn5rZYzsQBRH7b7tFJFJKbSkHVK", therefore no block exists between the two.