{"eip":2474,"title":"Coinbase calls","description":"Allow contracts to be called directly by block.coinbase (block validator), without a transaction.","authors":["Ricardo Guilherme Schmidt (@3esmit)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2020-01-19","discussionsTo":"https://ethresear.ch/t/gas-abstraction-non-signed-block-validator-only-procedures/4388/2","repo":"EIPs","label":"EIP-2474","officialUrl":"https://eips.ethereum.org/EIPS/eip-2474","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2474.md","url":"https://eips.huatuo.xyz/eip-2474/","tldr":{"en":"A stagnant proposal to let the block producer (block.coinbase) call contracts directly at the start of a block without signing a transaction, removing the overhead of zero-gas-price relay transactions.","ja":"トランザクションに署名せずに、ブロックプロデューサー（block.coinbase）がブロックの先頭でコントラクトを直接呼び出せるようにする、停滞中の提案。ガス価格ゼロのリレートランザクションのオーバーヘッドをなくす。","ko":"트랜잭션에 서명하지 않고도 블록 생산자(block.coinbase)가 블록 시작 시점에 컨트랙트를 직접 호출할 수 있게 하는, 정체된 제안. 가스 가격 0짜리 릴레이 트랜잭션의 오버헤드를 없앤다.","zh":"一项已停滞的提案：让区块生产者（block.coinbase）在区块开头无需签名交易即可直接调用合约，省去零 gas 价格中继交易的开销。"},"tags":["core","evm","coinbase","meta-transactions","stagnant"],"explainers":{"en":{"lang":"en","tldr":"A stagnant proposal to let the block producer (block.coinbase) call contracts directly at the start of a block without signing a transaction, removing the overhead of zero-gas-price relay transactions.","tags":["core","evm","coinbase","meta-transactions","stagnant"],"related":[1077,2711],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2474/","markdown":"## What problem does it solve?\n\nA miner or validator sometimes wants to execute a call that benefits it without really needing a sender identity. The motivating case is acting as a relayer for meta-transactions ([EIP-1077](/eip-1077/)): the block producer submits a user's signed request to a contract and gets paid by that contract, not through gas fees.\n\nToday the only way to do that is to sign an ordinary transaction, typically with `gasPrice = 0` because the producer pays itself anyway. That transaction still carries a signature that must be verified (an `ecrecover`), even though the resulting `msg.sender` is irrelevant to the call. EIP-2474 proposes dropping that overhead.\n\n## How it works\n\nThe proposal is short and leaves many details as \"TBD\":\n\n- The block producer (`block.coinbase`) may include **calls without a transaction**. These are placed first in the block.\n- They consume block gas as normal but do not pay for gas; the called contract logic is expected to compensate the producer in some other way.\n- During such a call, `tx.origin = block.coinbase` and the gas price is 0 for the whole call stack.\n- Reading `msg.sender` in a coinbase call is not allowed and would throw, since there is no signed sender.\n- Otherwise the calls behave like normal calls.\n\n## Sample code\n\nIllustrative only; this behaviour does not exist on Ethereum. A relayer-style contract that never reads `msg.sender` and pays whoever produced the block:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract CoinbaseRelay {\n    // Under EIP-2474, the block producer could call this without a signed tx.\n    // It must not touch msg.sender, which would be invalid in a coinbase call.\n    function relay(address target, bytes calldata data, uint256 reward) external {\n        (bool ok, ) = target.call(data);\n        require(ok, \"call failed\");\n        payable(block.coinbase).transfer(reward); // compensation instead of gas fees\n    }\n\n    receive() external payable {}\n}\n```\n\n## Things to know\n\n- Status: **Stagnant**. It was never scheduled for any network upgrade, and its Rationale, Test Cases, Implementation and Security sections were never filled in.\n- The spec itself flags a risk: setting `tx.origin = block.coinbase` could break badly designed contracts that use `tx.origin` for authorisation.\n- Paying the producer \"in other form\" ties the feature to block-producer-specific logic, which interacts with later changes to how blocks are built (for example proposer/builder separation); the proposal predates those changes.\n- Other approaches to gas abstraction and sponsored execution were explored separately, such as [EIP-2711](/eip-2711/) (withdrawn) and later account-abstraction work.\n"},"ja":{"lang":"ja","tldr":"トランザクションに署名せずに、ブロックプロデューサー（block.coinbase）がブロックの先頭でコントラクトを直接呼び出せるようにする、停滞中の提案。ガス価格ゼロのリレートランザクションのオーバーヘッドをなくす。","tags":["core","evm","coinbase","meta-transactions","stagnant"],"related":[1077,2711],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2474/","markdown":"## 何を解決するのか\n\nマイナーやバリデーターは、送信者としての身元を本当は必要としないまま、自分に利益のある呼び出しを実行したいことがあります。動機となるケースは、メタトランザクション（[EIP-1077](/eip-1077/)）のリレーヤーとして動くことです。ブロックプロデューサーがユーザーの署名済みリクエストをコントラクトに送り、ガス代ではなくそのコントラクトから報酬を受け取ります。\n\n現状でそれを行う唯一の方法は通常のトランザクションに署名することで、プロデューサー自身が自分に支払うので、たいていは `gasPrice = 0` にします。そのトランザクションには、検証が必要な署名（`ecrecover`）が付いたままです。結果として得られる `msg.sender` が呼び出しにとって無関係であってもです。EIP-2474 は、このオーバーヘッドをなくすことを提案します。\n\n## 仕組み\n\n提案は短く、多くの詳細が「TBD」のままです。\n\n- ブロックプロデューサー（`block.coinbase`）は、**トランザクションなしの呼び出し**を含めることができます。これらはブロックの先頭に置かれます。\n- ブロックガスは通常どおり消費しますが、ガス代は支払いません。呼び出されたコントラクトのロジックが、何か別の方法でプロデューサーに報酬を支払うことが期待されています。\n- そのような呼び出しの間、`tx.origin = block.coinbase` となり、ガス価格は呼び出しスタック全体で 0 になります。\n- coinbase の呼び出しで `msg.sender` を読むことは許されず、例外が発生します。署名された送信者が存在しないためです。\n- それ以外は、通常の呼び出しと同じように振る舞います。\n\n## サンプルコード\n\n説明用です。この挙動は Ethereum には存在しません。`msg.sender` を読まず、ブロックを生成した者に報酬を支払うリレーヤー型のコントラクト:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract CoinbaseRelay {\n    // Under EIP-2474, the block producer could call this without a signed tx.\n    // It must not touch msg.sender, which would be invalid in a coinbase call.\n    function relay(address target, bytes calldata data, uint256 reward) external {\n        (bool ok, ) = target.call(data);\n        require(ok, \"call failed\");\n        payable(block.coinbase).transfer(reward); // compensation instead of gas fees\n    }\n\n    receive() external payable {}\n}\n```\n\n## 知っておくべきこと\n\n- ステータス: **Stagnant**。どのネットワークアップグレードにも予定されたことがなく、Rationale、Test Cases、Implementation、Security の各セクションは一度も埋められませんでした。\n- 仕様自体がリスクを指摘しています。`tx.origin = block.coinbase` にすると、認可に `tx.origin` を使っている不適切に設計されたコントラクトが壊れる可能性があります。\n- プロデューサーに「別の形で」支払うということは、この機能をブロックプロデューサー固有のロジックに結び付けます。これは、ブロックの構築方法に対する後の変更（たとえば proposer/builder separation）と相互作用しますが、この提案はそれらの変更より前のものです。\n- ガス抽象化とスポンサー付き実行への他のアプローチは、[EIP-2711](/eip-2711/)（Withdrawn）や後のアカウント抽象化の取り組みなど、別個に検討されました。\n"},"ko":{"lang":"ko","tldr":"트랜잭션에 서명하지 않고도 블록 생산자(block.coinbase)가 블록 시작 시점에 컨트랙트를 직접 호출할 수 있게 하는, 정체된 제안. 가스 가격 0짜리 릴레이 트랜잭션의 오버헤드를 없앤다.","tags":["core","evm","coinbase","meta-transactions","stagnant"],"related":[1077,2711],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2474/","markdown":"## 어떤 문제를 해결하나요?\n\n마이너나 검증자는 발신자 신원이 굳이 필요하지 않은데도 자신에게 이익이 되는 호출을 실행하고 싶을 때가 있습니다. 이 제안의 동기가 되는 사례는 메타 트랜잭션([EIP-1077](/eip-1077/))의 릴레이어 역할입니다. 블록 생산자가 사용자의 서명된 요청을 컨트랙트에 제출하고, 가스비가 아니라 그 컨트랙트로부터 보수를 받습니다.\n\n지금은 그렇게 하려면 일반 트랜잭션에 서명하는 수밖에 없고, 생산자가 어차피 자기 자신에게 지급하므로 보통 `gasPrice = 0`으로 둡니다. 그 트랜잭션에는 여전히 검증해야 하는 서명(`ecrecover`)이 붙어 있습니다. 결과로 나오는 `msg.sender`가 호출과 무관한데도 말입니다. EIP-2474는 이 오버헤드를 없애자고 제안합니다.\n\n## 어떻게 동작하나요?\n\n제안은 짧고 많은 세부 사항을 \"TBD\"로 남겨 두었습니다.\n\n- 블록 생산자(`block.coinbase`)는 **트랜잭션 없는 호출**을 포함할 수 있습니다. 이런 호출은 블록 맨 앞에 놓입니다.\n- 블록 가스는 평소처럼 소비하지만 가스비는 지불하지 않습니다. 호출되는 컨트랙트 로직이 다른 방식으로 생산자에게 보상할 것으로 기대합니다.\n- 이런 호출 동안 `tx.origin = block.coinbase`이고 가스 가격은 호출 스택 전체에서 0입니다.\n- coinbase 호출에서 `msg.sender`를 읽는 것은 허용되지 않으며 예외가 발생합니다. 서명된 발신자가 없기 때문입니다.\n- 그 외에는 일반 호출처럼 동작합니다.\n\n## 샘플 코드\n\n설명용일 뿐이며, 이런 동작은 이더리움에 존재하지 않습니다. `msg.sender`를 읽지 않고 블록을 생산한 쪽에 대가를 지불하는 릴레이어 스타일 컨트랙트:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract CoinbaseRelay {\n    // Under EIP-2474, the block producer could call this without a signed tx.\n    // It must not touch msg.sender, which would be invalid in a coinbase call.\n    function relay(address target, bytes calldata data, uint256 reward) external {\n        (bool ok, ) = target.call(data);\n        require(ok, \"call failed\");\n        payable(block.coinbase).transfer(reward); // compensation instead of gas fees\n    }\n\n    receive() external payable {}\n}\n```\n\n## 알아둘 점\n\n- 상태: **Stagnant**. 어떤 네트워크 업그레이드에도 예정된 적이 없고, Rationale, Test Cases, Implementation, Security 섹션도 채워진 적이 없습니다.\n- 명세 자체가 위험을 지적합니다. `tx.origin = block.coinbase`로 두면 권한 확인에 `tx.origin`을 쓰는, 잘못 설계된 컨트랙트가 깨질 수 있습니다.\n- 생산자에게 \"다른 형태로\" 지급한다는 것은 이 기능을 블록 생산자별 로직에 묶는다는 뜻이며, 이는 이후 블록 구성 방식의 변화(예: 제안자/빌더 분리)와 상호작용합니다. 이 제안은 그런 변화보다 앞선 것입니다.\n- 가스 추상화와 후원 실행에 대한 다른 접근은 [EIP-2711](/eip-2711/)(철회됨)이나 이후의 계정 추상화 작업처럼 별도로 탐구되었습니다.\n"},"zh":{"lang":"zh","tldr":"一项已停滞的提案：让区块生产者（block.coinbase）在区块开头无需签名交易即可直接调用合约，省去零 gas 价格中继交易的开销。","tags":["core","evm","coinbase","meta-transactions","stagnant"],"related":[1077,2711],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2474/","markdown":"## 它解决什么问题？\n\n矿工或验证者有时想执行一个对自己有利的调用，而并不真正需要发送者身份。其动机场景是充当元交易（[EIP-1077](/eip-1077/)）的中继者：区块生产者把用户签名的请求提交给合约，并由该合约而不是通过 gas 费向它支付报酬。\n\n目前唯一的做法是签署一笔普通交易，通常把 `gasPrice` 设为 0，因为生产者反正是自己付给自己。这笔交易仍然带有需要验证的签名（一次 `ecrecover`），尽管由此得到的 `msg.sender` 与这次调用无关。EIP-2474 提议去掉这部分开销。\n\n## 它如何运作\n\n这个提案很简短，许多细节留作\"TBD\"：\n\n- 区块生产者（`block.coinbase`）可以包含**无交易的调用**。这些调用放在区块的最前面。\n- 它们照常消耗区块 gas，但不支付 gas 费；被调用的合约逻辑应以其他方式补偿生产者。\n- 在这类调用中，`tx.origin = block.coinbase`，整个调用栈的 gas 价格为 0。\n- 在 coinbase 调用中不允许读取 `msg.sender`，读取会抛出异常，因为不存在签名的发送者。\n- 除此之外，这些调用与普通调用行为一致。\n\n## 示例代码\n\n仅为示意；这种行为在以太坊上并不存在。一个中继者式合约，从不读取 `msg.sender`，并向生产该区块的人付款：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract CoinbaseRelay {\n    // Under EIP-2474, the block producer could call this without a signed tx.\n    // It must not touch msg.sender, which would be invalid in a coinbase call.\n    function relay(address target, bytes calldata data, uint256 reward) external {\n        (bool ok, ) = target.call(data);\n        require(ok, \"call failed\");\n        payable(block.coinbase).transfer(reward); // compensation instead of gas fees\n    }\n\n    receive() external payable {}\n}\n```\n\n## 需要注意\n\n- 状态：**Stagnant**。它从未被排入任何网络升级，其 Rationale、Test Cases、Implementation 和 Security 各节也从未填写。\n- 规范本身指出了一个风险：设置 `tx.origin = block.coinbase` 可能会破坏那些用 `tx.origin` 做授权的设计不当的合约。\n- \"以其他形式\"向生产者付款，会让该功能与区块生产者特有的逻辑绑定，而这会与之后区块构建方式的变化（例如提议者/构建者分离）产生交互；该提案早于这些变化。\n- 其他 gas 抽象和赞助执行的方案另行探索过，例如 [EIP-2711](/eip-2711/)（已撤回）以及后来的账户抽象工作。\n"}}}
