{"eip":7542,"title":"eth/70 - available-blocks-extended protocol","description":"Adds more info in the handshake about available block range and adds message types to request block ranges and the send them","authors":["Ahmad Bitar (@smartprogrammer93) \u003csmartprogrammer@windowslive.com\u003e"],"status":"Withdrawn","type":"Standards Track","category":"Networking","created":"2023-10-21","requires":[7642],"discussionsTo":"https://ethereum-magicians.org/t/eip-eth-70-available-blocks-extended-protocol-handshake/16188","repo":"EIPs","label":"EIP-7542","officialUrl":"https://eips.ethereum.org/EIPS/eip-7542","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7542.md","url":"https://eips.huatuo.xyz/eip-7542/","tldr":{"en":"A withdrawn proposal for an eth/70 p2p protocol where nodes advertise which block range they can serve, so peers stop asking for history a node has pruned; the idea shipped instead in eth/69.","ja":"ノードが提供できるブロック範囲を通知し、ピアがプルーニング済みの履歴を要求しなくて済むようにする eth/70 p2p プロトコルの、取り下げられた提案。このアイデアは代わりに eth/69 で実現された。","ko":"노드가 제공할 수 있는 블록 범위를 알려, 피어가 이미 프루닝된 기록을 요청하지 않도록 하는 eth/70 p2p 프로토콜의 철회된 제안. 이 아이디어는 대신 eth/69로 구현되었다.","zh":"一项已撤回的 eth/70 p2p 协议提案：节点公布自己能提供的区块范围，使对等节点不再去请求某个节点已经修剪掉的历史数据；这一想法后来改在 eth/69 中实现。"},"tags":["networking","devp2p","history-expiry","sync","withdrawn"],"explainers":{"en":{"lang":"en","tldr":"A withdrawn proposal for an eth/70 p2p protocol where nodes advertise which block range they can serve, so peers stop asking for history a node has pruned; the idea shipped instead in eth/69.","tags":["networking","devp2p","history-expiry","sync","withdrawn"],"related":[7642,4444,7639,7975],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7542/","markdown":"## What problem does it solve?\n\nWith history expiry ([EIP-4444](/eip-4444/)), some nodes will keep serving old blocks while others prune them. Without any signal, a node looking for historical data has to connect to peers and request specific blocks just to discover whether they have them, wasting bandwidth and time. The same issue hits syncing: a peer that is itself still syncing may not have the blocks you need, and you only find out after an empty response.\n\nEIP-7542 proposed letting each node announce the range of blocks it can serve, so peers can choose whom to ask and whom to stay connected to.\n\n## How it works\n\nThe proposal defined a new `eth` protocol version, `eth/70`, running side by side with `eth/69` until widely adopted:\n\n- The `Status (0x00)` handshake gains a `blockRange` field right after `forkid`, where `blockRange` is `[startBlock, endBlock]`.\n- Two new messages:\n  - `RequestBlockRange (0x0b)`: ask a peer for its current range.\n  - `SendBlockRange (0x0c)`: reply with `[startBlock, endBlock]`.\n\nSince the range moves as a node syncs or prunes, peers can re-query it at any time.\n\nNodes were expected to keep connections regardless of a peer's range, except that a node with full peer slots and no peer holding the range it needs may disconnect one to look for a better peer. As a networking change, no hard fork was required.\n\n## Sample code\n\nMessage shapes as proposed (RLP-style notation):\n\n```\n# eth/69 Status (as referenced by the proposal)\n[version, networkid, blockhash, genesis, forkid]\n\n# eth/70 Status (proposed)\n[version, networkid, blockhash, genesis, forkid, [startBlock, endBlock]]\n\n# RequestBlockRange (0x0b)\n[]\n\n# SendBlockRange (0x0c)\n[startBlock: uint64, endBlock: uint64]\n```\n\nChoosing a peer for a historical request (pseudocode):\n\n```python\ndef pick_peer(peers, wanted_block):\n    candidates = [p for p in peers if p.start_block \u003c= wanted_block \u003c= p.end_block]\n    return random.choice(candidates) if candidates else None\n```\n\n## Things to know\n\n- Status is **Withdrawn**. Per [EIP-7642](/eip-7642/), it was withdrawn because no decision on history expiry had been reached at the time.\n- The idea lives on in [EIP-7642](/eip-7642/) (eth/69, Final), which adds `earliestBlock` / `latestBlock` to `Status` and a `BlockRangeUpdate (0x11)` message pushed when the range changes, instead of request/response.\n- The `eth/70` version number was later used by other proposals, such as [EIP-7639](/eip-7639/) and [EIP-7975](/eip-7975/), so do not assume \"eth/70\" means this design.\n- The spec stresses that advertising a block range is not a license to stop serving history before alternative storage for it exists.\n"},"ja":{"lang":"ja","tldr":"ノードが提供できるブロック範囲を通知し、ピアがプルーニング済みの履歴を要求しなくて済むようにする eth/70 p2p プロトコルの、取り下げられた提案。このアイデアは代わりに eth/69 で実現された。","tags":["networking","devp2p","history-expiry","sync","withdrawn"],"related":[7642,4444,7639,7975],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7542/","markdown":"## 何を解決するのか\n\n履歴の失効（[EIP-4444](/eip-4444/)）が導入されると、古いブロックを提供し続けるノードと、プルーニングするノードに分かれます。何のシグナルもなければ、過去のデータを探すノードは、ピアに接続して特定のブロックを要求し、持っているかどうかを確かめるしかなく、帯域と時間を無駄にします。同期でも同じ問題が起こります。自身がまだ同期中のピアは必要なブロックを持っていないかもしれず、空の応答が返ってきて初めてそれが分かります。\n\nEIP-7542 は、各ノードが提供できるブロックの範囲を通知できるようにし、ピアが誰に尋ね、誰との接続を維持するかを選べるようにすることを提案しました。\n\n## 仕組み\n\nこの提案は、新しい `eth` プロトコルバージョン `eth/70` を定義し、広く採用されるまで `eth/69` と並行して動かすものでした。\n\n- `Status (0x00)` ハンドシェイクに、`forkid` の直後に `blockRange` フィールドが加わります。`blockRange` は `[startBlock, endBlock]` です。\n- 2 つの新しいメッセージ:\n  - `RequestBlockRange (0x0b)`: ピアに現在の範囲を尋ねる。\n  - `SendBlockRange (0x0c)`: `[startBlock, endBlock]` で返信する。\n\n範囲はノードが同期したりプルーニングしたりするにつれて動くため、ピアはいつでも再問い合わせできます。\n\nノードは、ピアの範囲にかかわらず接続を維持することが期待されていました。ただし、ピアのスロットが埋まっていて、必要な範囲を持つピアがいないノードは、より良いピアを探すために 1 つ切断してもかまいません。ネットワーキングの変更なので、ハードフォークは不要でした。\n\n## サンプルコード\n\n提案されたメッセージの形（RLP 風の表記）:\n\n```\n# eth/69 Status (as referenced by the proposal)\n[version, networkid, blockhash, genesis, forkid]\n\n# eth/70 Status (proposed)\n[version, networkid, blockhash, genesis, forkid, [startBlock, endBlock]]\n\n# RequestBlockRange (0x0b)\n[]\n\n# SendBlockRange (0x0c)\n[startBlock: uint64, endBlock: uint64]\n```\n\n履歴の要求に対してピアを選ぶ（擬似コード）:\n\n```python\ndef pick_peer(peers, wanted_block):\n    candidates = [p for p in peers if p.start_block \u003c= wanted_block \u003c= p.end_block]\n    return random.choice(candidates) if candidates else None\n```\n\n## 知っておくべきこと\n\n- ステータスは **Withdrawn** です。[EIP-7642](/eip-7642/) によると、当時は履歴の失効について結論が出ていなかったため取り下げられました。\n- このアイデアは [EIP-7642](/eip-7642/)（eth/69、Final）に引き継がれています。こちらは `Status` に `earliestBlock` / `latestBlock` を加え、リクエスト / レスポンスではなく、範囲が変わったときにプッシュされる `BlockRangeUpdate (0x11)` メッセージを追加します。\n- `eth/70` というバージョン番号は、その後 [EIP-7639](/eip-7639/) や [EIP-7975](/eip-7975/) など他の提案でも使われているため、「eth/70」がこの設計を指すとは限りません。\n- 仕様は、ブロック範囲を通知することは、その代替ストレージが存在する前に履歴の提供をやめてよいという許可ではないと強調しています。\n"},"ko":{"lang":"ko","tldr":"노드가 제공할 수 있는 블록 범위를 알려, 피어가 이미 프루닝된 기록을 요청하지 않도록 하는 eth/70 p2p 프로토콜의 철회된 제안. 이 아이디어는 대신 eth/69로 구현되었다.","tags":["networking","devp2p","history-expiry","sync","withdrawn"],"related":[7642,4444,7639,7975],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7542/","markdown":"## 어떤 문제를 해결하나요?\n\n기록 만료([EIP-4444](/eip-4444/))가 도입되면 일부 노드는 오래된 블록을 계속 제공하고 다른 노드는 이를 프루닝합니다. 아무 신호가 없으면 과거 데이터를 찾는 노드는 피어에 연결해 특정 블록을 요청해 보고서야 그 피어가 해당 블록을 갖고 있는지 알 수 있어 대역폭과 시간을 낭비합니다. 동기화에서도 같은 문제가 생깁니다. 자신도 아직 동기화 중인 피어는 필요한 블록이 없을 수 있고, 빈 응답을 받은 뒤에야 그 사실을 알게 됩니다.\n\nEIP-7542는 각 노드가 제공할 수 있는 블록 범위를 알리게 해, 피어가 누구에게 물어보고 누구와 연결을 유지할지 선택할 수 있게 하자고 제안했습니다.\n\n## 어떻게 동작하나요?\n\n이 제안은 새로운 `eth` 프로토콜 버전 `eth/70`을 정의하고, 널리 도입될 때까지 `eth/69`와 나란히 운영하도록 했습니다.\n\n- `Status (0x00)` 핸드셰이크에서 `forkid` 바로 뒤에 `blockRange` 필드가 추가됩니다. `blockRange`는 `[startBlock, endBlock]`입니다.\n- 두 개의 새 메시지:\n  - `RequestBlockRange (0x0b)`: 피어에게 현재 범위를 묻는다.\n  - `SendBlockRange (0x0c)`: `[startBlock, endBlock]`으로 응답한다.\n\n범위는 노드가 동기화하거나 프루닝하면서 달라지므로 피어는 언제든 다시 조회할 수 있습니다.\n\n노드는 피어의 범위와 관계없이 연결을 유지하는 것이 기대되었습니다. 다만 피어 슬롯이 가득 찼고 필요한 범위를 가진 피어가 없는 노드는 더 나은 피어를 찾기 위해 하나를 끊을 수 있습니다. 네트워킹 변경이므로 하드포크는 필요하지 않았습니다.\n\n## 샘플 코드\n\n제안된 메시지 형태(RLP 스타일 표기):\n\n```\n# eth/69 Status (as referenced by the proposal)\n[version, networkid, blockhash, genesis, forkid]\n\n# eth/70 Status (proposed)\n[version, networkid, blockhash, genesis, forkid, [startBlock, endBlock]]\n\n# RequestBlockRange (0x0b)\n[]\n\n# SendBlockRange (0x0c)\n[startBlock: uint64, endBlock: uint64]\n```\n\n과거 데이터 요청을 위한 피어 선택(의사 코드):\n\n```python\ndef pick_peer(peers, wanted_block):\n    candidates = [p for p in peers if p.start_block \u003c= wanted_block \u003c= p.end_block]\n    return random.choice(candidates) if candidates else None\n```\n\n## 알아둘 점\n\n- 상태는 **Withdrawn**입니다. [EIP-7642](/eip-7642/)에 따르면 당시에는 기록 만료에 대한 결정이 내려지지 않아 철회되었습니다.\n- 이 아이디어는 [EIP-7642](/eip-7642/)(eth/69, Final)에 이어지며, 여기서는 `Status`에 `earliestBlock` / `latestBlock`을 추가하고, 요청/응답 대신 범위가 바뀔 때 푸시되는 `BlockRangeUpdate (0x11)` 메시지를 추가합니다.\n- `eth/70`이라는 버전 번호는 이후 [EIP-7639](/eip-7639/), [EIP-7975](/eip-7975/) 같은 다른 제안에서도 쓰였으므로, \"eth/70\"이 이 설계를 뜻한다고 단정하지 마세요.\n- 명세는 블록 범위를 알린다고 해서 그 기록의 대체 저장소가 생기기 전에 기록 제공을 멈춰도 된다는 허가가 되는 것은 아니라고 강조합니다.\n"},"zh":{"lang":"zh","tldr":"一项已撤回的 eth/70 p2p 协议提案：节点公布自己能提供的区块范围，使对等节点不再去请求某个节点已经修剪掉的历史数据；这一想法后来改在 eth/69 中实现。","tags":["networking","devp2p","history-expiry","sync","withdrawn"],"related":[7642,4444,7639,7975],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7542/","markdown":"## 它解决什么问题？\n\n随着历史过期（[EIP-4444](/eip-4444/)）的实施，一些节点会继续提供旧区块，另一些则会将其修剪。如果没有任何信号，需要历史数据的节点只能先连接对等节点、请求具体区块，才知道对方有没有，既浪费带宽，也浪费时间。同步时也会遇到同样的问题：一个自己仍在同步的对等节点，可能没有你需要的区块，而你只有在收到空响应后才会知道。\n\nEIP-7542 提议让每个节点公布自己能提供的区块范围，使对等节点可以选择向谁请求、与谁保持连接。\n\n## 它如何运作\n\n该提案定义了新的 `eth` 协议版本 `eth/70`，在被广泛采用之前与 `eth/69` 并行运行：\n\n- `Status (0x00)` 握手在 `forkid` 之后新增一个 `blockRange` 字段，其中 `blockRange` 为 `[startBlock, endBlock]`。\n- 两条新消息：\n  - `RequestBlockRange (0x0b)`：向对等节点询问其当前范围。\n  - `SendBlockRange (0x0c)`：以 `[startBlock, endBlock]` 作答。\n\n由于范围会随着节点同步或修剪而变动，对等节点可以随时重新查询。\n\n节点应当不论对方范围如何都保持连接；唯一的例外是，如果某个节点的对等节点名额已满，且没有任何对等节点持有它需要的范围，它可以断开一个连接，去寻找更合适的对等节点。由于这属于网络层变更，不需要硬分叉。\n\n## 示例代码\n\n提案中的消息格式（RLP 风格表示）：\n\n```\n# eth/69 Status (as referenced by the proposal)\n[version, networkid, blockhash, genesis, forkid]\n\n# eth/70 Status (proposed)\n[version, networkid, blockhash, genesis, forkid, [startBlock, endBlock]]\n\n# RequestBlockRange (0x0b)\n[]\n\n# SendBlockRange (0x0c)\n[startBlock: uint64, endBlock: uint64]\n```\n\n为历史数据请求选择对等节点（伪代码）：\n\n```python\ndef pick_peer(peers, wanted_block):\n    candidates = [p for p in peers if p.start_block \u003c= wanted_block \u003c= p.end_block]\n    return random.choice(candidates) if candidates else None\n```\n\n## 需要注意\n\n- 状态为 **Withdrawn**。根据 [EIP-7642](/eip-7642/)，它被撤回是因为当时尚未就历史过期做出决定。\n- 这一想法延续在 [EIP-7642](/eip-7642/)（eth/69，Final）中：它在 `Status` 中加入 `earliestBlock` / `latestBlock`，并增加了 `BlockRangeUpdate (0x11)` 消息，在范围变化时主动推送，而不是请求/响应的方式。\n- `eth/70` 这个版本号后来被其他提案使用，例如 [EIP-7639](/eip-7639/) 和 [EIP-7975](/eip-7975/)，所以不要默认\"eth/70\"指的就是这个设计。\n- 规范强调，公布区块范围并不是在其替代存储方案出现之前就可以停止提供历史数据的许可。\n"}}}
