Ethereum
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getUncleByBlockHashAndIndex looks up an uncle (ommer) header by the hash of the block that references it plus the uncle's position in that block's uncles array. Uncles are a Proof-of-Work relic on Ethereum: under the old PoW consensus, two valid blocks could land at nearly the same height, and the one that lost the race could still be referenced as an uncle so its miner earned a partial reward in ETH. That stopped at The Merge (block 15537393, September 2022), when PoS began producing exactly one block per 12-second slot. So this call returns a real header for a pre-Merge block that included an uncle, and null for anything after. Send the request to https://ethereum.therpc.io/YOUR_API_KEY on chain ID 1; the result is a header object with no transactions array.
number relative to the including block to derive how much ETH the ommer's miner earned.timestamp and difficulty as a proxy for how heavily nodes were competing for a block, since a high uncle rate signalled propagation latency on the PoW network.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | 是 | The hash of the block that references the uncle. |
| 2 | uncleIndex | string (hex) | 是 | Zero-based index of the uncle within the block's uncles array. |
| 类型 | 描述 |
|---|---|
| object | null | Block header object (no transactions array): number, hash, parentHash, sha3Uncles, miner, stateRoot, transactionsRoot, receiptsRoot, logsBloom, difficulty, gasLimit, gasUsed, timestamp, extraData, mixHash, nonce. Returns null if not found. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Block hash or uncle index is malformed. |
null. This method is only useful against pre-Merge PoW history.0x0 and 0x1. Index 0x2 or higher always returns null, even for a PoW block that did include uncles.参数
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0")