{"eip":2029,"title":"State Rent A - State counters contract","description":"A smart contract is deployed on all Ethereum networks, at a pre-determined address, with the code that simply reads the slot in its storage specified by the only parameter.","authors":["Alexey Akhunov (@AlexeyAkhunov)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2019-05-15","discussionsTo":"https://ethereum-magicians.org/t/eip-2029-state-counters-contract-change-a-from-state-rent-v3-proposal/3279","repo":"EIPs","label":"EIP-2029","officialUrl":"https://eips.ethereum.org/EIPS/eip-2029","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2029.md","url":"https://eips.huatuo.xyz/eip-2029/","tldr":{"en":"Part of the abandoned State Rent roadmap: deploy a tiny contract at the same address on every network whose storage the protocol would later fill with counters such as the total number of transactions.","ja":"放棄された State Rent ロードマップの一部。全ネットワークで同じアドレスに小さなコントラクトをデプロイし、そのストレージにプロトコルが後から総トランザクション数などのカウンターを書き込む。","ko":"폐기된 State Rent 로드맵의 일부로, 모든 네트워크의 같은 주소에 작은 컨트랙트를 배포해 두고 프로토콜이 나중에 그 스토리지에 전체 트랜잭션 수 같은 카운터를 채워 넣는다.","zh":"已被放弃的 State Rent 路线图的一部分：在每个网络的同一地址部署一个小合约，协议之后会向它的存储中写入交易总数等计数器。"},"tags":["state-rent","system-contract","counters","state","core"],"explainers":{"en":{"lang":"en","tldr":"Part of the abandoned State Rent roadmap: deploy a tiny contract at the same address on every network whose storage the protocol would later fill with counters such as the total number of transactions.","tags":["state-rent","system-contract","counters","state","core"],"related":[2031,2026,2027,2014],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2029/","markdown":"## What problem does it solve?\n\nIn 2019 Alexey Akhunov's \"State Rent\" roadmap aimed to curb unbounded growth of Ethereum's state by charging accounts for the storage they occupy and evicting those that do not pay. Several steps in that plan needed global counters, such as the total number of transactions ever executed, and Ethereum had no place in its state to keep them.\n\nThe key use was **replay protection after eviction**. If an evicted account is recreated by someone sending it ether, its nonce would restart at zero, letting old signed transactions be replayed. Seeding a new account's nonce from a global transaction counter avoids that.\n\n## How it works\n\nThis EIP, \"change A\" of the roadmap, only creates the storage location:\n\n1. Before a chosen block, a contract is deployed with `CREATE2` so that it has **the same address on every network**. Anyone can submit the deployment transaction, and it needs no hard fork.\n2. Its code simply returns the storage slot named by its 32-byte argument:\n\n   ```text\n   0x60 0x20 0x60 0x00 0x80 0x80 0x35 0x54 0x90 0x52 0xF3\n   PUSH1 32 PUSH1 0 DUP1 DUP1 CALLDATALOAD SLOAD SWAP1 MSTORE RETURN\n   ```\n\n3. Later rent changes, such as [EIP-2031](/eip-2031/) (net transaction counter), would have the protocol itself write counter values into this contract's storage.\n\nThe spec weighed two alternatives. Adding fields to the state structure would change how the state root is built and break existing Merkle-proof tooling. An [EIP-2014](/eip-2014/)-style oracle would return values that are not explicitly part of the Merkle state. Keeping the counters in ordinary contract storage keeps them Merkle-ized and provable.\n\n## Sample code\n\nReading counter slot `0` from such a contract (ethers v6). The address is a placeholder because the contract was never deployed by the protocol:\n\n```ts\nimport { JsonRpcProvider, zeroPadValue, toBigInt } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst COUNTERS = process.env.COUNTERS_ADDRESS!; // hypothetical CREATE2 address\n\nconst slot = zeroPadValue(\"0x00\", 32);          // which counter to read\nconst raw = await provider.call({ to: COUNTERS, data: slot }); // calldata is just the slot\nconsole.log(\"counter value:\", toBigInt(raw));\n```\n\nThe contract's whole behaviour in Solidity terms:\n\n```solidity\nfallback(bytes calldata input) external returns (bytes memory) {\n    bytes32 slot = abi.decode(input, (bytes32));\n    bytes32 value;\n    assembly { value := sload(slot) }\n    return abi.encode(value);\n}\n```\n\n## Things to know\n\n- Status is **Stagnant**. The State Rent roadmap was abandoned, and Ethereum has not introduced rent or account eviction.\n- No deployment address or activation block is specified. Any address you see attributed to this EIP is not part of the spec.\n- Sibling proposals from the same roadmap include [EIP-2026](/eip-2026/) (fixed prepayment for accounts), [EIP-2027](/eip-2027/) (net contract size accounting) and [EIP-2031](/eip-2031/). All are Stagnant.\n- Ethereum has since pursued other approaches to state growth, such as stateless-client research, rather than rent.\n"},"ja":{"lang":"ja","tldr":"放棄された State Rent ロードマップの一部。全ネットワークで同じアドレスに小さなコントラクトをデプロイし、そのストレージにプロトコルが後から総トランザクション数などのカウンターを書き込む。","tags":["state-rent","system-contract","counters","state","core"],"related":[2031,2026,2027,2014],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2029/","markdown":"## 何を解決するのか\n\n2019 年、Alexey Akhunov の「State Rent」ロードマップは、アカウントが占有するストレージに課金し、支払わないアカウントを退去（evict）させることで、Ethereum のステートが際限なく肥大化するのを抑えることを目指していました。この計画のいくつかのステップでは、これまでに実行された総トランザクション数のようなグローバルカウンターが必要でしたが、Ethereum にはそれを保持する場所がステート内にありませんでした。\n\n主な用途は、**退去後のリプレイ保護**です。退去したアカウントが、誰かが ether を送ることで再作成されると、その nonce が 0 から始まり、過去に署名されたトランザクションをリプレイされるおそれがあります。新しいアカウントの nonce をグローバルなトランザクションカウンターから初期化すれば、これを防げます。\n\n## 仕組み\n\nこの EIP はロードマップの「変更 A」にあたり、ストレージの置き場所を作るだけです。\n\n1. 指定したブロックより前に、`CREATE2` でコントラクトをデプロイし、**すべてのネットワークで同じアドレス**になるようにします。デプロイのトランザクションは誰でも送信でき、ハードフォークは不要です。\n2. そのコードは、32 バイトの引数で指定されたストレージスロットの値をそのまま返すだけです。\n\n   ```text\n   0x60 0x20 0x60 0x00 0x80 0x80 0x35 0x54 0x90 0x52 0xF3\n   PUSH1 32 PUSH1 0 DUP1 DUP1 CALLDATALOAD SLOAD SWAP1 MSTORE RETURN\n   ```\n\n3. 後続の rent 関連の変更、たとえば [EIP-2031](/eip-2031/)（ネットのトランザクションカウンター）では、プロトコル自身がこのコントラクトのストレージにカウンター値を書き込むことになります。\n\n仕様は 2 つの代替案を検討しています。ステート構造にフィールドを追加すると、state root の構築方法が変わり、既存の Merkle 証明ツールが動かなくなります。[EIP-2014](/eip-2014/) 型のオラクルでは、Merkle ステートに明示的に含まれない値が返ることになります。カウンターを通常のコントラクトストレージに置けば、Merkle 化されたまま証明可能な状態を保てます。\n\n## サンプルコード\n\nそのようなコントラクトからカウンタースロット `0` を読み取る例です（ethers v6）。このコントラクトはプロトコルによってデプロイされたことがないため、アドレスはプレースホルダーです。\n\n```ts\nimport { JsonRpcProvider, zeroPadValue, toBigInt } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst COUNTERS = process.env.COUNTERS_ADDRESS!; // hypothetical CREATE2 address\n\nconst slot = zeroPadValue(\"0x00\", 32);          // which counter to read\nconst raw = await provider.call({ to: COUNTERS, data: slot }); // calldata is just the slot\nconsole.log(\"counter value:\", toBigInt(raw));\n```\n\nこのコントラクトの動作全体を Solidity で表すと次のとおりです。\n\n```solidity\nfallback(bytes calldata input) external returns (bytes memory) {\n    bytes32 slot = abi.decode(input, (bytes32));\n    bytes32 value;\n    assembly { value := sload(slot) }\n    return abi.encode(value);\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。State Rent ロードマップは放棄され、Ethereum は rent もアカウントの退去も導入していません。\n- デプロイ先アドレスも有効化ブロックも規定されていません。この EIP のものとして出回っているアドレスは、仕様の一部ではありません。\n- 同じロードマップの関連提案には、[EIP-2026](/eip-2026/)（アカウントの固定前払い）、[EIP-2027](/eip-2027/)（コントラクトサイズのネット計上）、[EIP-2031](/eip-2031/) があります。いずれも Stagnant です。\n- Ethereum はその後、rent ではなくステートレスクライアントの研究など、別のアプローチでステート肥大化に取り組んでいます。\n"},"ko":{"lang":"ko","tldr":"폐기된 State Rent 로드맵의 일부로, 모든 네트워크의 같은 주소에 작은 컨트랙트를 배포해 두고 프로토콜이 나중에 그 스토리지에 전체 트랜잭션 수 같은 카운터를 채워 넣는다.","tags":["state-rent","system-contract","counters","state","core"],"related":[2031,2026,2027,2014],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2029/","markdown":"## 어떤 문제를 해결하나요?\n\n2019년 Alexey Akhunov의 \"State Rent\" 로드맵은 계정이 차지하는 스토리지에 요금을 부과하고, 요금을 내지 않는 계정을 퇴출(evict)함으로써 이더리움 상태의 무한한 증가를 억제하려 했습니다. 이 계획의 여러 단계에는 지금까지 실행된 전체 트랜잭션 수 같은 전역 카운터가 필요했지만, 이더리움 상태에는 이를 보관할 곳이 없었습니다.\n\n핵심 용도는 **퇴출 이후의 리플레이 방지**입니다. 퇴출된 계정이 누군가 ether를 보내서 다시 생성되면 nonce가 0부터 다시 시작되어, 과거에 서명된 트랜잭션을 리플레이할 수 있게 됩니다. 새 계정의 nonce를 전역 트랜잭션 카운터에서 가져와 초기화하면 이를 피할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n이 EIP는 로드맵의 \"변경 A\"로, 스토리지 위치만 만듭니다.\n\n1. 지정된 블록 이전에 `CREATE2`로 컨트랙트를 배포해 **모든 네트워크에서 같은 주소**를 갖게 합니다. 배포 트랜잭션은 누구나 제출할 수 있으며 하드 포크가 필요 없습니다.\n2. 코드는 32바이트 인자로 지정된 스토리지 슬롯의 값을 그대로 반환할 뿐입니다.\n\n   ```text\n   0x60 0x20 0x60 0x00 0x80 0x80 0x35 0x54 0x90 0x52 0xF3\n   PUSH1 32 PUSH1 0 DUP1 DUP1 CALLDATALOAD SLOAD SWAP1 MSTORE RETURN\n   ```\n\n3. 이후의 rent 관련 변경, 예컨대 [EIP-2031](/eip-2031/)(순 트랜잭션 카운터)에서는 프로토콜 자체가 이 컨트랙트의 스토리지에 카운터 값을 기록하게 됩니다.\n\n명세는 두 가지 대안을 검토했습니다. 상태 구조에 필드를 추가하면 state root를 만드는 방식이 바뀌고 기존 Merkle 증명 도구가 깨집니다. [EIP-2014](/eip-2014/) 방식의 오라클은 Merkle 상태에 명시적으로 포함되지 않은 값을 반환하게 됩니다. 카운터를 일반 컨트랙트 스토리지에 두면 Merkle화되어 증명 가능한 상태가 유지됩니다.\n\n## 샘플 코드\n\n이런 컨트랙트에서 카운터 슬롯 `0`을 읽는 예시입니다(ethers v6). 이 컨트랙트는 프로토콜이 배포한 적이 없으므로 주소는 자리표시자입니다.\n\n```ts\nimport { JsonRpcProvider, zeroPadValue, toBigInt } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst COUNTERS = process.env.COUNTERS_ADDRESS!; // hypothetical CREATE2 address\n\nconst slot = zeroPadValue(\"0x00\", 32);          // which counter to read\nconst raw = await provider.call({ to: COUNTERS, data: slot }); // calldata is just the slot\nconsole.log(\"counter value:\", toBigInt(raw));\n```\n\n이 컨트랙트의 전체 동작을 Solidity로 나타내면 다음과 같습니다.\n\n```solidity\nfallback(bytes calldata input) external returns (bytes memory) {\n    bytes32 slot = abi.decode(input, (bytes32));\n    bytes32 value;\n    assembly { value := sload(slot) }\n    return abi.encode(value);\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. State Rent 로드맵은 폐기되었고, 이더리움은 rent나 계정 퇴출을 도입하지 않았습니다.\n- 배포 주소나 활성화 블록은 지정되어 있지 않습니다. 이 EIP의 것이라고 알려진 주소는 명세의 일부가 아닙니다.\n- 같은 로드맵의 자매 제안으로 [EIP-2026](/eip-2026/)(계정 고정 선납), [EIP-2027](/eip-2027/)(순 컨트랙트 크기 계산), [EIP-2031](/eip-2031/)이 있습니다. 모두 Stagnant입니다.\n- 이후 이더리움은 rent 대신 스테이트리스 클라이언트 연구 같은 다른 접근으로 상태 증가에 대응하고 있습니다.\n"},"zh":{"lang":"zh","tldr":"已被放弃的 State Rent 路线图的一部分：在每个网络的同一地址部署一个小合约，协议之后会向它的存储中写入交易总数等计数器。","tags":["state-rent","system-contract","counters","state","core"],"related":[2031,2026,2027,2014],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2029/","markdown":"## 它解决什么问题？\n\n2019 年，Alexey Akhunov 的\"State Rent\"路线图旨在遏制以太坊状态的无限增长：对账户占用的存储收费，并驱逐（evict）不付费的账户。该计划中的若干步骤需要全局计数器，例如历史上执行过的交易总数，而以太坊的状态中没有地方存放它们。\n\n关键用途是**驱逐后的重放保护**。如果被驱逐的账户因有人向其转入以太币而被重新创建，它的 nonce 会从零重新开始，使旧的已签名交易可以被重放。用全局交易计数器来初始化新账户的 nonce 就能避免这个问题。\n\n## 它如何运作\n\n这份 EIP 是路线图中的\"变更 A\"，只负责创建存储位置：\n\n1. 在某个指定区块之前，用 `CREATE2` 部署一个合约，使其在**每个网络上都有相同的地址**。任何人都可以提交部署交易，无需硬分叉。\n2. 它的代码只是返回由 32 字节参数指定的存储槽的值：\n\n   ```text\n   0x60 0x20 0x60 0x00 0x80 0x80 0x35 0x54 0x90 0x52 0xF3\n   PUSH1 32 PUSH1 0 DUP1 DUP1 CALLDATALOAD SLOAD SWAP1 MSTORE RETURN\n   ```\n\n3. 之后的租金相关变更，例如 [EIP-2031](/eip-2031/)（净交易计数器），会由协议自身把计数器的值写入该合约的存储。\n\n规范权衡了两种替代方案。给状态结构添加字段会改变状态根的构建方式，并破坏现有的 Merkle 证明工具。[EIP-2014](/eip-2014/) 式的预言机返回的值并不明确属于 Merkle 状态。把计数器放在普通合约存储中，则能保持它们被 Merkle 化且可证明。\n\n## 示例代码\n\n从这样的合约中读取计数器槽 `0`（ethers v6）。地址是占位符，因为协议从未部署过该合约：\n\n```ts\nimport { JsonRpcProvider, zeroPadValue, toBigInt } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst COUNTERS = process.env.COUNTERS_ADDRESS!; // hypothetical CREATE2 address\n\nconst slot = zeroPadValue(\"0x00\", 32);          // which counter to read\nconst raw = await provider.call({ to: COUNTERS, data: slot }); // calldata is just the slot\nconsole.log(\"counter value:\", toBigInt(raw));\n```\n\n用 Solidity 表示的该合约的全部行为：\n\n```solidity\nfallback(bytes calldata input) external returns (bytes memory) {\n    bytes32 slot = abi.decode(input, (bytes32));\n    bytes32 value;\n    assembly { value := sload(slot) }\n    return abi.encode(value);\n}\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。State Rent 路线图已被放弃，以太坊没有引入租金或账户驱逐。\n- 规范没有指定部署地址或激活区块。任何被说成属于这份 EIP 的地址都不是规范的一部分。\n- 同一路线图的姊妹提案包括 [EIP-2026](/eip-2026/)（账户固定预付费）、[EIP-2027](/eip-2027/)（合约大小净额计量）和 [EIP-2031](/eip-2031/)。它们全都是 Stagnant。\n- 此后以太坊采用了其他方式（如无状态客户端研究）来应对状态增长，而不是租金。\n"}},"requiredBy":[2031]}
