{"eip":3044,"title":"Adds `baseFee` to `eth_getBlockByNumber`","description":"Add basefee field to ethgetBlockByNumber 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/eip-3044-add-basefee-to-eth-getblockbynumber/4828","repo":"EIPs","label":"EIP-3044","officialUrl":"https://eips.ethereum.org/EIPS/eip-3044","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3044.md","url":"https://eips.huatuo.xyz/eip-3044/","tldr":{"en":"A stagnant JSON-RPC proposal to include each block's EIP-1559 base fee in the `eth_getBlockByNumber` response, the idea behind today's `baseFeePerGas` field.","ja":"各ブロックの EIP-1559 base fee を `eth_getBlockByNumber` のレスポンスに含める、停滞（Stagnant）中の JSON-RPC 提案。現在の `baseFeePerGas` フィールドの元になったアイデア。","ko":"각 블록의 EIP-1559 base fee를 `eth_getBlockByNumber` 응답에 포함하자는 정체(Stagnant) 상태의 JSON-RPC 제안. 오늘날 `baseFeePerGas` 필드의 바탕이 된 아이디어다.","zh":"一项处于停滞（Stagnant）状态的 JSON-RPC 提案：在 `eth_getBlockByNumber` 的响应中包含每个区块的 EIP-1559 base fee，也就是今天 `baseFeePerGas` 字段背后的想法。"},"tags":["json-rpc","base-fee","interface","eip-1559","stagnant"],"explainers":{"en":{"lang":"en","tldr":"A stagnant JSON-RPC proposal to include each block's EIP-1559 base fee in the `eth_getBlockByNumber` response, the idea behind today's `baseFeePerGas` field.","tags":["json-rpc","base-fee","interface","eip-1559","stagnant"],"related":[1559,1474,3198],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-3044/","markdown":"## What problem does it solve?\n\n[EIP-1559](/eip-1559/) added a protocol-computed base fee per gas to every block header. Wallets and gas estimators need that number to choose sensible `maxFeePerGas` values, but the standard JSON-RPC block object ([EIP-1474](/eip-1474/)) had no field for it.\n\nEIP-3044 proposed the simplest fix: add the base fee to the existing `eth_getBlockByNumber` result rather than create a new endpoint.\n\n## How it works\n\n- Parameters of `eth_getBlockByNumber` are unchanged.\n- For blocks **on or after** the EIP-1559 fork, the result object **must** include the base fee as a hex `Quantity`.\n- For blocks **before** the fork, the field **must not** be present, so older responses are unchanged and existing clients are not broken.\n- The field is purely informational and has no consensus effect.\n\nThe proposal names the field `baseFee`. When clients actually shipped EIP-1559 in the London upgrade, the field that appeared in block objects is named **`baseFeePerGas`**, and it is returned by `eth_getBlockByHash` as well.\n\n## Sample code\n\nRequest and an abridged response as clients return it today:\n\n```sh\ncurl -s -X POST -H 'content-type: application/json' \"$RPC_URL\" --data '{\n  \"jsonrpc\": \"2.0\", \"id\": 1,\n  \"method\": \"eth_getBlockByNumber\",\n  \"params\": [\"latest\", false]\n}'\n```\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"number\": \"0x1b4\",\n    \"gasLimit\": \"0x1c9c380\",\n    \"gasUsed\": \"0x9f759\",\n    \"baseFeePerGas\": \"0x7\",\n    \"transactions\": []\n  }\n}\n```\n\nReading it with ethers v6:\n\n```ts\nconst block = await provider.getBlock(\"latest\");\nconsole.log(block?.baseFeePerGas); // bigint in wei, null for pre-London blocks\n```\n\n## Things to know\n\n- Status is **Stagnant**. The proposal itself was never finalized, but the behaviour it describes — an extra base-fee field, absent on pre-London blocks — is what clients implemented, under the name `baseFeePerGas`.\n- Do not code against a `baseFee` key; use `baseFeePerGas`.\n- Inside contracts, the current block's base fee is available via the `BASEFEE` opcode from [EIP-3198](/eip-3198/).\n- `eth_feeHistory` is the usual way to fetch base fees for a range of blocks at once.\n"},"ja":{"lang":"ja","tldr":"各ブロックの EIP-1559 base fee を `eth_getBlockByNumber` のレスポンスに含める、停滞（Stagnant）中の JSON-RPC 提案。現在の `baseFeePerGas` フィールドの元になったアイデア。","tags":["json-rpc","base-fee","interface","eip-1559","stagnant"],"related":[1559,1474,3198],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-3044/","markdown":"## 何を解決するのか\n\n[EIP-1559](/eip-1559/) は、プロトコルが計算するガスあたりの base fee をすべてのブロックヘッダーに追加しました。ウォレットやガス見積もりツールは、適切な `maxFeePerGas` を選ぶためにこの数値を必要としますが、標準の JSON-RPC ブロックオブジェクト（[EIP-1474](/eip-1474/)）にはそのためのフィールドがありませんでした。\n\nEIP-3044 は最もシンプルな解決策を提案しました。新しいエンドポイントを作るのではなく、既存の `eth_getBlockByNumber` の結果に base fee を追加することです。\n\n## 仕組み\n\n- `eth_getBlockByNumber` のパラメータは変更されません。\n- EIP-1559 のフォーク**以降**のブロックでは、結果のオブジェクトは base fee を 16 進の `Quantity` として**含まなければなりません**。\n- フォーク**以前**のブロックでは、このフィールドは存在**してはならず**、古いレスポンスは変わらず、既存のクライアントも壊れません。\n- このフィールドは純粋に情報提供用で、コンセンサスには影響しません。\n\nこの提案ではフィールド名を `baseFee` としています。クライアントが London アップグレードで EIP-1559 を実際に出荷したとき、ブロックオブジェクトに現れたフィールドの名前は **`baseFeePerGas`** で、`eth_getBlockByHash` でも返されます。\n\n## サンプルコード\n\n現在クライアントが返すリクエストと、省略したレスポンスの例:\n\n```sh\ncurl -s -X POST -H 'content-type: application/json' \"$RPC_URL\" --data '{\n  \"jsonrpc\": \"2.0\", \"id\": 1,\n  \"method\": \"eth_getBlockByNumber\",\n  \"params\": [\"latest\", false]\n}'\n```\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"number\": \"0x1b4\",\n    \"gasLimit\": \"0x1c9c380\",\n    \"gasUsed\": \"0x9f759\",\n    \"baseFeePerGas\": \"0x7\",\n    \"transactions\": []\n  }\n}\n```\n\nethers v6 で読み取る:\n\n```ts\nconst block = await provider.getBlock(\"latest\");\nconsole.log(block?.baseFeePerGas); // bigint in wei, null for pre-London blocks\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。提案そのものは確定しませんでしたが、そこに書かれた挙動、つまり London 以前のブロックにはない追加の base fee フィールドは、`baseFeePerGas` という名前でクライアントに実装されたものです。\n- `baseFee` キーを前提にコードを書かないでください。`baseFeePerGas` を使ってください。\n- コントラクト内では、現在のブロックの base fee は [EIP-3198](/eip-3198/) の `BASEFEE` opcode で取得できます。\n- 複数ブロックの範囲の base fee をまとめて取得する通常の方法は `eth_feeHistory` です。\n"},"ko":{"lang":"ko","tldr":"각 블록의 EIP-1559 base fee를 `eth_getBlockByNumber` 응답에 포함하자는 정체(Stagnant) 상태의 JSON-RPC 제안. 오늘날 `baseFeePerGas` 필드의 바탕이 된 아이디어다.","tags":["json-rpc","base-fee","interface","eip-1559","stagnant"],"related":[1559,1474,3198],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-3044/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-1559](/eip-1559/)는 프로토콜이 계산하는 가스당 base fee를 모든 블록 헤더에 추가했습니다. 지갑과 가스 추정기는 적절한 `maxFeePerGas`를 고르기 위해 이 숫자가 필요한데, 표준 JSON-RPC 블록 객체([EIP-1474](/eip-1474/))에는 이를 위한 필드가 없었습니다.\n\nEIP-3044는 가장 단순한 해결책을 제안했습니다. 새 엔드포인트를 만드는 대신 기존 `eth_getBlockByNumber` 결과에 base fee를 추가하는 것입니다.\n\n## 어떻게 동작하나요?\n\n- `eth_getBlockByNumber`의 파라미터는 바뀌지 않습니다.\n- EIP-1559 포크 **이후** 블록에서는 결과 객체가 base fee를 16진수 `Quantity`로 **반드시 포함해야 합니다**.\n- 포크 **이전** 블록에서는 이 필드가 있어서는 **안 되며**, 따라서 예전 응답은 그대로이고 기존 클라이언트도 깨지지 않습니다.\n- 이 필드는 순전히 정보 제공용이며 컨센서스에는 영향이 없습니다.\n\n제안은 이 필드를 `baseFee`라고 부릅니다. 클라이언트가 London 업그레이드에서 EIP-1559를 실제로 출시했을 때 블록 객체에 나타난 필드의 이름은 **`baseFeePerGas`**이며, `eth_getBlockByHash`에서도 반환됩니다.\n\n## 샘플 코드\n\n요청과, 오늘날 클라이언트가 반환하는 형태의 축약된 응답:\n\n```sh\ncurl -s -X POST -H 'content-type: application/json' \"$RPC_URL\" --data '{\n  \"jsonrpc\": \"2.0\", \"id\": 1,\n  \"method\": \"eth_getBlockByNumber\",\n  \"params\": [\"latest\", false]\n}'\n```\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"number\": \"0x1b4\",\n    \"gasLimit\": \"0x1c9c380\",\n    \"gasUsed\": \"0x9f759\",\n    \"baseFeePerGas\": \"0x7\",\n    \"transactions\": []\n  }\n}\n```\n\nethers v6로 읽기:\n\n```ts\nconst block = await provider.getBlock(\"latest\");\nconsole.log(block?.baseFeePerGas); // bigint in wei, null for pre-London blocks\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 제안 자체는 확정되지 않았지만, 그것이 설명하는 동작, 즉 London 이전 블록에는 없는 추가 base fee 필드는 클라이언트가 `baseFeePerGas`라는 이름으로 구현한 것입니다.\n- `baseFee` 키를 기준으로 코드를 작성하지 마세요. `baseFeePerGas`를 사용하세요.\n- 컨트랙트 안에서는 현재 블록의 base fee를 [EIP-3198](/eip-3198/)의 `BASEFEE` opcode로 얻을 수 있습니다.\n- 여러 블록 구간의 base fee를 한 번에 가져오는 일반적인 방법은 `eth_feeHistory`입니다.\n"},"zh":{"lang":"zh","tldr":"一项处于停滞（Stagnant）状态的 JSON-RPC 提案：在 `eth_getBlockByNumber` 的响应中包含每个区块的 EIP-1559 base fee，也就是今天 `baseFeePerGas` 字段背后的想法。","tags":["json-rpc","base-fee","interface","eip-1559","stagnant"],"related":[1559,1474,3198],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-3044/","markdown":"## 它解决什么问题？\n\n[EIP-1559](/eip-1559/) 在每个区块头中增加了由协议计算的每 gas base fee。钱包和 gas 估算器需要这个数字来选择合理的 `maxFeePerGas`，但标准的 JSON-RPC 区块对象（[EIP-1474](/eip-1474/)）中没有对应的字段。\n\nEIP-3044 提出了最简单的修复方式：把 base fee 加到现有的 `eth_getBlockByNumber` 结果中，而不是新建一个端点。\n\n## 它如何运作\n\n- `eth_getBlockByNumber` 的参数不变。\n- 对于 EIP-1559 分叉**当时及之后**的区块，结果对象**必须**以十六进制 `Quantity` 的形式包含 base fee。\n- 对于分叉**之前**的区块，该字段**不得**出现，因此旧的响应不变，现有客户端也不会被破坏。\n- 该字段纯粹是信息性的，对共识没有影响。\n\n提案把这个字段命名为 `baseFee`。当客户端在 London 升级中真正上线 EIP-1559 时，区块对象里出现的字段名为 **`baseFeePerGas`**，`eth_getBlockByHash` 也会返回它。\n\n## 示例代码\n\n请求以及客户端如今返回的精简响应：\n\n```sh\ncurl -s -X POST -H 'content-type: application/json' \"$RPC_URL\" --data '{\n  \"jsonrpc\": \"2.0\", \"id\": 1,\n  \"method\": \"eth_getBlockByNumber\",\n  \"params\": [\"latest\", false]\n}'\n```\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"number\": \"0x1b4\",\n    \"gasLimit\": \"0x1c9c380\",\n    \"gasUsed\": \"0x9f759\",\n    \"baseFeePerGas\": \"0x7\",\n    \"transactions\": []\n  }\n}\n```\n\n用 ethers v6 读取：\n\n```ts\nconst block = await provider.getBlock(\"latest\");\nconsole.log(block?.baseFeePerGas); // bigint in wei, null for pre-London blocks\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。这项提案本身从未定稿，但它所描述的行为，即额外的 base fee 字段、在 London 之前的区块上不存在，正是客户端以 `baseFeePerGas` 这个名字实现的。\n- 不要针对 `baseFee` 这个键编写代码；请使用 `baseFeePerGas`。\n- 在合约内部，可以通过 [EIP-3198](/eip-3198/) 的 `BASEFEE` opcode 获取当前区块的 base fee。\n- 一次性获取一段区块范围的 base fee，通常的做法是使用 `eth_feeHistory`。\n"}}}
