Skip to content

BNB Smart Chain method

eth_getBlockByNumber

Returns a block by number, with either full transactions or just their hashes.

moderateModerate: reads state or executes code, but over a bounded range.Primary specification (opens in a new tab)

How each provider handles it

This method has not been measured in this window.

It is scheduled but no observation has landed yet.

What it does

The block header plus its transaction list. The boolean second parameter decides whether transactions come back as full objects or as hashes — a difference of roughly two orders of magnitude in response size on a busy chain.

Because the response size is so sensitive to that flag and to how full the block is, this method shows bandwidth and serialisation cost more clearly than any other.

Parameters

blockQUANTITY | TAGrequired
Block number in hex, or latest, earliest, pending, safe, finalized.
fullTransactionsBooleanrequired
true for full transaction objects, false for hashes only.

Returns

Object — the block, or null if it does not exist.

Try it

Runnable as written, against a keyless public endpoint. Nothing here needs an API key.

Request

curl -s https://ethereum-rpc.publicnode.com \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}'

As JSON-RPC

{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["latest", false],
  "id": 1
}

Response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "number": "0x14a2f3b",
    "hash": "0x...",
    "parentHash": "0x...",
    "timestamp": "0x68a1c2f0",
    "gasLimit": "0x2255100",
    "gasUsed": "0x11e6a2c",
    "baseFeePerGas": "0x3fa63a3f",
    "transactions": ["0x...", "0x..."]
  }
}

Things that bite

  • null for a block that does not exist yet is a valid answer, not an error. Callers that treat it as one break every time they race the head.
  • pending is not a block that exists on any chain — it is the node's own proposed next block, so two providers will legitimately disagree about it.

Why it is measured

Response size varies far more between providers than the specification suggests it should, and that is itself informative: a 36 KB answer and a 75-byte error to the same request are both HTTP 200.

Called every 60 seconds per endpoint, with jitter so the fleet does not hit a provider in lockstep.

30d window · generated 2026-08-24 15:46:31 UTC · 0 providers