{"eip":3046,"title":"Adds `baseFee` to `eth_getUncleByBlockNumberAndIndex`","description":"Add basefee field to ethgetUncleByBlockNumberAndIndex RPC endpoint response.","authors":["Abdelhamid Bakhta (@abdelhamidbakhta)"],"status":"Stagnant","type":"Standards Track","category":"Interface","created":"2020-10-14","requires":[1474,1559],"discussionsTo":"https://ethereum-magicians.org/t/add-basefee-to-eth-getunclebyblocknumberandindex/4830","repo":"EIPs","label":"EIP-3046","officialUrl":"https://eips.ethereum.org/EIPS/eip-3046","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3046.md","url":"https://eips.huatuo.xyz/eip-3046/","tldr":{"en":"Proposed adding the EIP-1559 base fee to the uncle blocks returned by eth_getUncleByBlockNumberAndIndex, so RPC clients see it for every post-London header.","ja":"eth_getUncleByBlockNumberAndIndex が返すアンクルブロックに EIP-1559 のベースフィーを追加し、London 以降のすべてのヘッダーで RPC クライアントがそれを参照できるようにすることを提案した。","ko":"eth_getUncleByBlockNumberAndIndex가 반환하는 엉클 블록에 EIP-1559 기본 수수료를 추가해, 런던 이후의 모든 헤더에서 RPC 클라이언트가 이를 볼 수 있게 하자고 제안했다.","zh":"提议在 eth_getUncleByBlockNumberAndIndex 返回的叔块（uncle）中加入 EIP-1559 的基础费用，使 RPC 客户端能在伦敦升级之后的每个区块头中看到它。"},"tags":["json-rpc","base-fee","uncles","interface","api"],"explainers":{"en":{"lang":"en","tldr":"Proposed adding the EIP-1559 base fee to the uncle blocks returned by eth_getUncleByBlockNumberAndIndex, so RPC clients see it for every post-London header.","tags":["json-rpc","base-fee","uncles","interface","api"],"related":[1559,1474,3041,3044,3045],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-3046/","markdown":"## What problem does it solve?\n\n[EIP-1559](/eip-1559/) added a **base fee per gas** to every block header. Tools that estimate gas prices or analyze fee history need that value for any block they look at, including *uncle* (ommer) blocks: valid blocks that were mined but not included in the canonical chain under proof-of-work.\n\nThe JSON-RPC method `eth_getUncleByBlockNumberAndIndex` (specified in [EIP-1474](/eip-1474/)) returns an uncle's header fields. Without an explicit rule, clients might or might not include the new field. EIP-3046 makes it explicit.\n\n## How it works\n\nThe change is a single new field in the response:\n\n- For uncles whose block number is **on or after** the EIP-1559 fork block, the `result` object **must** include `baseFee` (a hex `Quantity`).\n- For uncles **before** the fork, it **must not** include `baseFee`.\n- Request parameters are unchanged: a block number (or tag) and an uncle index.\n\nAdding a field rather than a new endpoint was chosen as the simplest change for clients to adopt, and omitting it on old blocks keeps responses for historical data unchanged.\n\n## Sample code\n\nRequest:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n  \"params\": [\"\u003cpost-London block number\u003e\", \"0x0\"]\n}\n```\n\nResponse for a post-1559 uncle, as proposed (other header fields abbreviated):\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"result\": {\n    \"number\": \"0x…\",\n    \"hash\": \"0x…\",\n    \"parentHash\": \"0x…\",\n    \"gasLimit\": \"0x…\",\n    \"gasUsed\": \"0x…\",\n    \"baseFee\": \"0x7\",\n    \"uncles\": []\n  }\n}\n```\n\nThe same call from TypeScript:\n\n```ts\nconst uncle = await provider.send(\"eth_getUncleByBlockNumberAndIndex\", [blockTag, \"0x0\"]);\n// Deployed clients name the field baseFeePerGas; this EIP proposed baseFee.\nconst baseFee = BigInt(uncle?.baseFeePerGas ?? uncle?.baseFee ?? 0);\n```\n\n## Things to know\n\n- Status is **Stagnant**. Sibling proposals made the same change for other methods: [EIP-3041](/eip-3041/) (`eth_getBlockByHash`), [EIP-3044](/eip-3044/) (`eth_getBlockByNumber`) and [EIP-3045](/eip-3045/) (`eth_getUncleByBlockHashAndIndex`).\n- The field name proposed here, `baseFee`, is **not** what clients shipped. Ethereum JSON-RPC (as used by Geth and others) returns `baseFeePerGas` in block and header objects. Code against the actual client behavior, not this EIP's example.\n- Uncles no longer occur after the Merge (proof-of-stake has no ommers), so this method only returns data for historical proof-of-work blocks.\n- Inside contracts, the current block's base fee is available via the `BASEFEE` opcode from [EIP-3198](/eip-3198/).\n"},"ja":{"lang":"ja","tldr":"eth_getUncleByBlockNumberAndIndex が返すアンクルブロックに EIP-1559 のベースフィーを追加し、London 以降のすべてのヘッダーで RPC クライアントがそれを参照できるようにすることを提案した。","tags":["json-rpc","base-fee","uncles","interface","api"],"related":[1559,1474,3041,3044,3045],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-3046/","markdown":"## 何を解決するのか\n\n[EIP-1559](/eip-1559/) は、すべてのブロックヘッダーに**ガスあたりのベースフィー**を追加しました。ガス価格を見積もったり、手数料の履歴を分析したりするツールは、見るすべてのブロックについてこの値を必要とします。これには*アンクル*（ommer）ブロックも含まれます。プルーフ・オブ・ワーク下でマイニングされた有効なブロックのうち、正規チェーンに含まれなかったものです。\n\nJSON-RPC メソッド `eth_getUncleByBlockNumberAndIndex`（[EIP-1474](/eip-1474/) で規定）は、アンクルのヘッダーフィールドを返します。明示的なルールがなければ、クライアントによって新しいフィールドを含めたり含めなかったりします。EIP-3046 はこれを明示します。\n\n## 仕組み\n\n変更は、レスポンスに新しいフィールドを 1 つ追加することだけです。\n\n- ブロック番号が EIP-1559 のフォークブロック**以降**であるアンクルでは、`result` オブジェクトに `baseFee`（16 進の `Quantity`）を含め**なければなりません**。\n- フォーク**以前**のアンクルでは、`baseFee` を含めて**はなりません**。\n- リクエストのパラメーターは変わりません。ブロック番号（またはタグ）とアンクルのインデックスです。\n\n新しいエンドポイントではなくフィールドを追加する方法が選ばれたのは、クライアントにとって採用しやすい最も簡単な変更だからです。また、古いブロックでは含めないことで、過去データに対するレスポンスが変わらないようにしています。\n\n## サンプルコード\n\nリクエスト:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n  \"params\": [\"\u003cpost-London block number\u003e\", \"0x0\"]\n}\n```\n\n提案どおりの、1559 以降のアンクルに対するレスポンス（その他のヘッダーフィールドは省略）:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"result\": {\n    \"number\": \"0x…\",\n    \"hash\": \"0x…\",\n    \"parentHash\": \"0x…\",\n    \"gasLimit\": \"0x…\",\n    \"gasUsed\": \"0x…\",\n    \"baseFee\": \"0x7\",\n    \"uncles\": []\n  }\n}\n```\n\nTypeScript からの同じ呼び出し:\n\n```ts\nconst uncle = await provider.send(\"eth_getUncleByBlockNumberAndIndex\", [blockTag, \"0x0\"]);\n// Deployed clients name the field baseFeePerGas; this EIP proposed baseFee.\nconst baseFee = BigInt(uncle?.baseFeePerGas ?? uncle?.baseFee ?? 0);\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。姉妹提案が、他のメソッドに対して同じ変更を行いました。[EIP-3041](/eip-3041/)（`eth_getBlockByHash`）、[EIP-3044](/eip-3044/)（`eth_getBlockByNumber`）、[EIP-3045](/eip-3045/)（`eth_getUncleByBlockHashAndIndex`）です。\n- ここで提案されたフィールド名 `baseFee` は、クライアントが実際に出荷したものでは**ありません**。Ethereum の JSON-RPC（Geth などが採用）は、ブロックやヘッダーのオブジェクトで `baseFeePerGas` を返します。この EIP の例ではなく、実際のクライアントの挙動に合わせてコードを書いてください。\n- The Merge 以降、アンクルは発生しなくなりました（プルーフ・オブ・ステークには ommer がありません）。そのためこのメソッドは、過去のプルーフ・オブ・ワークのブロックに対してのみデータを返します。\n- コントラクト内では、現在のブロックのベースフィーは [EIP-3198](/eip-3198/) の `BASEFEE` オペコードで取得できます。\n"},"ko":{"lang":"ko","tldr":"eth_getUncleByBlockNumberAndIndex가 반환하는 엉클 블록에 EIP-1559 기본 수수료를 추가해, 런던 이후의 모든 헤더에서 RPC 클라이언트가 이를 볼 수 있게 하자고 제안했다.","tags":["json-rpc","base-fee","uncles","interface","api"],"related":[1559,1474,3041,3044,3045],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-3046/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-1559](/eip-1559/)는 모든 블록 헤더에 **가스당 기본 수수료**를 추가했습니다. 가스 가격을 추정하거나 수수료 이력을 분석하는 도구는 살펴보는 모든 블록에 대해 이 값이 필요하며, 여기에는 *엉클*(ommer) 블록도 포함됩니다. 작업 증명 하에서 채굴되었지만 정규 체인에 포함되지 못한 유효한 블록입니다.\n\nJSON-RPC 메서드 `eth_getUncleByBlockNumberAndIndex`([EIP-1474](/eip-1474/)에 명세됨)는 엉클의 헤더 필드를 반환합니다. 명시적인 규칙이 없으면 클라이언트에 따라 새 필드를 포함할 수도, 포함하지 않을 수도 있습니다. EIP-3046은 이를 명시합니다.\n\n## 어떻게 동작하나요?\n\n변경은 응답에 새 필드 하나를 추가하는 것뿐입니다.\n\n- 블록 번호가 EIP-1559 포크 블록 **이후**인 엉클의 경우, `result` 객체에 `baseFee`(16진수 `Quantity`)를 반드시 **포함해야 합니다**.\n- 포크 **이전**의 엉클에는 `baseFee`를 포함해서는 **안 됩니다**.\n- 요청 파라미터는 그대로입니다. 블록 번호(또는 태그)와 엉클 인덱스입니다.\n\n새 엔드포인트가 아니라 필드를 추가하는 방식을 택한 것은 클라이언트가 도입하기에 가장 간단한 변경이기 때문이며, 오래된 블록에서는 이를 생략해 과거 데이터에 대한 응답이 바뀌지 않게 합니다.\n\n## 샘플 코드\n\n요청:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n  \"params\": [\"\u003cpost-London block number\u003e\", \"0x0\"]\n}\n```\n\n제안된 대로, 1559 이후 엉클에 대한 응답(다른 헤더 필드는 생략):\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"result\": {\n    \"number\": \"0x…\",\n    \"hash\": \"0x…\",\n    \"parentHash\": \"0x…\",\n    \"gasLimit\": \"0x…\",\n    \"gasUsed\": \"0x…\",\n    \"baseFee\": \"0x7\",\n    \"uncles\": []\n  }\n}\n```\n\nTypeScript에서 같은 호출:\n\n```ts\nconst uncle = await provider.send(\"eth_getUncleByBlockNumberAndIndex\", [blockTag, \"0x0\"]);\n// Deployed clients name the field baseFeePerGas; this EIP proposed baseFee.\nconst baseFee = BigInt(uncle?.baseFeePerGas ?? uncle?.baseFee ?? 0);\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 자매 제안들이 다른 메서드에 같은 변경을 했습니다. [EIP-3041](/eip-3041/)(`eth_getBlockByHash`), [EIP-3044](/eip-3044/)(`eth_getBlockByNumber`), [EIP-3045](/eip-3045/)(`eth_getUncleByBlockHashAndIndex`)입니다.\n- 여기서 제안된 필드 이름 `baseFee`는 클라이언트가 실제로 내놓은 이름이 **아닙니다**. 이더리움 JSON-RPC(Geth 등이 사용)는 블록과 헤더 객체에서 `baseFeePerGas`를 반환합니다. 이 EIP의 예시가 아니라 실제 클라이언트의 동작에 맞춰 코드를 작성하세요.\n- 머지(Merge) 이후에는 엉클이 더 이상 생기지 않으므로(지분 증명에는 ommer가 없습니다), 이 메서드는 과거 작업 증명 블록에 대해서만 데이터를 반환합니다.\n- 컨트랙트 안에서는 현재 블록의 기본 수수료를 [EIP-3198](/eip-3198/)의 `BASEFEE` 옵코드로 얻을 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"提议在 eth_getUncleByBlockNumberAndIndex 返回的叔块（uncle）中加入 EIP-1559 的基础费用，使 RPC 客户端能在伦敦升级之后的每个区块头中看到它。","tags":["json-rpc","base-fee","uncles","interface","api"],"related":[1559,1474,3041,3044,3045],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-3046/","markdown":"## 它解决什么问题？\n\n[EIP-1559](/eip-1559/) 为每个区块头增加了**每 gas 基础费用**。估算 gas 价格或分析费用历史的工具，对它们查看的任何区块都需要这个值，包括*叔块*（ommer）：在工作量证明下被挖出、但没有被纳入规范链的有效区块。\n\nJSON-RPC 方法 `eth_getUncleByBlockNumberAndIndex`（在 [EIP-1474](/eip-1474/) 中规定）返回叔块的区块头字段。如果没有明确规则，客户端可能包含也可能不包含这个新字段。EIP-3046 将其明确化。\n\n## 它如何运作\n\n变更只是响应中新增一个字段：\n\n- 对于区块号**等于或晚于** EIP-1559 分叉区块的叔块，`result` 对象**必须**包含 `baseFee`（十六进制 `Quantity`）。\n- 对于分叉**之前**的叔块，**不得**包含 `baseFee`。\n- 请求参数不变：一个区块号（或标签）和一个叔块索引。\n\n选择增加字段而不是新端点，是因为这是客户端最容易采纳的变更；在旧区块上省略它，则使历史数据的响应保持不变。\n\n## 示例代码\n\n请求：\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n  \"params\": [\"\u003cpost-London block number\u003e\", \"0x0\"]\n}\n```\n\n按提议，对 1559 之后的叔块的响应（其他区块头字段已省略）：\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1559,\n  \"result\": {\n    \"number\": \"0x…\",\n    \"hash\": \"0x…\",\n    \"parentHash\": \"0x…\",\n    \"gasLimit\": \"0x…\",\n    \"gasUsed\": \"0x…\",\n    \"baseFee\": \"0x7\",\n    \"uncles\": []\n  }\n}\n```\n\n用 TypeScript 发起同样的调用：\n\n```ts\nconst uncle = await provider.send(\"eth_getUncleByBlockNumberAndIndex\", [blockTag, \"0x0\"]);\n// Deployed clients name the field baseFeePerGas; this EIP proposed baseFee.\nconst baseFee = BigInt(uncle?.baseFeePerGas ?? uncle?.baseFee ?? 0);\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。同系列的提案对其他方法做了同样的修改：[EIP-3041](/eip-3041/)（`eth_getBlockByHash`）、[EIP-3044](/eip-3044/)（`eth_getBlockByNumber`）和 [EIP-3045](/eip-3045/)（`eth_getUncleByBlockHashAndIndex`）。\n- 这里提议的字段名 `baseFee` **不是**客户端实际发布的名称。以太坊 JSON-RPC（Geth 等使用）在区块和区块头对象中返回 `baseFeePerGas`。请按客户端的实际行为编写代码，而不是照搬这份 EIP 中的示例。\n- 合并（Merge）之后不再出现叔块（权益证明没有 ommer），因此该方法只会为历史上的工作量证明区块返回数据。\n- 在合约内部，可以通过 [EIP-3198](/eip-3198/) 的 `BASEFEE` 操作码获取当前区块的基础费用。\n"}}}
