{"eip":2976,"title":"Typed Transactions over Gossip","description":"Adds support for transmission of typed transactions over devp2p.","authors":["Micah Zoltu (@MicahZoltu)"],"status":"Final","type":"Standards Track","category":"Networking","created":"2020-09-13","requires":[2718],"discussionsTo":"https://ethereum-magicians.org/t/eip-2976-eth-typed-transactions-over-gossip/4610","repo":"EIPs","label":"EIP-2976","officialUrl":"https://eips.ethereum.org/EIPS/eip-2976","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2976.md","url":"https://eips.huatuo.xyz/eip-2976/","tldr":{"en":"Defines how typed transactions and receipts (EIP-2718) are carried over the devp2p eth protocol, so new transaction types can be gossiped without a protocol version bump.","ja":"型付きトランザクションとレシート（EIP-2718）を devp2p の eth プロトコル上でどう運ぶかを定義し、プロトコルバージョンを上げなくても新しいトランザクションタイプをゴシップできるようにする。","ko":"타입이 있는 트랜잭션과 영수증(EIP-2718)을 devp2p의 eth 프로토콜로 어떻게 전달할지 정의해, 프로토콜 버전을 올리지 않고도 새 트랜잭션 유형을 가십(gossip)할 수 있게 한다.","zh":"定义类型化交易和收据（EIP-2718）如何通过 devp2p 的 eth 协议传输，使新的交易类型无需提升协议版本即可被广播。"},"tags":["networking","devp2p","transactions","typed-transactions"],"explainers":{"en":{"lang":"en","tldr":"Defines how typed transactions and receipts (EIP-2718) are carried over the devp2p eth protocol, so new transaction types can be gossiped without a protocol version bump.","tags":["networking","devp2p","transactions","typed-transactions"],"related":[2718,2930,1559,5793],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2976/","markdown":"## What problem does it solve?\n\n[EIP-2718](/eip-2718/) introduced the typed transaction envelope: a transaction can be `TransactionType || TransactionPayload` instead of a plain RLP list. That changed how blocks commit to transactions and receipts, but by itself it said nothing about the peer-to-peer network. If nodes cannot pass typed transactions to each other, nobody can get one into a block.\n\nEIP-2976 updates the `eth` devp2p wire protocol so typed transactions and receipts can travel between peers. It does so once, generically, so that later types (access lists, 1559 fee transactions, blobs…) do not each require a new protocol version.\n\n## How it works\n\n- Wherever the protocol carried a transaction, it now carries either a **legacy transaction** (RLP list `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`) or a **typed transaction** (opaque bytes `type || payload`, type `0x00`–`0x7f`).\n- Receipts follow the same pattern: legacy RLP list, or `type || receiptPayload`.\n- Affected messages: `Transactions`, `BlockBodies`, `NewBlock`, `NewPooledTransactionIds`, `GetPooledTransactions`, `PooledTransactions`, and `Receipts`.\n- Transaction identifiers are `keccak256` of the typed bytes, or of the RLP for legacy transactions.\n- The protocol layer does **not** understand payloads. Each new type's EIP defines its payload; the wire format stays the same.\n\nPeer rules:\n\n- Unknown `TransactionType` or a payload invalid for its type: the receiver **should** disconnect the sender.\n- Nodes **must not** send a new type before its activation fork, and **may** disconnect peers that do so well before the fork.\n\nThe changes apply retroactively to all `eth` protocol versions rather than introducing a new one.\n\n## Sample code\n\nTelling legacy and typed transactions apart on the wire (TypeScript):\n\n```ts\nimport { decodeRlp, getBytes, keccak256 } from \"ethers\";\n\nfunction classify(raw: string) {\n  const bytes = getBytes(raw);\n  const first = bytes[0];\n  if (first \u003e= 0xc0) {\n    // RLP list prefix: legacy transaction\n    return { kind: \"legacy\", fields: decodeRlp(raw), hash: keccak256(bytes) };\n  }\n  if (first \u003c= 0x7f) {\n    // EIP-2718 envelope: type byte + opaque payload\n    return { kind: \"typed\", type: first, hash: keccak256(bytes) };\n  }\n  throw new Error(\"invalid transaction encoding\");\n}\n```\n\nMessage shapes (pseudo-RLP):\n\n```\nTransactions (0x02):        [tx_0, tx_1, ...]            ; tx = legacy list | typed bytes\nBlockBodies  (0x06):        [[txList, uncleList], ...]\nReceipts     (0x10):        [[receipt_0, receipt_1, ...], ...]\n```\n\n## Things to know\n\n- **Status: Final.** Every transaction type in use today, including [EIP-2930](/eip-2930/) access-list and [EIP-1559](/eip-1559/) fee-market transactions, travels the network under these rules.\n- Disconnecting on unknown types protects against spam disguised as \"maybe a future type\". The spec advises relaxing this only for trusted peers.\n- Later protocol versions built on this. For example, eth/68 ([EIP-5793](/eip-5793/)) adds the transaction type to transaction announcements.\n- Legacy transactions remain fully supported.\n"},"ja":{"lang":"ja","tldr":"型付きトランザクションとレシート（EIP-2718）を devp2p の eth プロトコル上でどう運ぶかを定義し、プロトコルバージョンを上げなくても新しいトランザクションタイプをゴシップできるようにする。","tags":["networking","devp2p","transactions","typed-transactions"],"related":[2718,2930,1559,5793],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2976/","markdown":"## 何を解決するのか\n\n[EIP-2718](/eip-2718/) は、型付きトランザクションのエンベロープを導入しました。トランザクションを単純な RLP リストではなく `TransactionType || TransactionPayload` にできます。これはブロックがトランザクションとレシートにコミットする方法を変えましたが、それだけではピアツーピアネットワークについては何も述べていませんでした。ノード同士が型付きトランザクションを受け渡せなければ、誰もそれをブロックに入れられません。\n\nEIP-2976 は `eth` の devp2p ワイヤープロトコルを更新し、型付きトランザクションとレシートをピア間で運べるようにします。これを汎用的に一度だけ行うことで、後のタイプ（アクセスリスト、1559 のフィー・トランザクション、blob など）がそれぞれ新しいプロトコルバージョンを必要としないようにしています。\n\n## 仕組み\n\n- プロトコルがトランザクションを運んでいた箇所では、**レガシートランザクション**（RLP リスト `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`）か、**型付きトランザクション**（不透明なバイト列 `type || payload`、タイプは `0x00`〜`0x7f`）のいずれかを運びます。\n- レシートも同じパターンです。レガシーの RLP リスト、または `type || receiptPayload` です。\n- 影響を受けるメッセージ: `Transactions`、`BlockBodies`、`NewBlock`、`NewPooledTransactionIds`、`GetPooledTransactions`、`PooledTransactions`、`Receipts`。\n- トランザクション識別子は、型付きバイト列の `keccak256`、レガシートランザクションでは RLP の `keccak256` です。\n- プロトコル層はペイロードを**理解しません**。各新タイプの EIP がそのペイロードを定義し、ワイヤーフォーマットは変わりません。\n\nピアのルール:\n\n- 未知の `TransactionType`、またはそのタイプに対して無効なペイロード: 受信側は送信者との接続を切る**べきです**（should）。\n- ノードは、有効化フォークの前に新しいタイプを送って**はなりません**（must not）。また、フォークのかなり前にそうしたピアとの接続を切って**もよい**（may）です。\n\nこの変更は、新しいバージョンを導入するのではなく、すべての `eth` プロトコルバージョンに遡って適用されます。\n\n## サンプルコード\n\nワイヤー上でレガシーと型付きのトランザクションを見分ける（TypeScript）:\n\n```ts\nimport { decodeRlp, getBytes, keccak256 } from \"ethers\";\n\nfunction classify(raw: string) {\n  const bytes = getBytes(raw);\n  const first = bytes[0];\n  if (first \u003e= 0xc0) {\n    // RLP list prefix: legacy transaction\n    return { kind: \"legacy\", fields: decodeRlp(raw), hash: keccak256(bytes) };\n  }\n  if (first \u003c= 0x7f) {\n    // EIP-2718 envelope: type byte + opaque payload\n    return { kind: \"typed\", type: first, hash: keccak256(bytes) };\n  }\n  throw new Error(\"invalid transaction encoding\");\n}\n```\n\nメッセージの形（擬似 RLP）:\n\n```\nTransactions (0x02):        [tx_0, tx_1, ...]            ; tx = legacy list | typed bytes\nBlockBodies  (0x06):        [[txList, uncleList], ...]\nReceipts     (0x10):        [[receipt_0, receipt_1, ...], ...]\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。** [EIP-2930](/eip-2930/) のアクセスリストや [EIP-1559](/eip-1559/) のフィーマーケット・トランザクションを含め、現在使われているすべてのトランザクションタイプは、このルールのもとでネットワークを流れています。\n- 未知のタイプで接続を切るのは、「将来のタイプかもしれない」を装ったスパムから守るためです。仕様は、これを緩めるのは信頼できるピアに限るよう助言しています。\n- 後のプロトコルバージョンはこれを土台にしています。たとえば eth/68（[EIP-5793](/eip-5793/)）は、トランザクションのアナウンスにトランザクションタイプを追加します。\n- レガシートランザクションも引き続き完全にサポートされます。\n"},"ko":{"lang":"ko","tldr":"타입이 있는 트랜잭션과 영수증(EIP-2718)을 devp2p의 eth 프로토콜로 어떻게 전달할지 정의해, 프로토콜 버전을 올리지 않고도 새 트랜잭션 유형을 가십(gossip)할 수 있게 한다.","tags":["networking","devp2p","transactions","typed-transactions"],"related":[2718,2930,1559,5793],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2976/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-2718](/eip-2718/)은 타입이 있는 트랜잭션 봉투를 도입했습니다. 트랜잭션이 단순한 RLP 리스트 대신 `TransactionType || TransactionPayload`가 될 수 있습니다. 이는 블록이 트랜잭션과 영수증을 커밋하는 방식을 바꿨지만, 그것만으로는 피어 투 피어 네트워크에 대해 아무 말도 하지 않았습니다. 노드끼리 타입이 있는 트랜잭션을 주고받을 수 없다면 아무도 그것을 블록에 넣을 수 없습니다.\n\nEIP-2976은 `eth` devp2p 와이어 프로토콜을 업데이트해 타입이 있는 트랜잭션과 영수증이 피어 사이를 오갈 수 있게 합니다. 이를 범용적으로 한 번만 처리하므로, 이후의 유형(접근 목록, 1559 수수료 트랜잭션, blob 등)이 각각 새 프로토콜 버전을 요구하지 않습니다.\n\n## 어떻게 동작하나요?\n\n- 프로토콜이 트랜잭션을 실어 나르던 곳에서는 이제 **레거시 트랜잭션**(RLP 리스트 `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`) 또는 **타입이 있는 트랜잭션**(불투명한 바이트 `type || payload`, 유형은 `0x00`~`0x7f`) 중 하나를 실어 나릅니다.\n- 영수증도 같은 패턴을 따릅니다. 레거시 RLP 리스트 또는 `type || receiptPayload`입니다.\n- 영향을 받는 메시지: `Transactions`, `BlockBodies`, `NewBlock`, `NewPooledTransactionIds`, `GetPooledTransactions`, `PooledTransactions`, `Receipts`.\n- 트랜잭션 식별자는 타입이 있는 바이트의 `keccak256`이며, 레거시 트랜잭션은 RLP의 `keccak256`입니다.\n- 프로토콜 계층은 페이로드를 **이해하지 않습니다**. 각 새 유형의 EIP가 자기 페이로드를 정의하며, 와이어 형식은 그대로입니다.\n\n피어 규칙:\n\n- 알 수 없는 `TransactionType`이거나 그 유형에 유효하지 않은 페이로드: 수신자는 발신자와의 연결을 끊어야 합니다(**should**).\n- 노드는 활성화 포크 전에 새 유형을 보내서는 안 되며(**must not**), 포크보다 훨씬 이전에 그렇게 하는 피어와의 연결을 끊어도 됩니다(**may**).\n\n이 변경은 새 버전을 도입하는 대신 모든 `eth` 프로토콜 버전에 소급 적용됩니다.\n\n## 샘플 코드\n\n와이어에서 레거시 트랜잭션과 타입이 있는 트랜잭션을 구분하기(TypeScript):\n\n```ts\nimport { decodeRlp, getBytes, keccak256 } from \"ethers\";\n\nfunction classify(raw: string) {\n  const bytes = getBytes(raw);\n  const first = bytes[0];\n  if (first \u003e= 0xc0) {\n    // RLP list prefix: legacy transaction\n    return { kind: \"legacy\", fields: decodeRlp(raw), hash: keccak256(bytes) };\n  }\n  if (first \u003c= 0x7f) {\n    // EIP-2718 envelope: type byte + opaque payload\n    return { kind: \"typed\", type: first, hash: keccak256(bytes) };\n  }\n  throw new Error(\"invalid transaction encoding\");\n}\n```\n\n메시지 형태(의사 RLP):\n\n```\nTransactions (0x02):        [tx_0, tx_1, ...]            ; tx = legacy list | typed bytes\nBlockBodies  (0x06):        [[txList, uncleList], ...]\nReceipts     (0x10):        [[receipt_0, receipt_1, ...], ...]\n```\n\n## 알아둘 점\n\n- **상태: Final.** [EIP-2930](/eip-2930/) 접근 목록과 [EIP-1559](/eip-1559/) 수수료 시장 트랜잭션을 포함해 오늘날 쓰이는 모든 트랜잭션 유형이 이 규칙에 따라 네트워크를 오갑니다.\n- 알 수 없는 유형에서 연결을 끊는 것은 \"미래의 유형일지도 모른다\"로 위장한 스팸을 막아 줍니다. 사양은 이를 완화하는 것을 신뢰하는 피어에게만 하라고 조언합니다.\n- 이후의 프로토콜 버전이 이를 토대로 만들어졌습니다. 예를 들어 eth/68([EIP-5793](/eip-5793/))은 트랜잭션 공지에 트랜잭션 유형을 추가합니다.\n- 레거시 트랜잭션도 계속 완전히 지원됩니다.\n"},"zh":{"lang":"zh","tldr":"定义类型化交易和收据（EIP-2718）如何通过 devp2p 的 eth 协议传输，使新的交易类型无需提升协议版本即可被广播。","tags":["networking","devp2p","transactions","typed-transactions"],"related":[2718,2930,1559,5793],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2976/","markdown":"## 它解决什么问题？\n\n[EIP-2718](/eip-2718/) 引入了类型化交易信封：一笔交易可以是 `TransactionType || TransactionPayload`，而不是普通的 RLP 列表。这改变了区块对交易和收据的承诺方式，但它本身对点对点网络只字未提。如果节点之间无法互相传递类型化交易，就没有人能把它们放进区块。\n\nEIP-2976 更新了 `eth` devp2p 线路协议，使类型化交易和收据可以在对等节点之间传输。它以通用的方式一次性完成这件事，这样后续的类型（访问列表、1559 费用交易、blob 等）就不必每次都需要新的协议版本。\n\n## 它如何运作\n\n- 凡是协议原来承载交易的地方，现在承载的要么是**旧式交易**（RLP 列表 `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]`），要么是**类型化交易**（不透明字节 `type || payload`，类型为 `0x00`–`0x7f`）。\n- 收据遵循同样的模式：旧式 RLP 列表，或 `type || receiptPayload`。\n- 受影响的消息：`Transactions`、`BlockBodies`、`NewBlock`、`NewPooledTransactionIds`、`GetPooledTransactions`、`PooledTransactions` 和 `Receipts`。\n- 交易标识符是类型化字节的 `keccak256`，对旧式交易则是其 RLP 的 `keccak256`。\n- 协议层**并不理解**负载。每个新类型的 EIP 定义自己的负载；线路格式保持不变。\n\n对等节点规则：\n\n- 未知的 `TransactionType`，或对其类型无效的负载：接收方**应该**断开与发送方的连接。\n- 节点**不得**在新类型的激活分叉之前发送它，并且**可以**在分叉之前很早就断开这样做的对等节点。\n\n这些改动追溯适用于所有 `eth` 协议版本，而不是引入新版本。\n\n## 示例代码\n\n在线路上区分旧式交易与类型化交易（TypeScript）：\n\n```ts\nimport { decodeRlp, getBytes, keccak256 } from \"ethers\";\n\nfunction classify(raw: string) {\n  const bytes = getBytes(raw);\n  const first = bytes[0];\n  if (first \u003e= 0xc0) {\n    // RLP list prefix: legacy transaction\n    return { kind: \"legacy\", fields: decodeRlp(raw), hash: keccak256(bytes) };\n  }\n  if (first \u003c= 0x7f) {\n    // EIP-2718 envelope: type byte + opaque payload\n    return { kind: \"typed\", type: first, hash: keccak256(bytes) };\n  }\n  throw new Error(\"invalid transaction encoding\");\n}\n```\n\n消息结构（伪 RLP）：\n\n```\nTransactions (0x02):        [tx_0, tx_1, ...]            ; tx = legacy list | typed bytes\nBlockBodies  (0x06):        [[txList, uncleList], ...]\nReceipts     (0x10):        [[receipt_0, receipt_1, ...], ...]\n```\n\n## 需要注意\n\n- **状态：Final。** 如今使用的每一种交易类型，包括 [EIP-2930](/eip-2930/) 访问列表交易和 [EIP-1559](/eip-1559/) 费用市场交易，都按这些规则在网络上传输。\n- 遇到未知类型就断开连接，可以防范伪装成\"也许是未来类型\"的垃圾信息。规范建议只对可信的对等节点放宽这一点。\n- 后来的协议版本建立在此基础之上。例如，eth/68（[EIP-5793](/eip-5793/)）在交易公告中加入了交易类型。\n- 旧式交易仍然完全受支持。\n"}}}
