{"eip":7612,"title":"Verkle state transition via an overlay tree","description":"Describes the use of an overlay tree to use the verkle tree structure, while leaving the historical state untouched.","authors":["Guillaume Ballet (@gballet)","Ansgar Dietrichs (@adietrichs)","Ignacio Hagopian (@jsign)","Gottfried Herold (@GottfriedHerold)","Jamie Lokier (@jlokier)","Tanishq Jasoria (@tanishqjasoria)","Parithosh Jayanthi (@parithosh)","Gabriel Rocheleau (@gabrocheleau)","Karim Taam (@matkt)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2024-01-25","requires":[4762,6800,7545],"discussionsTo":"https://ethereum-magicians.org/t/ethereum-state-trie-format-change-using-an-overlay/4165","repo":"EIPs","label":"EIP-7612","officialUrl":"https://eips.ethereum.org/EIPS/eip-7612","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7612.md","url":"https://eips.huatuo.xyz/eip-7612/","tldr":{"en":"Proposed switching Ethereum's state to a Verkle tree by freezing the existing Merkle Patricia tree and writing all new state into a Verkle 'overlay' on top of it, deferring the slow migration of old data to a later step.","ja":"既存の Merkle Patricia ツリーを凍結し、すべての新しいステートをその上の Verkle「オーバーレイ」に書き込むことで、Ethereum のステートを Verkle ツリーに切り替えることを提案した。古いデータの遅い移行は後のステップに先送りする。","ko":"기존 Merkle Patricia 트리를 동결하고 모든 새 상태를 그 위의 Verkle \"오버레이\"에 기록하는 방식으로, 이더리움의 상태를 Verkle 트리로 전환하자고 제안했다. 오래된 데이터의 느린 마이그레이션은 이후 단계로 미룬다.","zh":"提议把以太坊的状态切换为 Verkle 树：冻结现有的 Merkle Patricia 树，把所有新状态写入其上的 Verkle\"叠加层\"，将旧数据缓慢的迁移推迟到后续步骤。"},"tags":["verkle","state","stateless","migration","core"],"explainers":{"en":{"lang":"en","tldr":"Proposed switching Ethereum's state to a Verkle tree by freezing the existing Merkle Patricia tree and writing all new state into a Verkle 'overlay' on top of it, deferring the slow migration of old data to a later step.","tags":["verkle","state","stateless","migration","core"],"related":[6800,4762,7545,7748,7864],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7612/","markdown":"## What problem does it solve?\n\nMoving Ethereum's state from the hexary Merkle Patricia Tree (MPT) to a Verkle tree ([EIP-6800](/eip-6800/)) is a precondition for stateless clients. But converting the whole state is hard: contracts with huge storage are being read and written while you convert them, and a long conversion slows full sync, reorgs and client release cycles. And the larger the state grows, the longer any conversion takes.\n\nEIP-7612 offers a stopgap: stop the MPT from growing *now*, and convert the historical data later.\n\n## How it works\n\n- At `FORK_TIME` (never set) the MPT is **frozen**. A new, initially empty **Verkle overlay tree** is created.\n- **Writes** (accounts, storage slots, code chunks) go only to the overlay tree, using EIP-6800 key derivation. Account basic data (version, code size, nonce, balance) is packed into one leaf, with the code hash in a sibling leaf.\n- **Reads** check the overlay first and fall back to the frozen MPT if the key is not there.\n- From the fork block, the block header's `stateRoot` is the **Verkle root**, not the MPT root.\n- Once the freeze block is finalized, clients can delete the MPT's internal nodes to save disk space. They still need the leaf data until it is migrated.\n\nMigrating the frozen MPT data into the Verkle tree is explicitly left to a later EIP ([EIP-7748](/eip-7748/) describes one such conversion). No consensus-layer changes are needed.\n\n## Sample code\n\nThe modified state accessors, simplified from the spec's execution-spec diff:\n\n```python\ndef get_account_optional(state, address):\n    acct = verkle_get_account(state._overlay_tree, get_tree_key_for_version(address))\n    if acct is not None:\n        return acct\n    return trie_get(state._main_trie, address)          # frozen MPT fallback\n\ndef set_account(state, address, account):\n    verkle_set_account(state._overlay_tree, get_tree_key_for_version(address), account)\n\ndef get_storage(state, address, slot):\n    v = state._overlay_tree.get(get_tree_key_for_storage_slot(address, slot))\n    if v is not None:\n        return v\n    trie = state._storage_tries.get(address)\n    return U256(0) if trie is None else trie_get(trie, slot)\n\ndef set_storage(state, address, slot, value):\n    state._overlay_tree.set(get_tree_key_for_storage_slot(address, slot), value)\n```\n\n## Things to know\n\n- Status is **Stagnant**. `FORK_TIME` is TBD and the security section reads \"needs discussion\".\n- It depends on [EIP-6800](/eip-6800/) (Verkle state, also Stagnant), [EIP-4762](/eip-4762/) (stateless gas costs) and [EIP-7545](/eip-7545/) (proof precompile, Stagnant). A unified **binary** tree ([EIP-7864](/eip-7864/), Draft) has since been proposed as the target state structure.\n- The double lookup (overlay, then MPT) costs extra reads until the old state is fully migrated.\n- The reference implementation is a go-ethereum research branch, not a released client feature.\n"},"ja":{"lang":"ja","tldr":"既存の Merkle Patricia ツリーを凍結し、すべての新しいステートをその上の Verkle「オーバーレイ」に書き込むことで、Ethereum のステートを Verkle ツリーに切り替えることを提案した。古いデータの遅い移行は後のステップに先送りする。","tags":["verkle","state","stateless","migration","core"],"related":[6800,4762,7545,7748,7864],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7612/","markdown":"## 何を解決するのか\n\nEthereum のステートを 16 分木の Merkle Patricia Tree（MPT）から Verkle ツリー（[EIP-6800](/eip-6800/)）へ移すことは、ステートレスクライアントの前提条件です。しかし、ステート全体の変換は困難です。巨大なストレージを持つコントラクトは、変換している最中にも読み書きされており、長い変換はフルシンク、リオーグ、クライアントのリリースサイクルを遅らせます。しかも、ステートが大きくなるほど、変換には時間がかかります。\n\nEIP-7612 は応急策を提案します。MPT を*今*成長させるのをやめ、過去のデータは後で変換するというものです。\n\n## 仕組み\n\n- `FORK_TIME`（未設定）に、MPT が**凍結**されます。新しい、最初は空の **Verkle オーバーレイツリー**が作られます。\n- **書き込み**（アカウント、ストレージスロット、コードチャンク）は、EIP-6800 のキー導出を使って、オーバーレイツリーにのみ行われます。アカウントの基本データ（バージョン、コードサイズ、nonce、残高）は 1 つのリーフにまとめられ、コードハッシュは隣のリーフに置かれます。\n- **読み取り**は、まずオーバーレイを確認し、キーがなければ凍結された MPT にフォールバックします。\n- フォークブロックから、ブロックヘッダーの `stateRoot` は MPT のルートではなく **Verkle ルート**になります。\n- 凍結ブロックがファイナライズされたら、クライアントはディスク容量を節約するために MPT の内部ノードを削除できます。リーフのデータは、移行されるまでは引き続き必要です。\n\n凍結された MPT のデータを Verkle ツリーに移行する作業は、後の EIP に明示的に委ねられています（[EIP-7748](/eip-7748/) がそうした変換の 1 つを記述しています）。コンセンサス層の変更は不要です。\n\n## サンプルコード\n\n変更されたステートアクセサー。仕様の execution-spec の差分から簡略化したもの:\n\n```python\ndef get_account_optional(state, address):\n    acct = verkle_get_account(state._overlay_tree, get_tree_key_for_version(address))\n    if acct is not None:\n        return acct\n    return trie_get(state._main_trie, address)          # frozen MPT fallback\n\ndef set_account(state, address, account):\n    verkle_set_account(state._overlay_tree, get_tree_key_for_version(address), account)\n\ndef get_storage(state, address, slot):\n    v = state._overlay_tree.get(get_tree_key_for_storage_slot(address, slot))\n    if v is not None:\n        return v\n    trie = state._storage_tries.get(address)\n    return U256(0) if trie is None else trie_get(trie, slot)\n\ndef set_storage(state, address, slot, value):\n    state._overlay_tree.set(get_tree_key_for_storage_slot(address, slot), value)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。`FORK_TIME` は TBD で、セキュリティのセクションには「needs discussion」とあります。\n- これは [EIP-6800](/eip-6800/)（Verkle ステート。こちらも Stagnant）、[EIP-4762](/eip-4762/)（ステートレス向けのガスコスト）、[EIP-7545](/eip-7545/)（証明プリコンパイル、Stagnant）に依存しています。その後、目標とするステート構造として、統一された**バイナリ**ツリー（[EIP-7864](/eip-7864/)、Draft）が提案されています。\n- 二重の検索（オーバーレイ、次に MPT）は、古いステートが完全に移行されるまで、余分な読み取りコストがかかります。\n- リファレンス実装は go-ethereum のリサーチブランチであり、リリースされたクライアントの機能ではありません。\n"},"ko":{"lang":"ko","tldr":"기존 Merkle Patricia 트리를 동결하고 모든 새 상태를 그 위의 Verkle \"오버레이\"에 기록하는 방식으로, 이더리움의 상태를 Verkle 트리로 전환하자고 제안했다. 오래된 데이터의 느린 마이그레이션은 이후 단계로 미룬다.","tags":["verkle","state","stateless","migration","core"],"related":[6800,4762,7545,7748,7864],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7612/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움의 상태를 16진 Merkle Patricia Tree(MPT)에서 Verkle 트리([EIP-6800](/eip-6800/))로 옮기는 것은 스테이트리스 클라이언트의 전제 조건입니다. 하지만 전체 상태를 변환하기는 어렵습니다. 스토리지가 거대한 컨트랙트는 변환하는 동안에도 읽히고 쓰이고 있으며, 긴 변환은 풀 싱크, 리오그, 클라이언트 릴리스 주기를 늦춥니다. 게다가 상태가 커질수록 어떤 변환이든 더 오래 걸립니다.\n\nEIP-7612는 임시방편을 제시합니다. MPT가 *지금* 커지는 것을 멈추고, 과거 데이터는 나중에 변환하는 것입니다.\n\n## 어떻게 동작하나요?\n\n- `FORK_TIME`(끝내 정해지지 않음)에 MPT가 **동결**됩니다. 새롭고 처음에는 비어 있는 **Verkle 오버레이 트리**가 만들어집니다.\n- **쓰기**(계정, 스토리지 슬롯, 코드 청크)는 EIP-6800의 키 도출 방식을 사용해 오버레이 트리에만 기록됩니다. 계정 기본 데이터(버전, 코드 크기, nonce, 잔액)는 리프 하나에 묶이고, 코드 해시는 이웃한 리프에 둡니다.\n- **읽기**는 오버레이를 먼저 확인하고, 키가 없으면 동결된 MPT로 폴백합니다.\n- 포크 블록부터 블록 헤더의 `stateRoot`는 MPT 루트가 아니라 **Verkle 루트**입니다.\n- 동결 블록이 확정되면 클라이언트는 디스크 공간을 절약하기 위해 MPT의 내부 노드를 삭제할 수 있습니다. 리프 데이터는 마이그레이션되기 전까지는 여전히 필요합니다.\n\n동결된 MPT 데이터를 Verkle 트리로 마이그레이션하는 일은 이후의 EIP에 명시적으로 맡겨져 있습니다([EIP-7748](/eip-7748/)이 그런 변환 중 하나를 설명합니다). 합의 계층의 변경은 필요하지 않습니다.\n\n## 샘플 코드\n\n수정된 상태 접근자. 명세의 execution-spec diff를 단순화한 것입니다.\n\n```python\ndef get_account_optional(state, address):\n    acct = verkle_get_account(state._overlay_tree, get_tree_key_for_version(address))\n    if acct is not None:\n        return acct\n    return trie_get(state._main_trie, address)          # frozen MPT fallback\n\ndef set_account(state, address, account):\n    verkle_set_account(state._overlay_tree, get_tree_key_for_version(address), account)\n\ndef get_storage(state, address, slot):\n    v = state._overlay_tree.get(get_tree_key_for_storage_slot(address, slot))\n    if v is not None:\n        return v\n    trie = state._storage_tries.get(address)\n    return U256(0) if trie is None else trie_get(trie, slot)\n\ndef set_storage(state, address, slot, value):\n    state._overlay_tree.set(get_tree_key_for_storage_slot(address, slot), value)\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. `FORK_TIME`은 TBD이고 보안 섹션에는 \"needs discussion\"이라고 적혀 있습니다.\n- 이는 [EIP-6800](/eip-6800/)(Verkle 상태, 역시 Stagnant), [EIP-4762](/eip-4762/)(스테이트리스 가스 비용), [EIP-7545](/eip-7545/)(증명 프리컴파일, Stagnant)에 의존합니다. 그 후 목표 상태 구조로 통합된 **바이너리** 트리([EIP-7864](/eip-7864/), Draft)가 제안되었습니다.\n- 이중 조회(오버레이, 그다음 MPT)는 이전 상태가 완전히 마이그레이션될 때까지 추가 읽기 비용이 듭니다.\n- 레퍼런스 구현은 go-ethereum 리서치 브랜치이며, 릴리스된 클라이언트 기능이 아닙니다.\n"},"zh":{"lang":"zh","tldr":"提议把以太坊的状态切换为 Verkle 树：冻结现有的 Merkle Patricia 树，把所有新状态写入其上的 Verkle\"叠加层\"，将旧数据缓慢的迁移推迟到后续步骤。","tags":["verkle","state","stateless","migration","core"],"related":[6800,4762,7545,7748,7864],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7612/","markdown":"## 它解决什么问题？\n\n把以太坊的状态从十六叉 Merkle Patricia 树（MPT）迁移到 Verkle 树（[EIP-6800](/eip-6800/)），是实现无状态客户端的前提条件。但转换整个状态很困难：存储量巨大的合约在被转换的同时仍在被读写，漫长的转换会拖慢全量同步、重组和客户端的发布周期。而且状态越大，任何转换所需的时间就越长。\n\nEIP-7612 提供了一个权宜之计：*现在*就让 MPT 停止增长，之后再转换历史数据。\n\n## 它如何运作\n\n- 在 `FORK_TIME`（从未设定）时，MPT 被**冻结**。创建一棵新的、最初为空的 **Verkle 叠加树**。\n- **写入**（账户、存储槽、代码块）只进入叠加树，使用 EIP-6800 的键推导方式。账户基本数据（版本、代码大小、nonce、余额）被打包进一个叶子，代码哈希放在相邻的叶子中。\n- **读取**先检查叠加层，如果键不在其中，则回退到冻结的 MPT。\n- 从分叉区块开始，区块头中的 `stateRoot` 是 **Verkle 根**，而不是 MPT 根。\n- 一旦冻结区块被最终确定，客户端就可以删除 MPT 的内部节点以节省磁盘空间。在叶子数据被迁移之前，仍然需要保留它们。\n\n把冻结的 MPT 数据迁移到 Verkle 树，被明确留给后续的 EIP（[EIP-7748](/eip-7748/) 描述了一种这样的转换）。不需要共识层的变更。\n\n## 示例代码\n\n修改后的状态访问器，根据规范中 execution-spec 的 diff 简化而来：\n\n```python\ndef get_account_optional(state, address):\n    acct = verkle_get_account(state._overlay_tree, get_tree_key_for_version(address))\n    if acct is not None:\n        return acct\n    return trie_get(state._main_trie, address)          # frozen MPT fallback\n\ndef set_account(state, address, account):\n    verkle_set_account(state._overlay_tree, get_tree_key_for_version(address), account)\n\ndef get_storage(state, address, slot):\n    v = state._overlay_tree.get(get_tree_key_for_storage_slot(address, slot))\n    if v is not None:\n        return v\n    trie = state._storage_tries.get(address)\n    return U256(0) if trie is None else trie_get(trie, slot)\n\ndef set_storage(state, address, slot, value):\n    state._overlay_tree.set(get_tree_key_for_storage_slot(address, slot), value)\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。`FORK_TIME` 为 TBD，安全性一节写的是\"needs discussion\"。\n- 它依赖于 [EIP-6800](/eip-6800/)（Verkle 状态，同样处于 Stagnant）、[EIP-4762](/eip-4762/)（无状态 gas 成本）和 [EIP-7545](/eip-7545/)（证明预编译，Stagnant）。此后，统一的**二叉**树（[EIP-7864](/eip-7864/)，Draft）已被提议作为目标状态结构。\n- 在旧状态完全迁移之前，双重查找（先叠加层，再 MPT）会带来额外的读取开销。\n- 参考实现是 go-ethereum 的一个研究分支，而不是已发布的客户端功能。\n"}},"requiredBy":[7748]}
