zkSync – “pending” Blocks Return null
When querying zkSync with the eth_getBlockByNumber method and using the "pending" tag, you will receive either a result: null or an RPC error.
This is an expected behaviors and reflect zkSync’s architecture.
Example request
curl --location 'https://zksync-mainnet.gateway.tatum.io/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["pending",true],
"id": "1"
}'
//Response:
{
"jsonrpc": "2.0",
"id": "1",
"result": null
}
Explanation
On zkSync, the "pending" tag is supported for RPC compatibility but does not represent an actual pending block object.
Pending blocks are not constructed or exposed the same way as on Layer-1 chains such as Ethereum.
result: null→ The node does not return any pending block object.error: -32014→ The node explicitly reports that no block exists with number "pending".
Once a block is sealed and finalized, standard tags like "latest" or explicit block numbers will return complete block data.
This behavior is consistent across zkSync and is not an error on Tatum’s side.
Updated about 7 hours ago