{"eip":8012,"title":"Generalized consolidation requests","description":"Reutilizes the consolidation request contract to pass general messages from the EL to the CL.","authors":["Potuz (@potuz)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2025-08-22","discussionsTo":"https://ethereum-magicians.org/t/eip-8012-generalized-consolidation-requests/25264","repo":"EIPs","label":"EIP-8012","officialUrl":"https://eips.ethereum.org/EIPS/eip-8012","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8012.md","url":"https://eips.huatuo.xyz/eip-8012/","tldr":{"en":"Reuses the existing consolidation-request contract as a general EL-to-CL message channel by giving non-validator target_pubkey values a structured meaning, so the CL can add features without EL changes.","ja":"既存の consolidation リクエストコントラクトを、バリデーターではない target_pubkey の値に構造化された意味を持たせることで、EL から CL への汎用メッセージチャネルとして再利用する。これにより EL を変更せずに CL が機能を追加できる。","ko":"기존 통합(consolidation) 요청 컨트랙트를 재사용해, 검증자가 아닌 target_pubkey 값에 구조화된 의미를 부여함으로써 범용 EL-CL 메시지 채널로 만든다. 그러면 CL이 EL 변경 없이 기능을 추가할 수 있다.","zh":"复用现有的合并（consolidation）请求合约，为非验证者的 target_pubkey 值赋予结构化含义，使其成为通用的 EL 到 CL 消息通道，这样 CL 无需改动 EL 就能增加功能。"},"tags":["consensus","execution-requests","consolidation","validators","cross-layer"],"explainers":{"en":{"lang":"en","tldr":"Reuses the existing consolidation-request contract as a general EL-to-CL message channel by giving non-validator target_pubkey values a structured meaning, so the CL can add features without EL changes.","tags":["consensus","execution-requests","consolidation","validators","cross-layer"],"related":[7251,7685,7732],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8012/","markdown":"## What problem does it solve?\n\nSince Pectra, smart contracts on the execution layer (EL) can trigger validator actions on the consensus layer (CL) through system contracts and [EIP-7685](/eip-7685/) requests. One of them is the **consolidation request** from [EIP-7251](/eip-7251/), which carries a `source_pubkey` and a `target_pubkey` (both 48 bytes).\n\nEach new kind of EL-triggered CL action would normally need a new system contract, new request type and Engine API changes, i.e. coordinated work on both layers. EIP-8012 points out that the consolidation pipe already carries 48 arbitrary-looking bytes, and could carry other messages without touching the EL at all. One suggested use: letting an existing validator register as a builder for [ePBS (EIP-7732)](/eip-7732/).\n\n## How it works\n\nNo changes on the EL or Engine API. On the CL, when a `ConsolidationRequest` arrives:\n\n- If `target_pubkey` is the BLS key of an existing active validator, it is a normal consolidation.\n- Otherwise, the 48 bytes are parsed as a **generalized request**:\n\n| Field | Size | Meaning |\n| --- | --- | --- |\n| `MAGIC_PREFIX` | 3 bytes | `0xEF0A11` |\n| `CALL_TYPE` | 4 bytes | little-endian `uint32`, which handler to run |\n| `ARG_NUMBER` | 1 byte | `uint8`, how many arguments are used |\n| `ARG1`…`ARG5` | 5 × 8 bytes | little-endian `uint64` arguments |\n\n3 + 4 + 1 + 40 = 48 bytes, exactly the size of a pubkey. Each new `CALL_TYPE` gets a handler invoked from `process_consolidation_requests`.\n\n## Sample code\n\nPacking a generalized request off-chain (TypeScript):\n\n```ts\nfunction packGeneralized(callType: number, args: bigint[]): Uint8Array {\n  if (args.length \u003e 5) throw new Error(\"max 5 args\");\n  const out = new Uint8Array(48);\n  const view = new DataView(out.buffer);\n  out.set([0xef, 0x0a, 0x11], 0);          // MAGIC_PREFIX\n  view.setUint32(3, callType, true);       // CALL_TYPE, little-endian\n  view.setUint8(7, args.length);           // ARG_NUMBER\n  args.forEach((a, i) =\u003e view.setBigUint64(8 + i * 8, a, true));\n  return out;                              // use as target_pubkey\n}\n```\n\nThe result is passed as `target_pubkey` to the consolidation request contract, exactly like a normal consolidation call.\n\n## Things to know\n\n- Status is **Stagnant**; no call types are defined and nothing is scheduled.\n- It only standardizes how the CL *would* interpret such requests; each concrete use still needs a CL fork to add its handler.\n- Requests still go through the consolidation contract's fee and queue rules, since the EL side is unchanged.\n- Arguments are limited to five `uint64` values, so richer payloads would not fit.\n"},"ja":{"lang":"ja","tldr":"既存の consolidation リクエストコントラクトを、バリデーターではない target_pubkey の値に構造化された意味を持たせることで、EL から CL への汎用メッセージチャネルとして再利用する。これにより EL を変更せずに CL が機能を追加できる。","tags":["consensus","execution-requests","consolidation","validators","cross-layer"],"related":[7251,7685,7732],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8012/","markdown":"## 何を解決するのか\n\nPectra 以降、実行レイヤー（EL）のスマートコントラクトは、システムコントラクトと [EIP-7685](/eip-7685/) のリクエストを通じて、コンセンサスレイヤー（CL）のバリデーター操作を起動できます。そのひとつが [EIP-7251](/eip-7251/) の **consolidation リクエスト**で、`source_pubkey` と `target_pubkey`（どちらも 48 バイト）を運びます。\n\nEL から起動する CL の操作を新しく増やすたびに、通常は新しいシステムコントラクト、新しいリクエストタイプ、Engine API の変更、つまり両レイヤーでの協調した作業が必要になります。EIP-8012 は、consolidation の経路がすでに任意に見える 48 バイトを運んでおり、EL にいっさい手を入れずに他のメッセージも運べると指摘しています。提案されている用途のひとつは、既存のバリデーターが [ePBS（EIP-7732）](/eip-7732/) のビルダーとして登録できるようにすることです。\n\n## 仕組み\n\nEL と Engine API は変更しません。CL で `ConsolidationRequest` が届いたとき:\n\n- `target_pubkey` が既存のアクティブなバリデーターの BLS 鍵であれば、通常の consolidation です。\n- そうでなければ、その 48 バイトを**汎用リクエスト（generalized request）**として解釈します。\n\n| フィールド | サイズ | 意味 |\n| --- | --- | --- |\n| `MAGIC_PREFIX` | 3 バイト | `0xEF0A11` |\n| `CALL_TYPE` | 4 バイト | リトルエンディアンの `uint32`。実行するハンドラーを指定 |\n| `ARG_NUMBER` | 1 バイト | `uint8`。使用する引数の数 |\n| `ARG1`…`ARG5` | 5 × 8 バイト | リトルエンディアンの `uint64` の引数 |\n\n3 + 4 + 1 + 40 = 48 バイトで、公開鍵のサイズとちょうど一致します。新しい `CALL_TYPE` ごとにハンドラーが追加され、`process_consolidation_requests` から呼び出されます。\n\n## サンプルコード\n\nオフチェーンで汎用リクエストをパックする（TypeScript）:\n\n```ts\nfunction packGeneralized(callType: number, args: bigint[]): Uint8Array {\n  if (args.length \u003e 5) throw new Error(\"max 5 args\");\n  const out = new Uint8Array(48);\n  const view = new DataView(out.buffer);\n  out.set([0xef, 0x0a, 0x11], 0);          // MAGIC_PREFIX\n  view.setUint32(3, callType, true);       // CALL_TYPE, little-endian\n  view.setUint8(7, args.length);           // ARG_NUMBER\n  args.forEach((a, i) =\u003e view.setBigUint64(8 + i * 8, a, true));\n  return out;                              // use as target_pubkey\n}\n```\n\n結果は、通常の consolidation 呼び出しとまったく同じように、`target_pubkey` として consolidation リクエストコントラクトに渡されます。\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。call type は定義されておらず、予定されているものもありません。\n- 標準化するのは、CL がそのようなリクエストを*どう解釈することになるか*だけです。具体的な用途ごとに、ハンドラーを追加する CL のフォークが引き続き必要です。\n- EL 側は変更されないため、リクエストは引き続き consolidation コントラクトの手数料とキューのルールを通ります。\n- 引数は `uint64` 5 個までなので、より大きなペイロードは収まりません。\n"},"ko":{"lang":"ko","tldr":"기존 통합(consolidation) 요청 컨트랙트를 재사용해, 검증자가 아닌 target_pubkey 값에 구조화된 의미를 부여함으로써 범용 EL-CL 메시지 채널로 만든다. 그러면 CL이 EL 변경 없이 기능을 추가할 수 있다.","tags":["consensus","execution-requests","consolidation","validators","cross-layer"],"related":[7251,7685,7732],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8012/","markdown":"## 어떤 문제를 해결하나요?\n\nPectra 이후 실행 계층(EL)의 스마트 컨트랙트는 시스템 컨트랙트와 [EIP-7685](/eip-7685/) 요청을 통해 합의 계층(CL)의 검증자 작업을 일으킬 수 있습니다. 그중 하나가 [EIP-7251](/eip-7251/)의 **통합 요청(consolidation request)** 으로, `source_pubkey`와 `target_pubkey`(둘 다 48바이트)를 담습니다.\n\nEL이 일으키는 CL 작업 종류를 새로 추가할 때마다 보통은 새 시스템 컨트랙트, 새 요청 타입, Engine API 변경이 필요합니다. 즉 두 계층에서 함께 작업해야 합니다. EIP-8012는 통합 경로가 이미 임의의 값처럼 보이는 48바이트를 나르고 있으므로, EL을 전혀 건드리지 않고도 다른 메시지를 나를 수 있다고 지적합니다. 제안된 용도 중 하나는 기존 검증자가 [ePBS(EIP-7732)](/eip-7732/)의 빌더로 등록할 수 있게 하는 것입니다.\n\n## 어떻게 동작하나요?\n\nEL과 Engine API는 바뀌지 않습니다. CL에서 `ConsolidationRequest`가 도착하면:\n\n- `target_pubkey`가 기존 활성 검증자의 BLS 키이면 일반 통합입니다.\n- 그렇지 않으면 48바이트를 **일반화된 요청(generalized request)** 으로 해석합니다.\n\n| 필드 | 크기 | 의미 |\n| --- | --- | --- |\n| `MAGIC_PREFIX` | 3바이트 | `0xEF0A11` |\n| `CALL_TYPE` | 4바이트 | 리틀 엔디언 `uint32`, 실행할 핸들러 |\n| `ARG_NUMBER` | 1바이트 | `uint8`, 사용하는 인자 개수 |\n| `ARG1`…`ARG5` | 5 × 8바이트 | 리틀 엔디언 `uint64` 인자 |\n\n3 + 4 + 1 + 40 = 48바이트로, 공개 키 크기와 정확히 같습니다. 새로운 `CALL_TYPE`마다 핸들러가 생기며, `process_consolidation_requests`에서 호출됩니다.\n\n## 샘플 코드\n\n오프체인에서 일반화된 요청 만들기(TypeScript):\n\n```ts\nfunction packGeneralized(callType: number, args: bigint[]): Uint8Array {\n  if (args.length \u003e 5) throw new Error(\"max 5 args\");\n  const out = new Uint8Array(48);\n  const view = new DataView(out.buffer);\n  out.set([0xef, 0x0a, 0x11], 0);          // MAGIC_PREFIX\n  view.setUint32(3, callType, true);       // CALL_TYPE, little-endian\n  view.setUint8(7, args.length);           // ARG_NUMBER\n  args.forEach((a, i) =\u003e view.setBigUint64(8 + i * 8, a, true));\n  return out;                              // use as target_pubkey\n}\n```\n\n결과는 일반 통합 호출과 똑같이 `target_pubkey`로 통합 요청 컨트랙트에 전달됩니다.\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 정의된 call type은 없고 예정된 것도 없습니다.\n- CL이 이런 요청을 *어떻게 해석하게 될지*만 표준화합니다. 구체적인 용도마다 핸들러를 추가하는 CL 포크가 여전히 필요합니다.\n- EL 쪽은 바뀌지 않으므로 요청은 여전히 통합 컨트랙트의 수수료와 대기열 규칙을 따릅니다.\n- 인자는 `uint64` 다섯 개로 제한되므로 더 큰 페이로드는 들어가지 않습니다.\n"},"zh":{"lang":"zh","tldr":"复用现有的合并（consolidation）请求合约，为非验证者的 target_pubkey 值赋予结构化含义，使其成为通用的 EL 到 CL 消息通道，这样 CL 无需改动 EL 就能增加功能。","tags":["consensus","execution-requests","consolidation","validators","cross-layer"],"related":[7251,7685,7732],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8012/","markdown":"## 它解决什么问题？\n\n自 Pectra 起，执行层（EL）上的智能合约可以通过系统合约和 [EIP-7685](/eip-7685/) 请求触发共识层（CL）上的验证者操作。其中之一是 [EIP-7251](/eip-7251/) 的**合并请求（consolidation request）**，它携带 `source_pubkey` 和 `target_pubkey`（均为 48 字节）。\n\n每增加一种由 EL 触发的 CL 操作，通常都需要新的系统合约、新的请求类型和 Engine API 变更，也就是两层需要协同开发。EIP-8012 指出，合并通道本来就携带 48 个看似任意的字节，完全可以在不触碰 EL 的情况下承载其他消息。一个被建议的用途是：让现有验证者注册成为 [ePBS（EIP-7732）](/eip-7732/) 的 builder。\n\n## 它如何运作\n\nEL 和 Engine API 都不改动。在 CL 上，当 `ConsolidationRequest` 到达时：\n\n- 如果 `target_pubkey` 是某个现有活跃验证者的 BLS 公钥，则是普通合并。\n- 否则，这 48 个字节会被解析为**通用请求（generalized request）**：\n\n| 字段 | 大小 | 含义 |\n| --- | --- | --- |\n| `MAGIC_PREFIX` | 3 字节 | `0xEF0A11` |\n| `CALL_TYPE` | 4 字节 | 小端 `uint32`，指定运行哪个处理器 |\n| `ARG_NUMBER` | 1 字节 | `uint8`，使用了多少个参数 |\n| `ARG1`…`ARG5` | 5 × 8 字节 | 小端 `uint64` 参数 |\n\n3 + 4 + 1 + 40 = 48 字节，恰好是一个公钥的大小。每个新的 `CALL_TYPE` 对应一个处理器，由 `process_consolidation_requests` 调用。\n\n## 示例代码\n\n在链下打包通用请求（TypeScript）：\n\n```ts\nfunction packGeneralized(callType: number, args: bigint[]): Uint8Array {\n  if (args.length \u003e 5) throw new Error(\"max 5 args\");\n  const out = new Uint8Array(48);\n  const view = new DataView(out.buffer);\n  out.set([0xef, 0x0a, 0x11], 0);          // MAGIC_PREFIX\n  view.setUint32(3, callType, true);       // CALL_TYPE, little-endian\n  view.setUint8(7, args.length);           // ARG_NUMBER\n  args.forEach((a, i) =\u003e view.setBigUint64(8 + i * 8, a, true));\n  return out;                              // use as target_pubkey\n}\n```\n\n结果会作为 `target_pubkey` 传给合并请求合约，与普通的合并调用完全一样。\n\n## 需要注意\n\n- 状态为 **Stagnant**；没有定义任何 call type，也没有排期。\n- 它只是规范了 CL *将会*如何解释这类请求；每个具体用途仍需要一次 CL 分叉来添加处理器。\n- 由于 EL 一侧没有改动，请求仍然要遵守合并合约的费用和队列规则。\n- 参数最多只有五个 `uint64`，因此更丰富的载荷放不进去。\n"}}}
