{"eip":8379,"title":"Top-up Sync","description":"CL-driven EL synchronization by exposing the execution client head and distinguishing missing state from missing history in the engine API","authors":["Jacek Sieka (@arnetheduck)","Dustin (@tersec)","Tamaghna Choudhuri (@RazorClient)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2026-08-06","discussionsTo":"https://ethereum-magicians.org/t/eip-8379-top-up-sync/29405","repo":"EIPs","label":"EIP-8379","officialUrl":"https://eips.ethereum.org/EIPS/eip-8379","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8379.md","url":"https://eips.huatuo.xyz/eip-8379/","tldr":{"en":"Adds engine_getSyncStatus and a MISSING_STATE payload status to the Engine API so the consensus client can feed blocks to its execution client one by one ('top-up sync'), a step toward retiring block download over devp2p.","ja":"Engine API に engine_getSyncStatus と MISSING_STATE というペイロードステータスを追加し、コンセンサスクライアントが実行クライアントにブロックを 1 つずつ供給できるようにする（「top-up sync」）。devp2p でのブロックダウンロードを廃止するための一歩となる。","ko":"Engine API에 engine_getSyncStatus와 MISSING_STATE 페이로드 상태를 추가해, 합의 클라이언트가 실행 클라이언트에 블록을 하나씩 공급할 수 있게 한다('top-up sync'). devp2p를 통한 블록 다운로드를 없애 가는 한 걸음이다.","zh":"为 Engine API 新增 engine_getSyncStatus 和 MISSING_STATE 载荷状态，让共识客户端可以把区块逐个喂给执行客户端（“top-up sync”），这是逐步淘汰基于 devp2p 的区块下载的一步。"},"tags":["engine-api","sync","clients","consensus-layer","execution-layer"],"explainers":{"en":{"lang":"en","tldr":"Adds engine_getSyncStatus and a MISSING_STATE payload status to the Engine API so the consensus client can feed blocks to its execution client one by one ('top-up sync'), a step toward retiring block download over devp2p.","tags":["engine-api","sync","clients","consensus-layer","execution-layer"],"related":[7928,7642,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8379/","markdown":"## What problem does it solve?\n\nSince the Merge ([EIP-3675](/eip-3675/)), a node runs two clients. Both fetch the same blocks independently: the consensus client (CL) over its gossip and req/resp network, the execution client (EL) over devp2p. That duplicates networking work.\n\nThe CL could simply hand blocks to the EL through the Engine API, but two pieces are missing:\n\n- The CL cannot ask the EL where its chain ends, so it does not know which block to send next.\n- When `engine_newPayload` returns `SYNCING`, the CL cannot tell whether the EL lacks the **parent blocks** (the CL should send them) or lacks the **state** because it is still snap-syncing (sending parents would be useless).\n\n## How it works\n\n**`engine_getSyncStatus`** (no params) returns two heads:\n\n| Field | Meaning |\n| --- | --- |\n| `headBlockHash` / `headBlockNumber` | Latest block of the EL's contiguous canonical chain of held blocks |\n| `executedBlockHash` / `executedBlockNumber` | Latest canonical block the EL has executed and holds post-state for (`null` before initial state sync) |\n\nThe EL guarantees that a payload whose parent is the reported block head is never answered with `SYNCING`, and that the status only changes after a `newPayload` or `forkchoiceUpdated` call.\n\n**`MISSING_STATE`** is a new payload status: all ancestors are known but the block was not executed because the pre-state is unavailable. The EL stores the block and advances its block head; the executed head catches up later, by executing stored blocks or by fast-forwarding state (snap sync, or [EIP-7928](/eip-7928/) block access lists). `SYNCING` now strictly means missing ancestor blocks.\n\n**Top-up loop** run by the CL: query status; if the EL head is behind, send the CL's canonical block at `headBlockNumber + 1`; if the parent hash differs, find the fork point and re-send from there; if the needed block is older than the CL keeps, let the EL snap-sync first. The new `engine_newPayload` version accepts payloads from earlier forks so one top-up can cross fork boundaries.\n\n## Sample code\n\nThe CL-side loop, as TypeScript-flavoured pseudocode:\n\n```ts\nasync function topUp(el: EngineApi, cl: BeaconChain) {\n  for (;;) {\n    const s = await el.call(\"engine_getSyncStatus\", []);\n    if (s.headBlockHash === cl.canonicalExecutionHead().hash) return; // delivered\n\n    const next = cl.canonicalPayloadAt(BigInt(s.headBlockNumber) + 1n);\n    if (!next) { await cl.waitForEl(); continue; }        // too old: EL must snap-sync\n    if (next.parentHash !== s.headBlockHash) {           // EL is on an abandoned fork\n      await redeliverFromForkPoint(el, cl, s);\n      continue;\n    }\n    const r = await el.call(\"engine_newPayloadVN\", [next /* , fork-specific params */]);\n    // r.status is VALID, INVALID or MISSING_STATE, never SYNCING here\n    if (r.status === \"INVALID\") cl.markInvalid(next);\n  }\n}\n```\n\n## Things to know\n\n- Status is **Draft**. Open questions include how much `MISSING_STATE` data the EL must buffer and what rules apply to multiplexers serving several CLs.\n- A `MISSING_STATE` payload is **not** validated; the CL must keep treating it as optimistic until the executed head passes it.\n- CLs that do not implement top-up can treat `MISSING_STATE` exactly like `SYNCING`; older method versions are unchanged.\n- The longer-term aim is to deprecate devp2p block-distribution messages (`GetBlockHeaders`, `GetBlockBodies`); snap sync and the mempool stay on devp2p. Batched delivery is left to future EIPs.\n"},"ja":{"lang":"ja","tldr":"Engine API に engine_getSyncStatus と MISSING_STATE というペイロードステータスを追加し、コンセンサスクライアントが実行クライアントにブロックを 1 つずつ供給できるようにする（「top-up sync」）。devp2p でのブロックダウンロードを廃止するための一歩となる。","tags":["engine-api","sync","clients","consensus-layer","execution-layer"],"related":[7928,7642,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8379/","markdown":"## 何を解決するのか\n\nMerge（[EIP-3675](/eip-3675/)）以降、ノードは 2 つのクライアントを動かします。どちらも同じブロックを独立に取得しています。コンセンサスクライアント（CL）はゴシップと req/resp のネットワークで、実行クライアント（EL）は devp2p で取得します。これはネットワーク処理の重複です。\n\nCL が Engine API を通じて EL にブロックを渡せば済む話ですが、2 つの部品が足りません。\n\n- CL は EL に自分のチェーンがどこで終わっているかを尋ねられないため、次にどのブロックを送るべきか分かりません。\n- `engine_newPayload` が `SYNCING` を返したとき、CL は、EL が**親ブロック**を欠いている（CL が送るべき）のか、まだ snap-sync 中で**ステート**を欠いている（親を送っても無駄）のかを区別できません。\n\n## 仕組み\n\n**`engine_getSyncStatus`**（パラメーターなし）は、2 つのヘッドを返します。\n\n| フィールド | 意味 |\n| --- | --- |\n| `headBlockHash` / `headBlockNumber` | EL が保持するブロックの連続した正規チェーンの最新ブロック |\n| `executedBlockHash` / `executedBlockNumber` | EL が実行済みで、実行後のステートを保持している最新の正規ブロック（初期のステート同期の前は `null`） |\n\nEL は、親が報告されたブロックヘッドであるペイロードに `SYNCING` を返さないことと、ステータスが `newPayload` または `forkchoiceUpdated` の呼び出しの後にのみ変わることを保証します。\n\n**`MISSING_STATE`** は新しいペイロードステータスです。すべての祖先は既知だが、実行前のステートが利用できないためブロックが実行されなかったことを示します。EL はそのブロックを保存してブロックヘッドを進め、実行済みヘッドは後から追いつきます。保存したブロックを実行するか、ステートを早送りする（snap sync、または [EIP-7928](/eip-7928/) のブロックアクセスリスト）ことで追いつきます。`SYNCING` は今後、祖先ブロックの欠落のみを厳密に意味します。\n\nCL が実行する **top-up ループ**: ステータスを問い合わせる。EL のヘッドが遅れていれば、CL の正規ブロックのうち `headBlockNumber + 1` を送る。親ハッシュが異なれば、分岐点を見つけてそこから再送する。必要なブロックが CL の保持する範囲より古ければ、先に EL に snap-sync させる。新しい `engine_newPayload` のバージョンは以前のフォークのペイロードも受け付けるため、1 回の top-up でフォークの境界をまたげます。\n\n## サンプルコード\n\nCL 側のループ（TypeScript 風の擬似コード）:\n\n```ts\nasync function topUp(el: EngineApi, cl: BeaconChain) {\n  for (;;) {\n    const s = await el.call(\"engine_getSyncStatus\", []);\n    if (s.headBlockHash === cl.canonicalExecutionHead().hash) return; // delivered\n\n    const next = cl.canonicalPayloadAt(BigInt(s.headBlockNumber) + 1n);\n    if (!next) { await cl.waitForEl(); continue; }        // too old: EL must snap-sync\n    if (next.parentHash !== s.headBlockHash) {           // EL is on an abandoned fork\n      await redeliverFromForkPoint(el, cl, s);\n      continue;\n    }\n    const r = await el.call(\"engine_newPayloadVN\", [next /* , fork-specific params */]);\n    // r.status is VALID, INVALID or MISSING_STATE, never SYNCING here\n    if (r.status === \"INVALID\") cl.markInvalid(next);\n  }\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。未解決の問題には、EL が `MISSING_STATE` のデータをどれだけバッファしなければならないか、複数の CL にサービスを提供するマルチプレクサーにどんなルールが適用されるか、などがあります。\n- `MISSING_STATE` のペイロードは検証されて**いません**。実行済みヘッドがそれを通過するまで、CL はそれを楽観的なものとして扱い続けなければなりません。\n- top-up を実装しない CL は、`MISSING_STATE` を `SYNCING` とまったく同じように扱えます。古いメソッドのバージョンは変わりません。\n- 長期的な目標は、devp2p のブロック配信メッセージ（`GetBlockHeaders`、`GetBlockBodies`）を非推奨にすることです。snap sync と mempool は devp2p に残ります。バッチでの配信は、将来の EIP に委ねられています。\n"},"ko":{"lang":"ko","tldr":"Engine API에 engine_getSyncStatus와 MISSING_STATE 페이로드 상태를 추가해, 합의 클라이언트가 실행 클라이언트에 블록을 하나씩 공급할 수 있게 한다('top-up sync'). devp2p를 통한 블록 다운로드를 없애 가는 한 걸음이다.","tags":["engine-api","sync","clients","consensus-layer","execution-layer"],"related":[7928,7642,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8379/","markdown":"## 어떤 문제를 해결하나요?\n\nMerge([EIP-3675](/eip-3675/)) 이후 노드는 클라이언트 두 개를 돌립니다. 둘 다 같은 블록을 독립적으로 가져옵니다. 합의 클라이언트(CL)는 가십과 req/resp 네트워크로, 실행 클라이언트(EL)는 devp2p로 가져옵니다. 네트워크 작업이 중복됩니다.\n\nCL이 Engine API를 통해 EL에 블록을 그냥 넘겨주면 되지만, 두 가지가 빠져 있습니다.\n\n- CL은 EL에게 체인이 어디서 끝나는지 물을 수 없으므로 다음에 어떤 블록을 보내야 하는지 모릅니다.\n- `engine_newPayload`가 `SYNCING`을 반환할 때, CL은 EL이 **부모 블록**이 없어서(CL이 보내야 함) 그런지, 아직 snap-sync 중이라 **상태**가 없어서(부모를 보내 봐야 소용없음) 그런지 구분할 수 없습니다.\n\n## 어떻게 동작하나요?\n\n**`engine_getSyncStatus`**(파라미터 없음)는 두 개의 헤드를 반환합니다.\n\n| 필드 | 의미 |\n| --- | --- |\n| `headBlockHash` / `headBlockNumber` | EL이 보유한 블록으로 이루어진 연속된 정규 체인의 최신 블록 |\n| `executedBlockHash` / `executedBlockNumber` | EL이 실행했고 실행 후 상태를 보유한 최신 정규 블록(초기 상태 동기화 전에는 `null`) |\n\nEL은 부모가 보고된 블록 헤드인 페이로드에는 `SYNCING`으로 응답하지 않으며, 상태는 `newPayload`나 `forkchoiceUpdated` 호출 이후에만 바뀐다고 보장합니다.\n\n**`MISSING_STATE`** 는 새 페이로드 상태입니다. 모든 조상은 알고 있지만 사전 상태를 쓸 수 없어서 블록이 실행되지 않았다는 뜻입니다. EL은 블록을 저장하고 블록 헤드를 앞으로 옮기며, 실행 헤드는 나중에 따라잡습니다. 저장된 블록을 실행하거나 상태를 빨리 감기(snap sync, 또는 [EIP-7928](/eip-7928/)의 블록 접근 목록)로 따라잡습니다. 이제 `SYNCING`은 엄밀히 조상 블록이 없다는 뜻입니다.\n\nCL이 돌리는 **top-up 루프**: 상태를 조회합니다. EL 헤드가 뒤처져 있으면 CL의 정규 블록 중 `headBlockNumber + 1`을 보냅니다. 부모 해시가 다르면 분기점을 찾아 거기서부터 다시 보냅니다. 필요한 블록이 CL이 보관하는 것보다 오래되었으면 EL이 먼저 snap-sync하게 둡니다. 새 `engine_newPayload` 버전은 이전 포크의 페이로드도 받으므로 top-up 한 번으로 포크 경계를 넘을 수 있습니다.\n\n## 샘플 코드\n\nCL 쪽 루프(TypeScript 스타일 의사 코드):\n\n```ts\nasync function topUp(el: EngineApi, cl: BeaconChain) {\n  for (;;) {\n    const s = await el.call(\"engine_getSyncStatus\", []);\n    if (s.headBlockHash === cl.canonicalExecutionHead().hash) return; // delivered\n\n    const next = cl.canonicalPayloadAt(BigInt(s.headBlockNumber) + 1n);\n    if (!next) { await cl.waitForEl(); continue; }        // too old: EL must snap-sync\n    if (next.parentHash !== s.headBlockHash) {           // EL is on an abandoned fork\n      await redeliverFromForkPoint(el, cl, s);\n      continue;\n    }\n    const r = await el.call(\"engine_newPayloadVN\", [next /* , fork-specific params */]);\n    // r.status is VALID, INVALID or MISSING_STATE, never SYNCING here\n    if (r.status === \"INVALID\") cl.markInvalid(next);\n  }\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다. 열린 질문으로는 EL이 `MISSING_STATE` 데이터를 얼마나 버퍼링해야 하는지, 여러 CL을 서비스하는 멀티플렉서에는 어떤 규칙이 적용되는지 등이 있습니다.\n- `MISSING_STATE` 페이로드는 검증된 것이 **아닙니다**. 실행 헤드가 그것을 지나갈 때까지 CL은 계속 낙관적(optimistic)으로 취급해야 합니다.\n- top-up을 구현하지 않은 CL은 `MISSING_STATE`를 `SYNCING`과 똑같이 취급하면 됩니다. 이전 메서드 버전은 바뀌지 않습니다.\n- 장기적인 목표는 devp2p의 블록 배포 메시지(`GetBlockHeaders`, `GetBlockBodies`)를 폐기하는 것입니다. snap sync와 멤풀은 devp2p에 남습니다. 배치 전달은 향후 EIP에 맡겨 둡니다.\n"},"zh":{"lang":"zh","tldr":"为 Engine API 新增 engine_getSyncStatus 和 MISSING_STATE 载荷状态，让共识客户端可以把区块逐个喂给执行客户端（“top-up sync”），这是逐步淘汰基于 devp2p 的区块下载的一步。","tags":["engine-api","sync","clients","consensus-layer","execution-layer"],"related":[7928,7642,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8379/","markdown":"## 它解决什么问题？\n\n自 Merge（[EIP-3675](/eip-3675/)）以来，一个节点要运行两个客户端。两者各自独立获取相同的区块：共识客户端（CL）通过其 gossip 和 req/resp 网络，执行客户端（EL）通过 devp2p。这造成了网络工作的重复。\n\nCL 本可以通过 Engine API 直接把区块交给 EL，但缺少两样东西：\n\n- CL 无法询问 EL 它的链在哪里结束，所以不知道接下来该发送哪个区块。\n- 当 `engine_newPayload` 返回 `SYNCING` 时，CL 无法分辨 EL 是缺少**父区块**（CL 应该发送它们），还是因为仍在 snap-sync 而缺少**状态**（此时发送父区块没有用）。\n\n## 它如何运作\n\n**`engine_getSyncStatus`**（无参数）返回两个头：\n\n| 字段 | 含义 |\n| --- | --- |\n| `headBlockHash` / `headBlockNumber` | EL 所持有区块构成的连续规范链的最新区块 |\n| `executedBlockHash` / `executedBlockNumber` | EL 已执行并持有执行后状态的最新规范区块（初始状态同步之前为 `null`） |\n\nEL 保证：父区块是所报告区块头的载荷绝不会得到 `SYNCING` 的回应，并且该状态只会在 `newPayload` 或 `forkchoiceUpdated` 调用之后才改变。\n\n**`MISSING_STATE`** 是一个新的载荷状态：所有祖先区块都已知，但由于前置状态不可用，该区块未被执行。EL 会存储该区块并推进其区块头；已执行头稍后会追上，方式是执行已存储的区块，或快进状态（snap sync，或 [EIP-7928](/eip-7928/) 的区块访问列表）。`SYNCING` 现在严格地只表示缺少祖先区块。\n\n由 CL 运行的 **top-up 循环**：查询状态；如果 EL 的头落后，就发送 CL 规范链上 `headBlockNumber + 1` 的区块；如果父哈希不同，就找到分叉点并从那里重新发送；如果所需区块比 CL 保留的更旧，就先让 EL 进行 snap-sync。新版本的 `engine_newPayload` 接受来自更早分叉的载荷，因此一次 top-up 就可以跨越分叉边界。\n\n## 示例代码\n\nCL 一侧的循环，TypeScript 风格的伪代码：\n\n```ts\nasync function topUp(el: EngineApi, cl: BeaconChain) {\n  for (;;) {\n    const s = await el.call(\"engine_getSyncStatus\", []);\n    if (s.headBlockHash === cl.canonicalExecutionHead().hash) return; // delivered\n\n    const next = cl.canonicalPayloadAt(BigInt(s.headBlockNumber) + 1n);\n    if (!next) { await cl.waitForEl(); continue; }        // too old: EL must snap-sync\n    if (next.parentHash !== s.headBlockHash) {           // EL is on an abandoned fork\n      await redeliverFromForkPoint(el, cl, s);\n      continue;\n    }\n    const r = await el.call(\"engine_newPayloadVN\", [next /* , fork-specific params */]);\n    // r.status is VALID, INVALID or MISSING_STATE, never SYNCING here\n    if (r.status === \"INVALID\") cl.markInvalid(next);\n  }\n}\n```\n\n## 需要注意\n\n- 状态为 **Draft**。尚未解决的问题包括 EL 必须缓冲多少 `MISSING_STATE` 数据，以及为多个 CL 提供服务的多路复用器适用什么规则。\n- `MISSING_STATE` 载荷**没有**经过验证；在已执行头越过它之前，CL 必须继续把它当作乐观状态处理。\n- 没有实现 top-up 的 CL 可以把 `MISSING_STATE` 完全当作 `SYNCING` 处理；旧版本的方法不变。\n- 长期目标是弃用 devp2p 的区块分发消息（`GetBlockHeaders`、`GetBlockBodies`）；snap sync 和内存池仍留在 devp2p 上。批量交付留给未来的 EIP。\n"}}}
