{"eip":2035,"title":"Stateless Clients - Repricing SLOAD and SSTORE to pay for block proofs","description":"The gas cost of EVM opcodes SLOAD and SSTORE increases in order to accommodate extra bandwidth required to propagate block proof together with the block headers and block bodies, as explained here.","authors":["Alexey Akhunov (@AlexeyAkhunov)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2019-05-16","discussionsTo":"https://ethereum-magicians.org/t/eip-2035-stateless-clients-repricing-sload-and-sstore-to-pay-for-block-proofs/3284","repo":"EIPs","label":"EIP-2035","officialUrl":"https://eips.ethereum.org/EIPS/eip-2035","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2035.md","url":"https://eips.huatuo.xyz/eip-2035/","tldr":{"en":"An early stateless-client proposal to charge extra gas for the first SLOAD or SSTORE of each storage slot in a transaction, to pay for the bandwidth of block proofs.","ja":"ステートレスクライアントに向けた初期の提案。ブロック証明の帯域コストを賄うため、トランザクション内で各ストレージスロットへの最初の SLOAD または SSTORE に追加のガスを課す。","ko":"무상태(stateless) 클라이언트를 위한 초기 제안. 블록 증명의 대역폭 비용을 충당하기 위해, 트랜잭션에서 각 스토리지 슬롯에 대한 첫 SLOAD 또는 SSTORE에 추가 가스를 부과한다.","zh":"早期的无状态客户端提案：对交易中每个存储槽的首次 SLOAD 或 SSTORE 收取额外 gas，用来支付区块证明所占用的带宽。"},"tags":["gas","stateless","storage","sload","sstore","core"],"explainers":{"en":{"lang":"en","tldr":"An early stateless-client proposal to charge extra gas for the first SLOAD or SSTORE of each storage slot in a transaction, to pay for the bandwidth of block proofs.","tags":["gas","stateless","storage","sload","sstore","core"],"related":[1884,2028,2026,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2035/","markdown":"## What problem does it solve?\n\nExecuting a block normally requires a node to hold the full Ethereum state and read it from a database, which is slow. The **stateless client** idea is to ship a block together with a **block proof** (witness) containing exactly the state the block touches, plus Merkle proofs, so a node can execute it without local state.\n\nThose proofs cost bandwidth, and the cost grows with each storage slot accessed. EIP-2035, part of the State Rent research roadmap, proposes raising the price of `SLOAD` and `SSTORE` so transactions pay for the proof data they cause. In the first phase only contract storage would be covered; nodes would still need account data.\n\n## How it works\n\n- `SLOAD` and `SSTORE` cost an extra `X` gas when the slot has **not already been accessed** earlier in the same transaction. Repeated access to the same slot pays no surcharge.\n- `X` was not fixed. The author's estimate is that one uncached access adds at most about 1 KB to the block proof; at the then calldata price of 68 gas per byte that would mean roughly 69,000 extra gas, but the spec notes the increase could be much smaller if [EIP-2028](/eip-2028/) lowered data costs.\n- A future variant would scale the surcharge by the size of the contract's storage, making small contracts cheaper.\n- The spec notes it would partly supersede [EIP-1884](/eip-1884/), which raised `SLOAD` for execution-latency reasons.\n\n## Sample code\n\nPseudocode for the proposed per-transaction surcharge:\n\n```python\ndef storage_access_gas(tx_ctx, address, slot, base_cost):\n    key = (address, slot)\n    if key not in tx_ctx.accessed_slots:\n        tx_ctx.accessed_slots.add(key)\n        return base_cost + X          # X: proof-bandwidth surcharge, not yet set\n    return base_cost\n\n# SLOAD  -\u003e storage_access_gas(ctx, addr, slot, SLOAD_COST)\n# SSTORE -\u003e storage_access_gas(ctx, addr, slot, sstore_cost(...))\n```\n\n## Things to know\n\n- Status: **Stagnant**. The spec was explicitly informal and never finalised.\n- The idea of charging more for the first (\"cold\") access to a slot within a transaction did reach mainnet in a different form: [EIP-2929](/eip-2929/) in the Berlin upgrade introduced cold/warm pricing for storage and account access.\n- Contracts that hard-code gas amounts for storage operations are the most exposed to any such repricing.\n- The companion rent-prepayment proposal was [EIP-2026](/eip-2026/).\n"},"ja":{"lang":"ja","tldr":"ステートレスクライアントに向けた初期の提案。ブロック証明の帯域コストを賄うため、トランザクション内で各ストレージスロットへの最初の SLOAD または SSTORE に追加のガスを課す。","tags":["gas","stateless","storage","sload","sstore","core"],"related":[1884,2028,2026,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2035/","markdown":"## 何を解決するのか\n\nブロックを実行するには、通常ノードが Ethereum の全ステートを保持し、データベースから読み出す必要があり、これは遅い処理です。**ステートレスクライアント**の考え方は、ブロックそのものと一緒に、そのブロックが触れるステートだけと Merkle 証明を含む**ブロック証明**（ウィットネス）を配布し、ノードがローカルのステートなしで実行できるようにするものです。\n\nこうした証明は帯域を消費し、そのコストはアクセスしたストレージスロットが増えるほど大きくなります。State Rent の研究ロードマップの一部である EIP-2035 は、`SLOAD` と `SSTORE` の価格を引き上げ、トランザクションが引き起こす証明データの分を負担させることを提案しています。第 1 段階ではコントラクトのストレージだけが対象で、ノードは引き続きアカウントデータを必要とします。\n\n## 仕組み\n\n- `SLOAD` と `SSTORE` は、同じトランザクション内でそのスロットに**まだアクセスしていない**場合、追加で `X` ガスがかかります。同じスロットへの 2 回目以降のアクセスには上乗せがありません。\n- `X` は確定していませんでした。作者の見積もりでは、キャッシュされていない 1 回のアクセスでブロック証明は最大で約 1 KB 増えます。当時の calldata 価格 1 バイトあたり 68 ガスなら、追加は約 69,000 ガスになりますが、[EIP-2028](/eip-2028/) がデータコストを下げれば増加幅はずっと小さくなりうると仕様は述べています。\n- 将来の変種では、コントラクトのストレージサイズに応じて上乗せ額を変え、小さなコントラクトを安くします。\n- 仕様は、実行レイテンシを理由に `SLOAD` を引き上げた [EIP-1884](/eip-1884/) を部分的に置き換えることになると述べています。\n\n## サンプルコード\n\n提案されたトランザクション単位の上乗せの疑似コード:\n\n```python\ndef storage_access_gas(tx_ctx, address, slot, base_cost):\n    key = (address, slot)\n    if key not in tx_ctx.accessed_slots:\n        tx_ctx.accessed_slots.add(key)\n        return base_cost + X          # X: proof-bandwidth surcharge, not yet set\n    return base_cost\n\n# SLOAD  -\u003e storage_access_gas(ctx, addr, slot, SLOAD_COST)\n# SSTORE -\u003e storage_access_gas(ctx, addr, slot, sstore_cost(...))\n```\n\n## 知っておくべきこと\n\n- ステータス：**Stagnant**。仕様は明確に非公式なもので、確定されることはありませんでした。\n- トランザクション内での最初の（「コールド」な）スロットアクセスに多く課金するという考え方は、別の形でメインネットに到達しました。Berlin アップグレードの [EIP-2929](/eip-2929/) が、ストレージとアカウントへのアクセスにコールド／ウォームの価格を導入しています。\n- ストレージ操作のガス量をハードコードしているコントラクトは、このような価格改定の影響を最も受けやすくなります。\n- 対になるレント前払いの提案は [EIP-2026](/eip-2026/) でした。\n"},"ko":{"lang":"ko","tldr":"무상태(stateless) 클라이언트를 위한 초기 제안. 블록 증명의 대역폭 비용을 충당하기 위해, 트랜잭션에서 각 스토리지 슬롯에 대한 첫 SLOAD 또는 SSTORE에 추가 가스를 부과한다.","tags":["gas","stateless","storage","sload","sstore","core"],"related":[1884,2028,2026,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2035/","markdown":"## 어떤 문제를 해결하나요?\n\n블록을 실행하려면 보통 노드가 이더리움의 전체 상태를 보유하고 데이터베이스에서 읽어야 하는데, 이는 느립니다. **무상태 클라이언트**의 아이디어는 블록과 함께, 그 블록이 건드리는 상태와 Merkle 증명만을 담은 **블록 증명**(witness)을 배포해서 노드가 로컬 상태 없이 실행할 수 있게 하는 것입니다.\n\n이런 증명은 대역폭을 소모하며, 그 비용은 접근하는 스토리지 슬롯이 늘수록 커집니다. State Rent 연구 로드맵의 일부인 EIP-2035는 `SLOAD`와 `SSTORE`의 가격을 올려, 트랜잭션이 유발하는 증명 데이터의 비용을 트랜잭션이 부담하게 하자고 제안합니다. 첫 단계에서는 컨트랙트 스토리지만 다루며, 노드는 여전히 계정 데이터가 필요합니다.\n\n## 어떻게 동작하나요?\n\n- 같은 트랜잭션 안에서 해당 슬롯에 **아직 접근한 적이 없다면** `SLOAD`와 `SSTORE`에 추가로 `X` 가스가 듭니다. 같은 슬롯에 반복해서 접근할 때는 추가 요금이 없습니다.\n- `X`는 확정되지 않았습니다. 작성자의 추정으로는 캐시되지 않은 접근 한 번이 블록 증명에 최대 약 1 KB를 더합니다. 당시 calldata 가격인 바이트당 68 가스로 계산하면 약 69,000 가스가 추가되지만, [EIP-2028](/eip-2028/)이 데이터 비용을 낮추면 증가폭이 훨씬 작아질 수 있다고 명세는 언급합니다.\n- 향후 변형에서는 컨트랙트 스토리지의 크기에 따라 추가 요금을 조정해, 작은 컨트랙트를 더 저렴하게 만듭니다.\n- 명세는 실행 지연 문제로 `SLOAD`를 인상한 [EIP-1884](/eip-1884/)를 부분적으로 대체하게 될 것이라고 언급합니다.\n\n## 샘플 코드\n\n제안된 트랜잭션별 추가 요금의 의사 코드:\n\n```python\ndef storage_access_gas(tx_ctx, address, slot, base_cost):\n    key = (address, slot)\n    if key not in tx_ctx.accessed_slots:\n        tx_ctx.accessed_slots.add(key)\n        return base_cost + X          # X: proof-bandwidth surcharge, not yet set\n    return base_cost\n\n# SLOAD  -\u003e storage_access_gas(ctx, addr, slot, SLOAD_COST)\n# SSTORE -\u003e storage_access_gas(ctx, addr, slot, sstore_cost(...))\n```\n\n## 알아둘 점\n\n- 상태: **Stagnant**. 명세는 명시적으로 비공식이었으며 확정된 적이 없습니다.\n- 트랜잭션 안에서 슬롯에 처음(\"콜드\") 접근할 때 더 많이 부과한다는 아이디어는 다른 형태로 메인넷에 도달했습니다. Berlin 업그레이드의 [EIP-2929](/eip-2929/)가 스토리지와 계정 접근에 콜드/웜 가격 책정을 도입했습니다.\n- 스토리지 연산의 가스 양을 하드코딩한 컨트랙트가 이런 가격 재조정에 가장 크게 영향을 받습니다.\n- 짝이 되는 렌트 선납 제안은 [EIP-2026](/eip-2026/)이었습니다.\n"},"zh":{"lang":"zh","tldr":"早期的无状态客户端提案：对交易中每个存储槽的首次 SLOAD 或 SSTORE 收取额外 gas，用来支付区块证明所占用的带宽。","tags":["gas","stateless","storage","sload","sstore","core"],"related":[1884,2028,2026,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2035/","markdown":"## 它解决什么问题？\n\n执行一个区块通常需要节点持有完整的以太坊状态，并从数据库中读取，这很慢。**无状态客户端**的思路是：把区块和一份**区块证明**（witness）一起分发，其中恰好包含该区块触及的状态以及 Merkle 证明，这样节点无需本地状态就能执行它。\n\n这些证明会占用带宽，且成本随访问的存储槽数量增长。EIP-2035 是 State Rent 研究路线图的一部分，提议提高 `SLOAD` 和 `SSTORE` 的价格，让交易为其引发的证明数据付费。第一阶段只覆盖合约存储，节点仍然需要账户数据。\n\n## 它如何运作\n\n- 如果某个存储槽在同一笔交易中**之前没有被访问过**，`SLOAD` 和 `SSTORE` 需要额外支付 `X` gas。对同一存储槽的重复访问不收附加费。\n- `X` 没有确定。作者估计，一次未缓存的访问最多给区块证明增加约 1 KB；按当时 calldata 每字节 68 gas 计算，大约要多收 69,000 gas，但规范指出，如果 [EIP-2028](/eip-2028/) 降低了数据成本，这个增幅可能会小得多。\n- 未来的一个变体会按合约存储的大小缩放附加费，让小合约更便宜。\n- 规范指出，它将部分取代 [EIP-1884](/eip-1884/)，后者出于执行延迟的原因提高了 `SLOAD` 的价格。\n\n## 示例代码\n\n所提议的按交易收取附加费的伪代码：\n\n```python\ndef storage_access_gas(tx_ctx, address, slot, base_cost):\n    key = (address, slot)\n    if key not in tx_ctx.accessed_slots:\n        tx_ctx.accessed_slots.add(key)\n        return base_cost + X          # X: proof-bandwidth surcharge, not yet set\n    return base_cost\n\n# SLOAD  -\u003e storage_access_gas(ctx, addr, slot, SLOAD_COST)\n# SSTORE -\u003e storage_access_gas(ctx, addr, slot, sstore_cost(...))\n```\n\n## 需要注意\n\n- 状态：**Stagnant**。该规范明确是非正式的，从未定稿。\n- 对交易内首次（\"冷\"）访问存储槽多收费的想法，后来以另一种形式进入了主网：Berlin 升级中的 [EIP-2929](/eip-2929/) 为存储和账户访问引入了冷/热定价。\n- 在代码中写死存储操作 gas 数量的合约，最容易受到此类重新定价的影响。\n- 与之配套的租金预付提案是 [EIP-2026](/eip-2026/)。\n"}}}
