Pre-alphaWork in progress
Skip to content

eth_getBlockByHash ​

Returns information about a block by hash.

Ethereum specification · All supported methods

Parameters ​

Parameters are positional, in the order below.

ParameterTypeRequiredDescription
Block hash32-byte hashYesSee the linked specification for field encoding.
Hydrated transactionsBooleanYestrue returns full transaction objects; false returns hashes.

Return value ​

A block object, or null if the block is not found.

The returned object includes these fields. Fork-specific fields depend on the selected network and block:

FieldTypeDescription
hash32-byte hashHash identifying this block or transaction.
parentHash32-byte hashHash of the parent block.
sha3Uncles32-byte hashHash of the block’s uncle list.
miner20-byte addressAddress receiving the block’s execution-layer fees.
stateRoot32-byte hashRoot of the state after this block.
transactionsRoot32-byte hashRoot of the block’s transaction trie.
receiptsRoot32-byte hashRoot of the block’s receipt trie.
logsBloomBloom filterBloom filter summarizing log addresses and topics.
difficultyHexadecimal quantityBlock difficulty; zero for Ethereum proof-of-stake blocks.
numberHexadecimal quantityBlock number as a hexadecimal quantity.
gasLimitHexadecimal quantityMaximum execution gas permitted in the block.
gasUsedHexadecimal quantityExecution gas consumed.
timestampHexadecimal quantityBlock timestamp in Unix seconds, encoded in hexadecimal.
extraDataHexadecimal bytesExtra data included in the block header.
mixHash32-byte hashConsensus-dependent mix digest or randomness value.
nonce8-byte valueConsensus nonce; zero for Ethereum proof-of-stake blocks.
baseFeePerGasHexadecimal quantityBase fee per unit of gas, where supported by the network.
withdrawalsRoot32-byte hashRoot of the withdrawals list, where applicable.
blobGasUsedHexadecimal quantityBlob gas consumed, where applicable.
excessBlobGasHexadecimal quantityExcess blob gas used to calculate blob pricing, where applicable.
parentBeaconBlockRoot32-byte hashParent beacon-block root, where applicable.
sizeHexadecimal quantityEncoded block size in bytes.
transactionsTransaction hashes / Full transactionsTransaction hashes or full objects, according to the request.
withdrawalsWithdrawalsWithdrawals included in the block, where applicable.
unclesUnclesHashes of the uncles included in the block.
requestsHash32-byte hashCommitment to execution requests, where applicable.

Example ​

Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.

sh
curl -X POST "<gateway-url>/<service-url>" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByHash","params":["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",false]}'

Illustrative response; values depend on the selected network and request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  }
}

Direct behavior ​

Requests for older chain data are automatically routed to providers with full chain history. This covers blocks, transactions, receipts, and logs independently of historical account state.

The gateway uses the block’s age when known. If the age is unknown, it starts with a full-history provider. A missing result from a provider without the required history is not accepted as proof that the data does not exist.

For providers ​

Support the required recent chain-history service. Advertise full chain history only when all included method families and lookup indexes work back to genesis.

See provider qualification for checks and continued eligibility.

Unstoppable Infrastructure.