{"eip":3651,"title":"Warm COINBASE","description":"Starts the `COINBASE` address warm","authors":["William Morriss (@wjmelements)"],"status":"Final","type":"Standards Track","category":"Core","created":"2021-07-12","requires":[2929],"discussionsTo":"https://ethereum-magicians.org/t/eip-3651-warm-coinbase/6640","repo":"EIPs","label":"EIP-3651","officialUrl":"https://eips.ethereum.org/EIPS/eip-3651","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3651.md","url":"https://eips.huatuo.xyz/eip-3651/","tldr":{"en":"Makes the block producer's address (COINBASE) warm at the start of every transaction, so paying or checking it costs 100 gas instead of a 2,600-gas cold access.","ja":"ブロックプロデューサーのアドレス（COINBASE）をすべてのトランザクションの開始時に warm にし、そのアドレスへの支払いや確認のコストを、コールドアクセスの 2,600 gas ではなく 100 gas にする。","ko":"블록 생산자의 주소(COINBASE)를 모든 트랜잭션의 시작 시점에 warm 상태로 만들어, 이 주소에 지불하거나 확인하는 비용을 2,600 gas의 콜드 접근 대신 100 gas로 낮춘다.","zh":"让区块生产者的地址（COINBASE）在每笔交易开始时就处于 warm 状态，这样向它付款或检查它只需 100 gas，而不是 2,600 gas 的冷访问。"},"tags":["gas","evm","core","shanghai","coinbase"],"explainers":{"en":{"lang":"en","tldr":"Makes the block producer's address (COINBASE) warm at the start of every transaction, so paying or checking it costs 100 gas instead of a 2,600-gas cold access.","tags":["gas","evm","core","shanghai","coinbase"],"related":[2929,2930,3855,3860],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-3651/","markdown":"## What problem does it solve?\n\n[EIP-2929](/eip-2929/) split account access into *cold* (first touch in a transaction, 2,600 gas) and *warm* (already touched, 100 gas). A few addresses start warm automatically: the sender (`tx.origin`), the recipient (`tx.to`) and the precompiles.\n\nThe block producer's address, returned by the `COINBASE` opcode, was not on that list, even though clients always load it anyway because it receives the transaction fees. That made a popular pattern overpriced: searchers and bundlers often pay the block producer directly with ETH (`block.coinbase.transfer(...)`) as a conditional payment that only happens if the transaction succeeds. Paying 2,600 gas for that first touch pushed people toward alternatives such as paying in [ERC-20](/eip-20/) tokens, while the authors argue ETH should be the primary way to pay for transactions.\n\n## How it works\n\nThe whole specification is one line: at the start of transaction execution, the `accessed_addresses` set is initialised to also include the address returned by `COINBASE` (`0x41`).\n\nEffects:\n\n- The first `BALANCE`, `EXTCODESIZE`, `EXTCODEHASH`, `CALL` etc. targeting `block.coinbase` in a transaction is charged the warm price (100) instead of the cold price (2,600).\n- Nothing else changes: the `COINBASE` opcode itself still costs the same, and no new opcode or transaction field is added.\n- It is consistent with the rationale for the existing warm set: these are the accounts a client must load anyway to validate and execute the transaction.\n\nThe change shipped in the Shanghai upgrade alongside [EIP-3855](/eip-3855/) (`PUSH0`) and [EIP-3860](/eip-3860/) (initcode limits).\n\n## Sample code\n\nA conditional \"tip the builder\" pattern that benefits from the warm coinbase:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract PayBuilder {\n    /// Runs some logic and only pays the block producer if it succeeds.\n    function executeAndTip(address target, bytes calldata data) external payable {\n        (bool ok, ) = target.call(data);\n        require(ok, \"inner call failed\"); // revert =\u003e no tip is paid\n\n        // Since EIP-3651 this first access to block.coinbase is warm (100 gas),\n        // not cold (2,600 gas).\n        (bool sent, ) = block.coinbase.call{value: msg.value}(\"\");\n        require(sent, \"tip failed\");\n    }\n}\n```\n\n## Things to know\n\n- Status: **Final**, live on mainnet since Shanghai.\n- Savings are 2,500 gas only on the *first* access in a transaction; later accesses were already warm.\n- You no longer need to list `block.coinbase` in an [EIP-2930](/eip-2930/) access list to get the warm price.\n- Since the Merge, `COINBASE` is the fee recipient chosen by the block proposer/builder, not a miner, but the logic of the EIP is unchanged.\n"},"ja":{"lang":"ja","tldr":"ブロックプロデューサーのアドレス（COINBASE）をすべてのトランザクションの開始時に warm にし、そのアドレスへの支払いや確認のコストを、コールドアクセスの 2,600 gas ではなく 100 gas にする。","tags":["gas","evm","core","shanghai","coinbase"],"related":[2929,2930,3855,3860],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-3651/","markdown":"## 何を解決するのか\n\n[EIP-2929](/eip-2929/) は、アカウントへのアクセスを*コールド*（トランザクション内での最初のアクセス、2,600 gas）と*ウォーム*（すでにアクセス済み、100 gas）に分けました。いくつかのアドレスは自動的に warm の状態から始まります。送信者（`tx.origin`）、受信者（`tx.to`）、precompile です。\n\n`COINBASE` opcode が返すブロックプロデューサーのアドレスは、そのリストに入っていませんでした。トランザクション手数料を受け取るため、クライアントはどのみち必ずロードしているにもかかわらずです。そのせいで、よく使われるパターンが割高になっていました。サーチャーやバンドラーは、トランザクションが成功した場合にのみ発生する条件付きの支払いとして、ETH でブロックプロデューサーに直接支払う（`block.coinbase.transfer(...)`）ことがよくあります。その最初のアクセスに 2,600 gas かかるため、[ERC-20](/eip-20/) トークンで支払うなどの代替手段に人が流れていました。一方、作者たちは、トランザクションの支払いの主な手段は ETH であるべきだと主張しています。\n\n## 仕組み\n\n仕様全体は 1 行です。トランザクションの実行開始時に、`accessed_addresses` セットを、`COINBASE`（`0x41`）が返すアドレスも含むように初期化します。\n\n効果は次のとおりです。\n\n- トランザクション内で `block.coinbase` を対象とする最初の `BALANCE`、`EXTCODESIZE`、`EXTCODEHASH`、`CALL` などには、コールド価格（2,600）ではなくウォーム価格（100）が課金されます。\n- それ以外は何も変わりません。`COINBASE` opcode 自体のコストは同じで、新しい opcode やトランザクションフィールドは追加されません。\n- 既存のウォームセットの根拠とも整合しています。これらは、トランザクションを検証・実行するためにクライアントがどのみちロードしなければならないアカウントです。\n\nこの変更は、[EIP-3855](/eip-3855/)（`PUSH0`）、[EIP-3860](/eip-3860/)（initcode の上限）とともに Shanghai アップグレードで出荷されました。\n\n## サンプルコード\n\nwarm な coinbase の恩恵を受ける、条件付きの「ビルダーへのチップ」パターンです。\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract PayBuilder {\n    /// Runs some logic and only pays the block producer if it succeeds.\n    function executeAndTip(address target, bytes calldata data) external payable {\n        (bool ok, ) = target.call(data);\n        require(ok, \"inner call failed\"); // revert =\u003e no tip is paid\n\n        // Since EIP-3651 this first access to block.coinbase is warm (100 gas),\n        // not cold (2,600 gas).\n        (bool sent, ) = block.coinbase.call{value: msg.value}(\"\");\n        require(sent, \"tip failed\");\n    }\n}\n```\n\n## 知っておくべきこと\n\n- ステータス：**Final**。Shanghai 以降、メインネットで稼働しています。\n- 節約できるのは、トランザクション内の*最初の*アクセスの 2,500 gas だけです。それ以降のアクセスはもともとウォームでした。\n- warm 価格を得るために、`block.coinbase` を [EIP-2930](/eip-2930/) のアクセスリストに載せる必要はなくなりました。\n- The Merge 以降、`COINBASE` はマイナーではなく、ブロックのプロポーザー／ビルダーが選ぶ手数料受取人ですが、この EIP のロジックは変わりません。\n"},"ko":{"lang":"ko","tldr":"블록 생산자의 주소(COINBASE)를 모든 트랜잭션의 시작 시점에 warm 상태로 만들어, 이 주소에 지불하거나 확인하는 비용을 2,600 gas의 콜드 접근 대신 100 gas로 낮춘다.","tags":["gas","evm","core","shanghai","coinbase"],"related":[2929,2930,3855,3860],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-3651/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-2929](/eip-2929/)는 계정 접근을 *콜드*(트랜잭션에서 처음 접근, 2,600 gas)와 *웜*(이미 접근함, 100 gas)으로 나누었습니다. 몇몇 주소는 자동으로 웜 상태에서 시작합니다. 발신자(`tx.origin`), 수신자(`tx.to`), 그리고 precompile입니다.\n\n`COINBASE` opcode가 반환하는 블록 생산자의 주소는 그 목록에 없었습니다. 트랜잭션 수수료를 받기 때문에 클라이언트가 어차피 항상 로드하는데도 말입니다. 그 때문에 널리 쓰이는 패턴의 가격이 지나치게 높았습니다. 서쳐와 번들러는 트랜잭션이 성공할 때만 발생하는 조건부 지불로 ETH를 블록 생산자에게 직접 지불하는 경우가 많습니다(`block.coinbase.transfer(...)`). 그 첫 접근에 2,600 gas를 내야 하니 [ERC-20](/eip-20/) 토큰으로 지불하는 것 같은 대안으로 사람들이 쏠렸는데, 작성자들은 트랜잭션 비용을 내는 주된 방법은 ETH여야 한다고 주장합니다.\n\n## 어떻게 동작하나요?\n\n명세 전체는 한 줄입니다. 트랜잭션 실행이 시작될 때 `accessed_addresses` 집합이 `COINBASE`(`0x41`)가 반환하는 주소도 포함하도록 초기화됩니다.\n\n효과는 다음과 같습니다.\n\n- 트랜잭션에서 `block.coinbase`를 대상으로 하는 첫 `BALANCE`, `EXTCODESIZE`, `EXTCODEHASH`, `CALL` 등에는 콜드 가격(2,600) 대신 웜 가격(100)이 부과됩니다.\n- 그 외에는 아무것도 바뀌지 않습니다. `COINBASE` opcode 자체의 비용은 같고, 새 opcode나 트랜잭션 필드는 추가되지 않습니다.\n- 기존 웜 집합의 근거와도 일치합니다. 이들은 클라이언트가 트랜잭션을 검증하고 실행하기 위해 어차피 로드해야 하는 계정입니다.\n\n이 변경은 [EIP-3855](/eip-3855/)(`PUSH0`), [EIP-3860](/eip-3860/)(initcode 한도)와 함께 Shanghai 업그레이드로 출시되었습니다.\n\n## 샘플 코드\n\n웜 상태의 coinbase 덕분에 이점을 얻는 조건부 \"빌더에게 팁 주기\" 패턴입니다.\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract PayBuilder {\n    /// Runs some logic and only pays the block producer if it succeeds.\n    function executeAndTip(address target, bytes calldata data) external payable {\n        (bool ok, ) = target.call(data);\n        require(ok, \"inner call failed\"); // revert =\u003e no tip is paid\n\n        // Since EIP-3651 this first access to block.coinbase is warm (100 gas),\n        // not cold (2,600 gas).\n        (bool sent, ) = block.coinbase.call{value: msg.value}(\"\");\n        require(sent, \"tip failed\");\n    }\n}\n```\n\n## 알아둘 점\n\n- 상태: **Final**. Shanghai부터 메인넷에서 동작 중입니다.\n- 절감되는 것은 트랜잭션에서 *첫 번째* 접근의 2,500 gas뿐입니다. 이후 접근은 원래 웜이었습니다.\n- 웜 가격을 받기 위해 `block.coinbase`를 [EIP-2930](/eip-2930/) 액세스 리스트에 넣을 필요가 더는 없습니다.\n- The Merge 이후 `COINBASE`는 채굴자가 아니라 블록 제안자/빌더가 고른 수수료 수취인이지만, 이 EIP의 논리는 달라지지 않습니다.\n"},"zh":{"lang":"zh","tldr":"让区块生产者的地址（COINBASE）在每笔交易开始时就处于 warm 状态，这样向它付款或检查它只需 100 gas，而不是 2,600 gas 的冷访问。","tags":["gas","evm","core","shanghai","coinbase"],"related":[2929,2930,3855,3860],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-3651/","markdown":"## 它解决什么问题？\n\n[EIP-2929](/eip-2929/) 把账户访问分为*冷*（交易中首次接触，2,600 gas）和*热*（已经接触过，100 gas）。有几个地址会自动以热状态开始：发送者（`tx.origin`）、接收者（`tx.to`）和预编译合约。\n\n由 `COINBASE` 操作码返回的区块生产者地址不在这个名单上，尽管客户端无论如何都会加载它，因为它要接收交易手续费。这使得一种常见的模式定价过高：搜索者（searcher）和打包者（bundler）经常直接用 ETH 向区块生产者付款（`block.coinbase.transfer(...)`），作为只有在交易成功时才会发生的有条件支付。为这第一次接触支付 2,600 gas，促使人们转向其他办法，例如用 [ERC-20](/eip-20/) 代币支付；而作者认为，ETH 才应该是支付交易的主要方式。\n\n## 它如何运作\n\n整个规范只有一行：在交易执行开始时，`accessed_addresses` 集合被初始化为同时包含 `COINBASE`（`0x41`）返回的地址。\n\n效果：\n\n- 交易中第一次针对 `block.coinbase` 的 `BALANCE`、`EXTCODESIZE`、`EXTCODEHASH`、`CALL` 等操作，按热价格（100）而不是冷价格（2,600）收费。\n- 其他一切都不变：`COINBASE` 操作码本身的成本不变，也没有新增操作码或交易字段。\n- 这与现有热集合的理由一致：这些都是客户端为了验证和执行交易而无论如何都必须加载的账户。\n\n这项变更随 Shanghai 升级一起上线，同时上线的还有 [EIP-3855](/eip-3855/)（`PUSH0`）和 [EIP-3860](/eip-3860/)（initcode 限制）。\n\n## 示例代码\n\n一个受益于热 coinbase 的有条件\"给构建者小费\"模式：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract PayBuilder {\n    /// Runs some logic and only pays the block producer if it succeeds.\n    function executeAndTip(address target, bytes calldata data) external payable {\n        (bool ok, ) = target.call(data);\n        require(ok, \"inner call failed\"); // revert =\u003e no tip is paid\n\n        // Since EIP-3651 this first access to block.coinbase is warm (100 gas),\n        // not cold (2,600 gas).\n        (bool sent, ) = block.coinbase.call{value: msg.value}(\"\");\n        require(sent, \"tip failed\");\n    }\n}\n```\n\n## 需要注意\n\n- 状态：**Final**，自 Shanghai 起已在主网上线。\n- 只有交易中*第一次*访问才能节省 2,500 gas；之后的访问本来就是热的。\n- 你不再需要把 `block.coinbase` 列入 [EIP-2930](/eip-2930/) 访问列表来获得热价格。\n- 自合并以来，`COINBASE` 是由区块提议者/构建者选择的手续费接收者，而不是矿工，但这份 EIP 的逻辑没有变化。\n"}},"requiredBy":[8289]}
