{"eip":8202,"title":"Scheme-Agile Transactions","description":"A new EIP-2718 transaction type with a common EIP-1559 fee header, scheme-agile sender authorization, and flat typed extensions","authors":["Giulio Rebuffo (@Giulio2002)","Ben Adams (@benaadams)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2026-03-22","requires":[2,155,1559,2718,2780,4844,7702,7976],"discussionsTo":"https://ethereum-magicians.org/t/eip-8202-schemed-transaction/28044","repo":"EIPs","label":"EIP-8202","officialUrl":"https://eips.ethereum.org/EIPS/eip-8202","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8202.md","url":"https://eips.huatuo.xyz/eip-8202/","tldr":{"en":"Proposes one new transaction type with an EIP-1559 fee header, pluggable signature schemes and flat add-on extensions (blobs, set-code), so new features stop requiring a new transaction type each time, and introduces a quantum-safe one-time-key scheme.","ja":"EIP-1559 の手数料ヘッダー、差し替え可能な署名方式、フラットな追加拡張（blob、set-code）を備えた新しいトランザクションタイプを 1 つ提案し、新機能のたびに新しいトランザクションタイプが必要になる状況を終わらせるとともに、耐量子の使い捨て鍵方式を導入する。","ko":"EIP-1559 수수료 헤더, 교체 가능한 서명 방식, 평평한 추가 확장(blob, set-code)을 갖춘 새 트랜잭션 타입 하나를 제안해 새 기능마다 새 트랜잭션 타입이 필요하던 상황을 끝내고, 양자 내성 일회용 키 방식을 도입한다.","zh":"提出一种新的交易类型，带有 EIP-1559 费用头、可插拔的签名方案以及扁平的附加扩展（blob、set-code），使新功能不必每次都要求新的交易类型，并引入一种抗量子的一次性密钥方案。"},"tags":["transactions","signatures","post-quantum","account-abstraction","core"],"explainers":{"en":{"lang":"en","tldr":"Proposes one new transaction type with an EIP-1559 fee header, pluggable signature schemes and flat add-on extensions (blobs, set-code), so new features stop requiring a new transaction type each time, and introduces a quantum-safe one-time-key scheme.","tags":["transactions","signatures","post-quantum","account-abstraction","core"],"related":[2718,1559,4844,7702,8141],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8202/","markdown":"## What problem does it solve?\n\nEach new transaction feature in Ethereum has so far meant a new top-level [EIP-2718](/eip-2718/) type: access lists (type 1), [EIP-1559](/eip-1559/) fees (type 2), blobs (type 3, [EIP-4844](/eip-4844/)), set-code (type 4, [EIP-7702](/eip-7702/)). They are almost the same body with a few fields appended, and they don't combine: someone wanting a new signature scheme *and* blobs *and* set-code would need yet another type.\n\nAt the same time, Ethereum needs a way to move EOAs off secp256k1 ECDSA before quantum computers can break it, without wrapping execution in a new abstraction.\n\nEIP-8202 defines a single `SchemedTransaction` (type `0x05`) whose features compose as independent pieces.\n\n## How it works\n\nThe envelope is a fixed 1559-style base plus two typed lists:\n\n```text\n0x05 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas,\n             gas_limit, to, value, data, authorizations, extensions])\n```\n\n- **`authorizations`**: entries `[role_id, scheme_id, witness]`. Exactly one `SENDER` role is required (a `PAYER` role is reserved). Schemes defined so far:\n  - `0x00` secp256k1: same signature and **same address** as today, no extra gas.\n  - `0x01` ephemeral secp256k1: the user commits to 2^20 one-time keys in a Keccak Merkle tree; the address is `keccak256(0x01 || merkle_root)[12:]`. The transaction at nonce `i` must be signed by key `i` with a Merkle proof. A revealed key becomes useless once the nonce advances, so security rests on Keccak preimage resistance. Surcharge: 5,000 gas.\n- **`extensions`**: entries `[extension_id, payload]`, unique by id. `0x01` carries blob fields (`max_fee_per_blob_gas`, `blob_versioned_hashes`) with EIP-4844 rules; `0x02` carries EIP-7702-style set-code authorizations, each with its own `(scheme_id, witness)`.\n\nUnknown roles, schemes or extensions make the transaction invalid. There is no access list in the base (block-level access lists cover that). Intrinsic gas follows [EIP-2780](/eip-2780/) and the [EIP-7976](/eip-7976/) calldata floor. The sender signs everything except the witnesses.\n\n## Sample code\n\nBuilding the sender signing hash (pseudocode from the spec, simplified):\n\n```python\nSCHEMED_TX_TYPE = 0x05\nROLE_SENDER, SCHEME_SECP256K1, EXT_BLOB = 0x00, 0x00, 0x01\n\ndef sender_signing_hash(tx):\n    return keccak256(bytes([SCHEMED_TX_TYPE]) + rlp.encode([\n        tx.chain_id, tx.nonce, tx.max_priority_fee_per_gas, tx.max_fee_per_gas,\n        tx.gas_limit, tx.to, tx.value, tx.data,\n        [[ROLE_SENDER, tx.authorizations[0].scheme_id]],   # witness omitted\n        tx.extensions,\n    ]))\n\n# A blob-carrying transaction signed with an ordinary key:\ntx.extensions = [[EXT_BLOB, rlp.encode([max_fee_per_blob_gas, versioned_hashes])]]\ny, r, s = ecdsa_sign(sk, sender_signing_hash(tx))\ntx.authorizations = [[ROLE_SENDER, SCHEME_SECP256K1, rlp.encode([y, r, s])]]\n```\n\n## Things to know\n\n- **Status: Draft.** The type byte, scheme ids and gas numbers may change; wallets and libraries do not support it yet.\n- Contracts see the sender via `msg.sender` / `tx.origin` regardless of scheme. Moving to the ephemeral scheme gives you a **new address**, so funds must be migrated.\n- An ephemeral key is still exposed while its transaction sits in the mempool; the spec notes this window for an attacker fast enough to break ECDSA within a block.\n- The design is deliberately flat: one execution payload, no nested transactions. A frame-style extension like [EIP-8141](/eip-8141/) could be added later as an extension.\n"},"ja":{"lang":"ja","tldr":"EIP-1559 の手数料ヘッダー、差し替え可能な署名方式、フラットな追加拡張（blob、set-code）を備えた新しいトランザクションタイプを 1 つ提案し、新機能のたびに新しいトランザクションタイプが必要になる状況を終わらせるとともに、耐量子の使い捨て鍵方式を導入する。","tags":["transactions","signatures","post-quantum","account-abstraction","core"],"related":[2718,1559,4844,7702,8141],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8202/","markdown":"## 何を解決するのか\n\nEthereum では、新しいトランザクション機能のたびに、新しい最上位の [EIP-2718](/eip-2718/) タイプが必要になってきました。アクセスリスト（type 1）、[EIP-1559](/eip-1559/) 手数料（type 2）、blob（type 3、[EIP-4844](/eip-4844/)）、set-code（type 4、[EIP-7702](/eip-7702/)）です。これらはほぼ同じ本体にいくつかのフィールドを追加したものであり、組み合わせることができません。新しい署名方式*と* blob *と* set-code を同時に使いたい人には、さらに別のタイプが必要になります。\n\n同時に Ethereum は、量子コンピューターが secp256k1 ECDSA を破る前に、実行を新たな抽象化で包むことなく、EOA をそこから移行させる方法を必要としています。\n\nEIP-8202 は、機能が独立した部品として組み合わさる単一の `SchemedTransaction`（type `0x05`）を定義します。\n\n## 仕組み\n\nエンベロープは、固定の 1559 スタイルのベースと、2 つの型付きリストで構成されます。\n\n```text\n0x05 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas,\n             gas_limit, to, value, data, authorizations, extensions])\n```\n\n- **`authorizations`**: `[role_id, scheme_id, witness]` というエントリ。`SENDER` ロールがちょうど 1 つ必須です（`PAYER` ロールは予約されています）。これまでに定義されたスキーム:\n  - `0x00` secp256k1: 現在と同じ署名、**同じアドレス**で、追加の gas はなし。\n  - `0x01` ephemeral secp256k1: ユーザーは Keccak の Merkle ツリーで 2^20 個の使い捨て鍵にコミットします。アドレスは `keccak256(0x01 || merkle_root)[12:]` です。nonce `i` のトランザクションは、Merkle 証明とともに鍵 `i` で署名されなければなりません。公開された鍵は nonce が進むと役に立たなくなるため、セキュリティは Keccak の原像計算困難性に依存します。追加料金: 5,000 gas。\n- **`extensions`**: `[extension_id, payload]` というエントリで、id ごとに一意です。`0x01` は blob のフィールド（`max_fee_per_blob_gas`、`blob_versioned_hashes`）を EIP-4844 のルールで運び、`0x02` は EIP-7702 スタイルの set-code 認可を運びます。それぞれが独自の `(scheme_id, witness)` を持ちます。\n\n未知のロール、スキーム、拡張があるトランザクションは無効です。ベースにはアクセスリストがありません（ブロックレベルのアクセスリストがそれをカバーします）。イントリンシック gas は [EIP-2780](/eip-2780/) と [EIP-7976](/eip-7976/) の calldata フロアに従います。送信者はウィットネス以外のすべてに署名します。\n\n## サンプルコード\n\n送信者の署名ハッシュを作る（仕様の擬似コードを簡略化）:\n\n```python\nSCHEMED_TX_TYPE = 0x05\nROLE_SENDER, SCHEME_SECP256K1, EXT_BLOB = 0x00, 0x00, 0x01\n\ndef sender_signing_hash(tx):\n    return keccak256(bytes([SCHEMED_TX_TYPE]) + rlp.encode([\n        tx.chain_id, tx.nonce, tx.max_priority_fee_per_gas, tx.max_fee_per_gas,\n        tx.gas_limit, tx.to, tx.value, tx.data,\n        [[ROLE_SENDER, tx.authorizations[0].scheme_id]],   # witness omitted\n        tx.extensions,\n    ]))\n\n# A blob-carrying transaction signed with an ordinary key:\ntx.extensions = [[EXT_BLOB, rlp.encode([max_fee_per_blob_gas, versioned_hashes])]]\ny, r, s = ecdsa_sign(sk, sender_signing_hash(tx))\ntx.authorizations = [[ROLE_SENDER, SCHEME_SECP256K1, rlp.encode([y, r, s])]]\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** タイプバイト、スキーム ID、gas の数値は変わる可能性があります。ウォレットやライブラリはまだ対応していません。\n- コントラクトは、スキームに関係なく `msg.sender` / `tx.origin` で送信者を見ます。ephemeral スキームに移行すると**新しいアドレス**になるため、資金を移す必要があります。\n- 使い捨て鍵は、そのトランザクションが mempool にある間は依然として露出します。仕様は、1 ブロック以内に ECDSA を破れるほど高速な攻撃者に対するこの時間窓について述べています。\n- 設計は意図的にフラットです。実行ペイロードは 1 つで、ネストされたトランザクションはありません。[EIP-8141](/eip-8141/) のようなフレーム型の拡張は、後から拡張として追加できます。\n"},"ko":{"lang":"ko","tldr":"EIP-1559 수수료 헤더, 교체 가능한 서명 방식, 평평한 추가 확장(blob, set-code)을 갖춘 새 트랜잭션 타입 하나를 제안해 새 기능마다 새 트랜잭션 타입이 필요하던 상황을 끝내고, 양자 내성 일회용 키 방식을 도입한다.","tags":["transactions","signatures","post-quantum","account-abstraction","core"],"related":[2718,1559,4844,7702,8141],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8202/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움에서 새로운 트랜잭션 기능은 지금까지 매번 새로운 최상위 [EIP-2718](/eip-2718/) 타입을 의미했습니다. 액세스 리스트(type 1), [EIP-1559](/eip-1559/) 수수료(type 2), blob(type 3, [EIP-4844](/eip-4844/)), set-code(type 4, [EIP-7702](/eip-7702/))입니다. 이들은 거의 같은 본문에 몇 개의 필드를 덧붙인 것이며 서로 결합되지 않습니다. 새 서명 방식*과* blob *과* set-code를 함께 원하는 사람은 또 다른 타입이 필요합니다.\n\n동시에 이더리움은 양자 컴퓨터가 secp256k1 ECDSA를 깨기 전에, 실행을 새로운 추상화로 감싸지 않고도 EOA를 그것에서 벗어나게 할 방법이 필요합니다.\n\nEIP-8202는 기능이 독립된 조각으로 결합되는 단일 `SchemedTransaction`(type `0x05`)을 정의합니다.\n\n## 어떻게 동작하나요?\n\n엔벨로프는 고정된 1559 스타일 기본부와 두 개의 타입 지정 리스트로 구성됩니다.\n\n```text\n0x05 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas,\n             gas_limit, to, value, data, authorizations, extensions])\n```\n\n- **`authorizations`**: `[role_id, scheme_id, witness]` 항목. `SENDER` 역할이 정확히 하나 필요합니다(`PAYER` 역할은 예약됨). 지금까지 정의된 스킴:\n  - `0x00` secp256k1: 지금과 같은 서명과 **같은 주소**, 추가 gas 없음.\n  - `0x01` ephemeral secp256k1: 사용자는 Keccak Merkle 트리에 2^20개의 일회용 키를 커밋합니다. 주소는 `keccak256(0x01 || merkle_root)[12:]`입니다. nonce `i`의 트랜잭션은 Merkle 증명과 함께 키 `i`로 서명되어야 합니다. 공개된 키는 nonce가 올라가면 쓸모가 없어지므로, 보안은 Keccak의 역상 저항성에 기댑니다. 추가 비용: 5,000 gas.\n- **`extensions`**: `[extension_id, payload]` 항목이며 id별로 고유합니다. `0x01`은 EIP-4844 규칙에 따라 blob 필드(`max_fee_per_blob_gas`, `blob_versioned_hashes`)를 담고, `0x02`는 EIP-7702 스타일의 set-code 인가를 담으며 각각 자체 `(scheme_id, witness)`를 가집니다.\n\n알 수 없는 역할, 스킴, 확장이 있으면 트랜잭션은 무효입니다. 기본부에는 액세스 리스트가 없습니다(블록 수준 액세스 리스트가 이를 담당합니다). intrinsic gas는 [EIP-2780](/eip-2780/)과 [EIP-7976](/eip-7976/)의 calldata 하한을 따릅니다. 발신자는 witness를 제외한 모든 것에 서명합니다.\n\n## 샘플 코드\n\n발신자 서명 해시 만들기(명세의 의사 코드를 단순화):\n\n```python\nSCHEMED_TX_TYPE = 0x05\nROLE_SENDER, SCHEME_SECP256K1, EXT_BLOB = 0x00, 0x00, 0x01\n\ndef sender_signing_hash(tx):\n    return keccak256(bytes([SCHEMED_TX_TYPE]) + rlp.encode([\n        tx.chain_id, tx.nonce, tx.max_priority_fee_per_gas, tx.max_fee_per_gas,\n        tx.gas_limit, tx.to, tx.value, tx.data,\n        [[ROLE_SENDER, tx.authorizations[0].scheme_id]],   # witness omitted\n        tx.extensions,\n    ]))\n\n# A blob-carrying transaction signed with an ordinary key:\ntx.extensions = [[EXT_BLOB, rlp.encode([max_fee_per_blob_gas, versioned_hashes])]]\ny, r, s = ecdsa_sign(sk, sender_signing_hash(tx))\ntx.authorizations = [[ROLE_SENDER, SCHEME_SECP256K1, rlp.encode([y, r, s])]]\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 타입 바이트, 스킴 id, gas 수치는 바뀔 수 있으며 지갑과 라이브러리는 아직 지원하지 않습니다.\n- 컨트랙트는 스킴과 상관없이 `msg.sender` / `tx.origin`으로 발신자를 봅니다. ephemeral 스킴으로 옮기면 **새 주소**가 생기므로 자금을 이전해야 합니다.\n- 일회용 키는 해당 트랜잭션이 멤풀에 있는 동안에는 여전히 노출됩니다. 명세는 한 블록 안에 ECDSA를 깰 만큼 빠른 공격자에 대해 이 시간 창을 언급합니다.\n- 설계는 의도적으로 평평합니다. 실행 페이로드는 하나이고 중첩된 트랜잭션은 없습니다. [EIP-8141](/eip-8141/) 같은 프레임 방식 확장은 나중에 확장으로 추가할 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"提出一种新的交易类型，带有 EIP-1559 费用头、可插拔的签名方案以及扁平的附加扩展（blob、set-code），使新功能不必每次都要求新的交易类型，并引入一种抗量子的一次性密钥方案。","tags":["transactions","signatures","post-quantum","account-abstraction","core"],"related":[2718,1559,4844,7702,8141],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8202/","markdown":"## 它解决什么问题？\n\n以太坊中每增加一个新的交易功能，迄今都意味着一个新的顶层 [EIP-2718](/eip-2718/) 类型：访问列表（type 1）、[EIP-1559](/eip-1559/) 费用（type 2）、blob（type 3，[EIP-4844](/eip-4844/)）、set-code（type 4，[EIP-7702](/eip-7702/)）。它们几乎是相同的主体，只是附加了几个字段，而且无法组合：想要新的签名方案*并且*带 blob *并且*带 set-code 的人，还需要再来一种类型。\n\n与此同时，以太坊需要一种办法，在量子计算机能够破解 secp256k1 ECDSA 之前，让 EOA 脱离它，而又不必用新的抽象来包装执行。\n\nEIP-8202 定义了单一的 `SchemedTransaction`（type `0x05`），其功能以相互独立的部件方式组合。\n\n## 它如何运作\n\n封装由固定的 1559 风格基础部分加上两个带类型的列表组成：\n\n```text\n0x05 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas,\n             gas_limit, to, value, data, authorizations, extensions])\n```\n\n- **`authorizations`**：条目为 `[role_id, scheme_id, witness]`。必须恰好有一个 `SENDER` 角色（`PAYER` 角色为保留）。目前已定义的方案：\n  - `0x00` secp256k1：与现在相同的签名和**相同的地址**，没有额外 gas。\n  - `0x01` ephemeral secp256k1：用户在一棵 Keccak Merkle 树中承诺 2^20 个一次性密钥；地址为 `keccak256(0x01 || merkle_root)[12:]`。nonce 为 `i` 的交易必须由密钥 `i` 签名并附带 Merkle 证明。一旦 nonce 前进，已暴露的密钥就失去用处，因此安全性依赖于 Keccak 的原像抗性。附加费用：5,000 gas。\n- **`extensions`**：条目为 `[extension_id, payload]`，按 id 唯一。`0x01` 携带 blob 字段（`max_fee_per_blob_gas`、`blob_versioned_hashes`），遵循 EIP-4844 的规则；`0x02` 携带 EIP-7702 风格的 set-code 授权，每个授权都有自己的 `(scheme_id, witness)`。\n\n未知的角色、方案或扩展会使交易无效。基础部分中没有访问列表（区块级访问列表已涵盖这一点）。固有 gas 遵循 [EIP-2780](/eip-2780/) 以及 [EIP-7976](/eip-7976/) 的 calldata 下限。发送者对除 witness 之外的所有内容签名。\n\n## 示例代码\n\n构造发送者的签名哈希（来自规范的伪代码，已简化）：\n\n```python\nSCHEMED_TX_TYPE = 0x05\nROLE_SENDER, SCHEME_SECP256K1, EXT_BLOB = 0x00, 0x00, 0x01\n\ndef sender_signing_hash(tx):\n    return keccak256(bytes([SCHEMED_TX_TYPE]) + rlp.encode([\n        tx.chain_id, tx.nonce, tx.max_priority_fee_per_gas, tx.max_fee_per_gas,\n        tx.gas_limit, tx.to, tx.value, tx.data,\n        [[ROLE_SENDER, tx.authorizations[0].scheme_id]],   # witness omitted\n        tx.extensions,\n    ]))\n\n# A blob-carrying transaction signed with an ordinary key:\ntx.extensions = [[EXT_BLOB, rlp.encode([max_fee_per_blob_gas, versioned_hashes])]]\ny, r, s = ecdsa_sign(sk, sender_signing_hash(tx))\ntx.authorizations = [[ROLE_SENDER, SCHEME_SECP256K1, rlp.encode([y, r, s])]]\n```\n\n## 需要注意\n\n- **状态：Draft。** 类型字节、方案 id 和 gas 数值可能变化；钱包和库目前尚不支持。\n- 无论采用哪种方案，合约都通过 `msg.sender` / `tx.origin` 看到发送者。迁移到 ephemeral 方案会得到一个**新地址**，因此资金必须迁移。\n- 一个临时密钥在其交易停留在内存池期间仍然是暴露的；规范指出了这一窗口，针对的是快到能在一个区块内破解 ECDSA 的攻击者。\n- 设计有意保持扁平：一个执行载荷，没有嵌套交易。像 [EIP-8141](/eip-8141/) 这样的帧式扩展，以后可以作为一个扩展加入。\n"}}}
