{"eip":5793,"title":"eth/68 - Add tx type to tx announcement","description":"Adds the transaction type and transaction size to tx announcement messages in the wire protocol","authors":["Marius van der Wijden (@MariusVanDerWijden)"],"status":"Final","type":"Standards Track","category":"Networking","created":"2022-10-18","requires":[2464,2481,4938],"discussionsTo":"https://ethereum-magicians.org/t/eip-5793-eth-68-add-transaction-type-to-tx-announcement/11364","repo":"EIPs","label":"EIP-5793","officialUrl":"https://eips.ethereum.org/EIPS/eip-5793","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-5793.md","url":"https://eips.huatuo.xyz/eip-5793/","tldr":{"en":"The eth/68 wire protocol version: transaction announcements now carry each transaction's type and size, so nodes can decide what to fetch before downloading large blob transactions.","ja":"eth/68 ワイヤープロトコルのバージョン。トランザクションのアナウンスに各トランザクションのタイプとサイズが含まれるようになり、ノードは大きな blob トランザクションをダウンロードする前に、何を取得するかを判断できる。","ko":"eth/68 와이어 프로토콜 버전. 트랜잭션 공지에 각 트랜잭션의 타입과 크기가 포함되어, 노드가 큰 blob 트랜잭션을 내려받기 전에 무엇을 가져올지 결정할 수 있다.","zh":"eth/68 网络协议版本：交易公告现在携带每笔交易的类型和大小，使节点可以在下载庞大的 blob 交易之前决定要获取什么。"},"tags":["networking","devp2p","mempool","eth68","blobs"],"explainers":{"en":{"lang":"en","tldr":"The eth/68 wire protocol version: transaction announcements now carry each transaction's type and size, so nodes can decide what to fetch before downloading large blob transactions.","tags":["networking","devp2p","mempool","eth68","blobs"],"related":[2464,4938,2718,4844,7642],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-5793/","markdown":"## What problem does it solve?\n\nEthereum nodes gossip pending transactions to each other. Since [eth/65](/eip-2464/), a node can announce just the hashes of transactions it has (`NewPooledTransactionHashes`), and peers request the full bodies they are missing.\n\nWith [EIP-4844](/eip-4844/) came blob transactions, which are far larger than ordinary ones. If a node only sees a hash, it cannot tell a 100-byte transfer from a blob-carrying transaction until it has already downloaded it. That makes bandwidth hard to control and opens room for amplification attacks.\n\nEIP-5793 adds just enough metadata to the announcement for a node to make that decision up front.\n\n## How it works\n\nIt defines protocol version **eth/68** and changes one message, `NewPooledTransactionHashes (0x08)`:\n\n```text\neth/67: [hash_0: B_32, hash_1: B_32, ...]\neth/68: [types: B, [size_0: P, size_1: P, ...], [hash_0: B_32, hash_1: B_32, ...]]\n```\n\n- `types` is a byte string where byte *i* is the [EIP-2718](/eip-2718/) type of transaction *i* (e.g. `0x02` for EIP-1559, `0x03` for blob).\n- `size_i` is the encoded size of transaction *i*.\n- The hash list is unchanged.\n\nNote that `types` is packed as a single byte array rather than an RLP list. Early implementations did it that way and it was kept to avoid extra work.\n\nWith this information a node can, for example, never accept blob transactions by push, fetch them only on demand, throttle peers that announce oversized transactions, or skip types it does not support.\n\n## Sample code\n\nRLP shape of an eth/68 announcement for three transactions (pseudocode):\n\n```python\nimport rlp\n\ntypes  = bytes([0x02, 0x03, 0x00])           # EIP-1559, blob, legacy\nsizes  = [180, 131_590, 110]                  # encoded sizes in bytes\nhashes = [h0, h1, h2]                         # 32-byte transaction hashes\n\nmsg = rlp.encode([types, sizes, hashes])      # payload of message 0x08\n\n# Receiver side\ntypes, sizes, hashes = rlp.decode(msg)\nwant = [h for t, s, h in zip(types, sizes, hashes)\n        if t != 0x03 or wants_blobs()]        # decide what to request\nsend_get_pooled_transactions(want)\n```\n\n## Things to know\n\n- **Status: Final.** It is a networking change only: no hard fork and no consensus change. Nodes negotiate the protocol version, so eth/67 and eth/68 peers could coexist during rollout.\n- Receivers should check that the transactions they eventually fetch match the announced type and size; a mismatch is a sign of a misbehaving peer.\n- A later version, [eth/69](/eip-7642/), builds on eth/68 with changes around history expiry and receipts.\n"},"ja":{"lang":"ja","tldr":"eth/68 ワイヤープロトコルのバージョン。トランザクションのアナウンスに各トランザクションのタイプとサイズが含まれるようになり、ノードは大きな blob トランザクションをダウンロードする前に、何を取得するかを判断できる。","tags":["networking","devp2p","mempool","eth68","blobs"],"related":[2464,4938,2718,4844,7642],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-5793/","markdown":"## 何を解決するのか\n\nEthereum のノードは、保留中のトランザクションを互いにゴシップします。[eth/65](/eip-2464/) 以降、ノードは自分が持つトランザクションのハッシュだけをアナウンスでき（`NewPooledTransactionHashes`）、ピアは足りない本体を要求します。\n\n[EIP-4844](/eip-4844/) で、通常のものよりはるかに大きい blob トランザクションが登場しました。ノードがハッシュしか見ていなければ、100 バイトの送金と blob を運ぶトランザクションを、すでにダウンロードしてしまうまで区別できません。そのため帯域の制御が難しくなり、増幅攻撃の余地が生まれます。\n\nEIP-5793 は、ノードが事前にその判断を下せるだけのメタデータをアナウンスに追加します。\n\n## 仕組み\n\nプロトコルバージョン **eth/68** を定義し、メッセージ `NewPooledTransactionHashes (0x08)` を 1 つ変更します。\n\n```text\neth/67: [hash_0: B_32, hash_1: B_32, ...]\neth/68: [types: B, [size_0: P, size_1: P, ...], [hash_0: B_32, hash_1: B_32, ...]]\n```\n\n- `types` はバイト列で、バイト *i* がトランザクション *i* の [EIP-2718](/eip-2718/) タイプです（たとえば EIP-1559 なら `0x02`、blob なら `0x03`）。\n- `size_i` はトランザクション *i* のエンコード後のサイズです。\n- ハッシュのリストは変わりません。\n\n`types` は RLP リストではなく、単一のバイト配列としてパックされる点に注意してください。初期の実装がそうしており、余計な作業を避けるためにそのまま残されました。\n\nこの情報があれば、ノードはたとえば、blob トランザクションをプッシュでは決して受け入れず、必要なときだけ取得する、巨大なトランザクションをアナウンスするピアを制限する、サポートしていないタイプをスキップする、といったことができます。\n\n## サンプルコード\n\n3 つのトランザクションに対する eth/68 アナウンスの RLP 形式（疑似コード）:\n\n```python\nimport rlp\n\ntypes  = bytes([0x02, 0x03, 0x00])           # EIP-1559, blob, legacy\nsizes  = [180, 131_590, 110]                  # encoded sizes in bytes\nhashes = [h0, h1, h2]                         # 32-byte transaction hashes\n\nmsg = rlp.encode([types, sizes, hashes])      # payload of message 0x08\n\n# Receiver side\ntypes, sizes, hashes = rlp.decode(msg)\nwant = [h for t, s, h in zip(types, sizes, hashes)\n        if t != 0x03 or wants_blobs()]        # decide what to request\nsend_get_pooled_transactions(want)\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。** ネットワークの変更だけで、ハードフォークもコンセンサスの変更もありません。ノードはプロトコルバージョンをネゴシエートするため、展開中は eth/67 と eth/68 のピアが共存できました。\n- 受信側は、最終的に取得したトランザクションがアナウンスされたタイプとサイズに一致することを確認すべきです。不一致は、ピアが不正に動作している兆候です。\n- 後のバージョンである [eth/69](/eip-7642/) は、履歴の期限切れやレシートに関する変更で eth/68 を土台にしています。\n"},"ko":{"lang":"ko","tldr":"eth/68 와이어 프로토콜 버전. 트랜잭션 공지에 각 트랜잭션의 타입과 크기가 포함되어, 노드가 큰 blob 트랜잭션을 내려받기 전에 무엇을 가져올지 결정할 수 있다.","tags":["networking","devp2p","mempool","eth68","blobs"],"related":[2464,4938,2718,4844,7642],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-5793/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움 노드는 대기 중인 트랜잭션을 서로 가십합니다. [eth/65](/eip-2464/) 이후 노드는 자신이 가진 트랜잭션의 해시만 공지할 수 있고(`NewPooledTransactionHashes`), 피어는 자신에게 없는 전체 본문을 요청합니다.\n\n[EIP-4844](/eip-4844/)와 함께 일반 트랜잭션보다 훨씬 큰 blob 트랜잭션이 등장했습니다. 노드가 해시만 본다면, 이미 내려받기 전에는 100바이트짜리 송금과 blob을 실은 트랜잭션을 구별할 수 없습니다. 그래서 대역폭을 통제하기 어렵고 증폭 공격의 여지가 생깁니다.\n\nEIP-5793은 노드가 미리 그 결정을 내릴 수 있을 만큼의 메타데이터를 공지에 추가합니다.\n\n## 어떻게 동작하나요?\n\n프로토콜 버전 **eth/68**을 정의하고 메시지 `NewPooledTransactionHashes (0x08)` 하나를 변경합니다.\n\n```text\neth/67: [hash_0: B_32, hash_1: B_32, ...]\neth/68: [types: B, [size_0: P, size_1: P, ...], [hash_0: B_32, hash_1: B_32, ...]]\n```\n\n- `types`는 바이트 문자열이며, *i*번째 바이트는 트랜잭션 *i*의 [EIP-2718](/eip-2718/) 타입입니다(예: EIP-1559는 `0x02`, blob은 `0x03`).\n- `size_i`는 트랜잭션 *i*의 인코딩된 크기입니다.\n- 해시 목록은 바뀌지 않습니다.\n\n`types`는 RLP 리스트가 아니라 하나의 바이트 배열로 패킹된다는 점에 유의하세요. 초기 구현이 그렇게 했고 추가 작업을 피하려고 그대로 유지되었습니다.\n\n이 정보를 이용하면 노드는 예를 들어 blob 트랜잭션을 푸시로는 절대 받지 않고 필요할 때만 가져오거나, 지나치게 큰 트랜잭션을 공지하는 피어를 제한하거나, 지원하지 않는 타입을 건너뛸 수 있습니다.\n\n## 샘플 코드\n\n트랜잭션 세 개에 대한 eth/68 공지의 RLP 구조(의사 코드):\n\n```python\nimport rlp\n\ntypes  = bytes([0x02, 0x03, 0x00])           # EIP-1559, blob, legacy\nsizes  = [180, 131_590, 110]                  # encoded sizes in bytes\nhashes = [h0, h1, h2]                         # 32-byte transaction hashes\n\nmsg = rlp.encode([types, sizes, hashes])      # payload of message 0x08\n\n# Receiver side\ntypes, sizes, hashes = rlp.decode(msg)\nwant = [h for t, s, h in zip(types, sizes, hashes)\n        if t != 0x03 or wants_blobs()]        # decide what to request\nsend_get_pooled_transactions(want)\n```\n\n## 알아둘 점\n\n- **상태: Final.** 네트워크 변경일 뿐이며 하드포크도 합의 변경도 없습니다. 노드는 프로토콜 버전을 협상하므로, 배포 중에는 eth/67과 eth/68 피어가 공존할 수 있었습니다.\n- 수신자는 최종적으로 가져온 트랜잭션이 공지된 타입 및 크기와 일치하는지 확인해야 합니다. 불일치는 피어가 오동작한다는 신호입니다.\n- 이후 버전인 [eth/69](/eip-7642/)는 히스토리 만료와 영수증에 관한 변경으로 eth/68을 기반으로 합니다.\n"},"zh":{"lang":"zh","tldr":"eth/68 网络协议版本：交易公告现在携带每笔交易的类型和大小，使节点可以在下载庞大的 blob 交易之前决定要获取什么。","tags":["networking","devp2p","mempool","eth68","blobs"],"related":[2464,4938,2718,4844,7642],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-5793/","markdown":"## 它解决什么问题？\n\n以太坊节点会相互传播待处理的交易。自 [eth/65](/eip-2464/) 起，节点可以只公告自己拥有的交易的哈希（`NewPooledTransactionHashes`），对等节点再请求自己缺少的完整交易体。\n\n随着 [EIP-4844](/eip-4844/) 出现了 blob 交易，它们比普通交易大得多。如果节点只看到一个哈希，那么在下载完成之前，它无法区分一笔 100 字节的转账和一笔携带 blob 的交易。这使带宽难以控制，也为放大攻击留出了空间。\n\nEIP-5793 在公告中增加了刚好足够的元数据，让节点可以提前做出这一决定。\n\n## 它如何运作\n\n它定义了协议版本 **eth/68**，并修改了一条消息 `NewPooledTransactionHashes (0x08)`：\n\n```text\neth/67: [hash_0: B_32, hash_1: B_32, ...]\neth/68: [types: B, [size_0: P, size_1: P, ...], [hash_0: B_32, hash_1: B_32, ...]]\n```\n\n- `types` 是一个字节串，其中第 *i* 个字节是交易 *i* 的 [EIP-2718](/eip-2718/) 类型（例如 EIP-1559 为 `0x02`，blob 为 `0x03`）。\n- `size_i` 是交易 *i* 编码后的大小。\n- 哈希列表保持不变。\n\n请注意，`types` 被打包成单个字节数组，而不是 RLP 列表。早期实现就是这样做的，为避免额外工作而保留了下来。\n\n有了这些信息，节点可以做到例如：永远不接受推送的 blob 交易，只在需要时才获取；限制公告超大交易的对等节点；或者跳过自己不支持的类型。\n\n## 示例代码\n\n三笔交易的 eth/68 公告的 RLP 结构（伪代码）：\n\n```python\nimport rlp\n\ntypes  = bytes([0x02, 0x03, 0x00])           # EIP-1559, blob, legacy\nsizes  = [180, 131_590, 110]                  # encoded sizes in bytes\nhashes = [h0, h1, h2]                         # 32-byte transaction hashes\n\nmsg = rlp.encode([types, sizes, hashes])      # payload of message 0x08\n\n# Receiver side\ntypes, sizes, hashes = rlp.decode(msg)\nwant = [h for t, s, h in zip(types, sizes, hashes)\n        if t != 0x03 or wants_blobs()]        # decide what to request\nsend_get_pooled_transactions(want)\n```\n\n## 需要注意\n\n- **状态：Final。** 它只是网络层的变更：没有硬分叉，也没有共识变更。节点会协商协议版本，因此在推广期间 eth/67 和 eth/68 的对等节点可以共存。\n- 接收方应检查最终获取的交易是否与公告的类型和大小一致；不一致说明对等节点行为异常。\n- 后来的版本 [eth/69](/eip-7642/) 在 eth/68 的基础上，围绕历史过期和收据做了改动。\n"}},"requiredBy":[7642]}
