{"eip":7650,"title":"Programmable access lists","description":"Add a precompiled contract that add access lists programmatically","authors":["Qi Zhou (@qizhou)","Zhiqiang Xu (@zhiqiangxu)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2024-03-10","requires":[2929,2930],"discussionsTo":"https://ethereum-magicians.org/t/eip-7650-programmable-access-lists/19159","repo":"EIPs","label":"EIP-7650","officialUrl":"https://eips.ethereum.org/EIPS/eip-7650","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7650.md","url":"https://eips.huatuo.xyz/eip-7650/","tldr":{"en":"Proposed a prefetch precompile that lets a contract warm its own storage slots and other addresses in bulk at a discount, so clients can load them in parallel.","ja":"コントラクトが自身のストレージスロットやその他のアドレスを割引価格でまとめてウォームにできる prefetch プリコンパイルの提案（Stagnant）。クライアントはそれらを並列にロードできる。","ko":"컨트랙트가 자신의 스토리지 슬롯과 다른 주소를 할인된 가격으로 한꺼번에 워밍할 수 있게 하는 prefetch 프리컴파일 제안(Stagnant). 클라이언트가 이를 병렬로 로드할 수 있다.","zh":"提议一个预取（prefetch）预编译，让合约以折扣价批量预热自身的存储槽和其他地址，从而使客户端可以并行加载它们。"},"tags":["gas","access-lists","precompile","storage","core"],"explainers":{"en":{"lang":"en","tldr":"Proposed a prefetch precompile that lets a contract warm its own storage slots and other addresses in bulk at a discount, so clients can load them in parallel.","tags":["gas","access-lists","precompile","storage","core"],"related":[2929,2930,7928],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7650/","markdown":"## What problem does it solve?\n\nSince [EIP-2929](/eip-2929/), the first read of a storage slot in a transaction costs 2,100 gas (cold) and the first touch of an address costs 2,600 gas; later accesses are cheap (warm). [EIP-2930](/eip-2930/) lets a *transaction* declare an access list up front so those items start warm at a small discount.\n\nBut an access list must be built by whoever sends the transaction, before execution, and many contracts already know which slots they will need. Meanwhile, clients pay cold reads one by one, in sequence, even though disks and CPUs can fetch many items at once.\n\nEIP-7650 lets the *contract itself* declare what it is about to touch, and prices that declaration as if the node fetched the items in parallel.\n\n## How it works\n\nA new precompile, `prefetch`, at an address still marked `TBD`. Its input is:\n\n```text\n[32 bytes: n][n × 32-byte storage keys][32 bytes: m][m × 32-byte addresses]\n```\n\n- The storage keys are **local**, meaning slots of the calling contract. Keys of other contracts are deliberately excluded, since a contract should not depend on another contract's storage layout.\n- Every key and address that is not already warm is added to `accessed_storage_keys` / `accessed_addresses`, and the client is expected to load them concurrently.\n- The call costs `2100 × ceil(N / CONCURRENCY) + 2600 × ceil(M / CONCURRENCY)`, where `N` and `M` count only the items that were cold. `CONCURRENCY` is a protocol constant, also `TBD`.\n- After prefetching, reads follow the normal warm cost (`WARM_STORAGE_READ_COST`).\n- Duplicates are allowed, as in EIP-2930.\n\n## Sample code\n\nCalling the precompile from Solidity. The address is a placeholder because the spec has not assigned one:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nabstract contract Prefetching {\n    address internal constant PREFETCH = address(0); // TBD in EIP-7650\n\n    function _prefetch(bytes32[] memory keys, address[] memory addrs) internal {\n        bytes memory input = abi.encodePacked(uint256(keys.length));\n        for (uint256 i; i \u003c keys.length; ++i) input = abi.encodePacked(input, keys[i]);\n        input = abi.encodePacked(input, uint256(addrs.length));\n        for (uint256 i; i \u003c addrs.length; ++i) input = abi.encodePacked(input, uint256(uint160(addrs[i])));\n        // Per the spec, calling it before activation should simply do nothing.\n        (bool ok, ) = PREFETCH.call(input);\n        ok;\n    }\n}\n```\n\nCost comparison with an illustrative `CONCURRENCY = 4` (the real value is not set):\n\n```text\n8 cold slots, 2 cold addresses\nwithout prefetch: 8*2100 + 2*2600            = 22,000 gas\nwith prefetch:    2100*ceil(8/4) + 2600*ceil(2/4) = 4,200 + 2,600 = 6,800 gas (+ warm reads)\n```\n\n## Things to know\n\n- Status is **Stagnant**. The precompile address, fork block and `CONCURRENCY` value were never set, and it is not scheduled for any upgrade.\n- The discount assumes nodes really do fetch concurrently; the actual savings depend on that constant.\n- A different, block-level approach to access lists is proposed in [EIP-7928](/eip-7928/).\n- The spec mentions a possible future extension to prefetch the results of static calls to external contracts.\n"},"ja":{"lang":"ja","tldr":"コントラクトが自身のストレージスロットやその他のアドレスを割引価格でまとめてウォームにできる prefetch プリコンパイルの提案（Stagnant）。クライアントはそれらを並列にロードできる。","tags":["gas","access-lists","precompile","storage","core"],"related":[2929,2930,7928],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7650/","markdown":"## 何を解決するのか\n\n[EIP-2929](/eip-2929/) 以降、トランザクション内でストレージスロットを最初に読むと 2,100 ガス（コールド）、アドレスに最初に触れると 2,600 ガスかかり、その後のアクセスは安価（ウォーム）です。[EIP-2930](/eip-2930/) では、*トランザクション*が事前にアクセスリストを宣言でき、それらの項目は小さな割引付きでウォームの状態から始まります。\n\nしかしアクセスリストは、実行前にトランザクションの送信者が作らなければならず、多くのコントラクトは必要になるスロットを既に把握しています。一方でクライアントは、ディスクや CPU が多数の項目を一度に取得できるにもかかわらず、コールドの読み取りを 1 つずつ順番に支払っています。\n\nEIP-7650 は、*コントラクト自身*がこれから触れるものを宣言できるようにし、その宣言を、ノードが項目を並列に取得するものとして価格づけします。\n\n## 仕組み\n\n新しいプリコンパイル `prefetch` を、まだ `TBD` とされているアドレスに置きます。入力は次のとおりです。\n\n```text\n[32 bytes: n][n × 32-byte storage keys][32 bytes: m][m × 32-byte addresses]\n```\n\n- ストレージキーは**ローカル**、つまり呼び出し元コントラクトのスロットです。コントラクトは他のコントラクトのストレージレイアウトに依存すべきではないため、他のコントラクトのキーは意図的に除外されています。\n- まだウォームでないキーとアドレスはすべて `accessed_storage_keys` / `accessed_addresses` に追加され、クライアントはそれらを並行してロードすることが期待されます。\n- 呼び出しのコストは `2100 × ceil(N / CONCURRENCY) + 2600 × ceil(M / CONCURRENCY)` です。ここで `N` と `M` はコールドだった項目だけを数えます。`CONCURRENCY` はプロトコル定数で、これも `TBD` です。\n- プリフェッチ後の読み取りは、通常のウォームのコスト（`WARM_STORAGE_READ_COST`）に従います。\n- EIP-2930 と同様に、重複は許容されます。\n\n## サンプルコード\n\nSolidity からプリコンパイルを呼び出す。仕様がまだアドレスを割り当てていないため、アドレスはプレースホルダーです。\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nabstract contract Prefetching {\n    address internal constant PREFETCH = address(0); // TBD in EIP-7650\n\n    function _prefetch(bytes32[] memory keys, address[] memory addrs) internal {\n        bytes memory input = abi.encodePacked(uint256(keys.length));\n        for (uint256 i; i \u003c keys.length; ++i) input = abi.encodePacked(input, keys[i]);\n        input = abi.encodePacked(input, uint256(addrs.length));\n        for (uint256 i; i \u003c addrs.length; ++i) input = abi.encodePacked(input, uint256(uint160(addrs[i])));\n        // Per the spec, calling it before activation should simply do nothing.\n        (bool ok, ) = PREFETCH.call(input);\n        ok;\n    }\n}\n```\n\n例示用に `CONCURRENCY = 4` とした場合のコスト比較（実際の値は未設定）:\n\n```text\n8 cold slots, 2 cold addresses\nwithout prefetch: 8*2100 + 2*2600            = 22,000 gas\nwith prefetch:    2100*ceil(8/4) + 2600*ceil(2/4) = 4,200 + 2,600 = 6,800 gas (+ warm reads)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。プリコンパイルのアドレス、フォークのブロック、`CONCURRENCY` の値は決まらないままで、どのアップグレードにも予定されていません。\n- 割引は、ノードが実際に並行して取得することを前提としています。実際の節約量はその定数に依存します。\n- アクセスリストに対する別のブロックレベルのアプローチが [EIP-7928](/eip-7928/) で提案されています。\n- 仕様は、外部コントラクトへの静的呼び出しの結果をプリフェッチする、将来の拡張の可能性に言及しています。\n"},"ko":{"lang":"ko","tldr":"컨트랙트가 자신의 스토리지 슬롯과 다른 주소를 할인된 가격으로 한꺼번에 워밍할 수 있게 하는 prefetch 프리컴파일 제안(Stagnant). 클라이언트가 이를 병렬로 로드할 수 있다.","tags":["gas","access-lists","precompile","storage","core"],"related":[2929,2930,7928],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7650/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-2929](/eip-2929/) 이후, 트랜잭션에서 스토리지 슬롯을 처음 읽으면 2,100 가스(콜드), 주소를 처음 건드리면 2,600 가스가 들고, 이후 접근은 저렴합니다(웜). [EIP-2930](/eip-2930/)은 *트랜잭션*이 미리 액세스 리스트를 선언하게 하여, 해당 항목이 약간의 할인과 함께 웜 상태로 시작하게 합니다.\n\n하지만 액세스 리스트는 트랜잭션을 보내는 쪽이 실행 전에 만들어야 하는데, 많은 컨트랙트는 자신이 어떤 슬롯을 필요로 할지 이미 알고 있습니다. 한편 클라이언트는 디스크와 CPU가 여러 항목을 한꺼번에 가져올 수 있는데도 콜드 읽기 비용을 하나씩 순서대로 지불합니다.\n\nEIP-7650은 *컨트랙트 스스로* 곧 접근할 것을 선언하게 하고, 노드가 항목을 병렬로 가져오는 것으로 보고 그 선언의 가격을 매깁니다.\n\n## 어떻게 동작하나요?\n\n새 프리컴파일 `prefetch`가 아직 `TBD`로 표시된 주소에 있습니다. 입력은 다음과 같습니다.\n\n```text\n[32 bytes: n][n × 32-byte storage keys][32 bytes: m][m × 32-byte addresses]\n```\n\n- 스토리지 키는 **로컬**, 즉 호출하는 컨트랙트 자신의 슬롯입니다. 컨트랙트는 다른 컨트랙트의 스토리지 레이아웃에 의존하면 안 되므로, 다른 컨트랙트의 키는 의도적으로 제외됩니다.\n- 아직 웜이 아닌 모든 키와 주소는 `accessed_storage_keys` / `accessed_addresses`에 추가되며, 클라이언트는 이를 동시에 로드할 것으로 기대됩니다.\n- 호출 비용은 `2100 × ceil(N / CONCURRENCY) + 2600 × ceil(M / CONCURRENCY)`이며, `N`과 `M`은 콜드였던 항목만 셉니다. `CONCURRENCY`는 프로토콜 상수로 역시 `TBD`입니다.\n- 프리페치 이후의 읽기는 일반적인 웜 비용(`WARM_STORAGE_READ_COST`)을 따릅니다.\n- EIP-2930처럼 중복은 허용됩니다.\n\n## 샘플 코드\n\nSolidity에서 프리컴파일 호출하기. 사양이 아직 주소를 할당하지 않았으므로 주소는 자리표시자입니다.\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nabstract contract Prefetching {\n    address internal constant PREFETCH = address(0); // TBD in EIP-7650\n\n    function _prefetch(bytes32[] memory keys, address[] memory addrs) internal {\n        bytes memory input = abi.encodePacked(uint256(keys.length));\n        for (uint256 i; i \u003c keys.length; ++i) input = abi.encodePacked(input, keys[i]);\n        input = abi.encodePacked(input, uint256(addrs.length));\n        for (uint256 i; i \u003c addrs.length; ++i) input = abi.encodePacked(input, uint256(uint160(addrs[i])));\n        // Per the spec, calling it before activation should simply do nothing.\n        (bool ok, ) = PREFETCH.call(input);\n        ok;\n    }\n}\n```\n\n예시로 `CONCURRENCY = 4`를 가정한 비용 비교(실제 값은 정해지지 않음):\n\n```text\n8 cold slots, 2 cold addresses\nwithout prefetch: 8*2100 + 2*2600            = 22,000 gas\nwith prefetch:    2100*ceil(8/4) + 2600*ceil(2/4) = 4,200 + 2,600 = 6,800 gas (+ warm reads)\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 프리컴파일 주소, 포크 블록, `CONCURRENCY` 값은 끝내 정해지지 않았고 어떤 업그레이드에도 예정되어 있지 않습니다.\n- 할인은 노드가 실제로 동시에 가져온다고 가정합니다. 실제 절감 효과는 그 상수에 달려 있습니다.\n- 액세스 리스트에 대한 다른 블록 수준 접근법이 [EIP-7928](/eip-7928/)에서 제안되었습니다.\n- 사양은 외부 컨트랙트에 대한 정적 호출 결과를 프리페치하는 향후 확장 가능성을 언급합니다.\n"},"zh":{"lang":"zh","tldr":"提议一个预取（prefetch）预编译，让合约以折扣价批量预热自身的存储槽和其他地址，从而使客户端可以并行加载它们。","tags":["gas","access-lists","precompile","storage","core"],"related":[2929,2930,7928],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7650/","markdown":"## 它解决什么问题？\n\n自 [EIP-2929](/eip-2929/) 起，交易中首次读取某个存储槽需要 2,100 gas（冷），首次访问某个地址需要 2,600 gas；之后的访问很便宜（热）。[EIP-2930](/eip-2930/) 允许*交易*预先声明访问列表，使这些项目以小幅折扣从热状态开始。\n\n但访问列表必须由发送交易的人在执行之前构建，而许多合约其实已经知道自己将需要哪些槽。与此同时，客户端按顺序逐个支付冷读取的费用，尽管磁盘和 CPU 可以一次取回许多项目。\n\nEIP-7650 让*合约自己*声明即将访问的内容，并按节点并行取回这些项目的方式为该声明定价。\n\n## 它如何运作\n\n一个新的预编译 `prefetch`，其地址仍标注为 `TBD`。其输入为：\n\n```text\n[32 bytes: n][n × 32-byte storage keys][32 bytes: m][m × 32-byte addresses]\n```\n\n- 存储键是**本地的**，即调用合约自己的槽。其他合约的键被有意排除，因为合约不应依赖另一个合约的存储布局。\n- 每个尚未变热的键和地址都会被加入 `accessed_storage_keys` / `accessed_addresses`，并期望客户端并发加载它们。\n- 该调用的费用为 `2100 × ceil(N / CONCURRENCY) + 2600 × ceil(M / CONCURRENCY)`，其中 `N` 和 `M` 只统计原本为冷的项目。`CONCURRENCY` 是协议常量，同样为 `TBD`。\n- 预取之后，读取遵循常规的热访问成本（`WARM_STORAGE_READ_COST`）。\n- 与 EIP-2930 一样，允许重复项。\n\n## 示例代码\n\n在 Solidity 中调用该预编译。由于规范尚未分配地址，这里的地址是占位符：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nabstract contract Prefetching {\n    address internal constant PREFETCH = address(0); // TBD in EIP-7650\n\n    function _prefetch(bytes32[] memory keys, address[] memory addrs) internal {\n        bytes memory input = abi.encodePacked(uint256(keys.length));\n        for (uint256 i; i \u003c keys.length; ++i) input = abi.encodePacked(input, keys[i]);\n        input = abi.encodePacked(input, uint256(addrs.length));\n        for (uint256 i; i \u003c addrs.length; ++i) input = abi.encodePacked(input, uint256(uint160(addrs[i])));\n        // Per the spec, calling it before activation should simply do nothing.\n        (bool ok, ) = PREFETCH.call(input);\n        ok;\n    }\n}\n```\n\n假设 `CONCURRENCY = 4`（仅作示意，真实值尚未设定）的成本对比：\n\n```text\n8 cold slots, 2 cold addresses\nwithout prefetch: 8*2100 + 2*2600            = 22,000 gas\nwith prefetch:    2100*ceil(8/4) + 2600*ceil(2/4) = 4,200 + 2,600 = 6,800 gas (+ warm reads)\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。预编译地址、分叉区块和 `CONCURRENCY` 的值从未确定，也没有被排入任何升级。\n- 折扣的前提是节点确实并发取回；实际节省多少取决于那个常量。\n- [EIP-7928](/eip-7928/) 提出了另一种区块级的访问列表方案。\n- 规范提到未来可能的扩展：预取对外部合约的静态调用的结果。\n"}}}
