BNB Smart Chain

BNB Smart Chain

eth_getUncleCountByBlockHash

Ask for an uncle tally on chain 56 and the answer is fixed before you send the request: 0x0. BNB Smart Chain spends BNB for gas and runs PoSA consensus, whose deterministic fast-finality block production never leaves orphaned siblings behind. Sent to https://bsc.therpc.io/YOUR_API_KEY, eth_getUncleCountByBlockHash reports how many ommers a block (named by its hash) references. The PoSA validator schedule accepts exactly one block per slot, which pins that figure at zero, so the method lives on here as an Ethereum-compatibility shim that always answers 0x0.

Not available on this chainBSC's PoSA consensus produces no uncle blocks, so the uncle count for any block is always 0x0.

Use cases

  • Probe whether a block has any uncles before spending calls on eth_getUncleByBlockHashAndIndex; on chain 56 the 0x0 answer lets you skip those follow-ups entirely.
  • Assemble an uncle-rate time-series for network-health research, where BNB Smart Chain's flat zero readings document the absence of forking under PoSA.

Parameters

#NameTypeRequiredDescription
1blockHashstring (hex)YesThe hash of the block to count uncles in.

Response

TypeDescription
string (hex)Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS).

Example request

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000000"],
"id": 1
}'

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32602Invalid paramsBlock hash is malformed.

Common pitfalls

  • On BNB Smart Chain every block returns 0x0; the method only ever carries meaningful counts on legacy PoW chains, so treat any non-zero expectation as a bug in your assumptions.
  • Supplying a hash the node does not know yields null rather than 0x0 — distinguish "block absent" from "block present with zero uncles" before acting.

Supported networks

  • Mainnet — Chain ID: 56
  • Testnet — Chain ID: 97

See also

Parameters

0x-prefixed 32-byte block hash

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getUncleCountByBlockHash","params":["0x0000000000000000000000000000000000000000000000000000000000000000"]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.