---
eip: 7642
label: EIP-7642
title: eth/69 - history expiry and simpler receipts
status: Final
type: Standards Track
category: Networking
created: 2024-02-29
requires: 5793
official: https://eips.ethereum.org/EIPS/eip-7642
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7642.md
canonical: https://eips.huatuo.xyz/ko/eip-7642/
lang: ko
tldr: 이더리움 eth P2P 프로토콜의 버전 69. 피어가 자신이 아직 제공하는 블록 범위를 알린다(머지 이전 히스토리를 버리게 되면 필요). 핸드셰이크에서 쓸모없어진 total difficulty가 빠지고, 영수증은 256바이트 bloom 필터 없이 전송된다.
tags: [networking, p2p, devp2p, history-expiry, receipts]
---

# EIP-7642: eth/69 - history expiry and simpler receipts

> Adds history serving window and removes bloom filter in receipt

**TL;DR:** 이더리움 eth P2P 프로토콜의 버전 69. 피어가 자신이 아직 제공하는 블록 범위를 알린다(머지 이전 히스토리를 버리게 되면 필요). 핸드셰이크에서 쓸모없어진 total difficulty가 빠지고, 영수증은 256바이트 bloom 필터 없이 전송된다.

## 어떤 문제를 해결하나요?

`eth` 와이어 프로토콜에는 비용이 크거나 오해를 부르는 세 가지 잔재가 있었습니다.

1. **히스토리 만료(history expiry).** history expiry 워킹 그룹은 클라이언트가 머지 이전 블록 히스토리를 버려도 된다고 결정했습니다(2025년 5월 1일부터). 그러면 p2p로 히스토리를 동기화하는 노드는 *어떤 피어가 아직 그것을 가지고 있는지* 알아야 합니다. 그렇지 않으면 물어보고 실패해 보는 수밖에 없습니다. 이전의 비슷한 제안인 [EIP-7542](/eip-7542/)는 history expiry가 합의되기 전에 철회되었습니다.
2. **Total difficulty.** `Status` 핸드셰이크는 `td`를 실어 보냈는데, 머지 이후로는 의미가 없습니다(머지 이후 블록의 difficulty는 0).
3. **영수증 bloom.** 어떤 클라이언트도 영수증 bloom 필터를 저장하지 않습니다. 로그에서 다시 계산할 수 있기 때문입니다. 그런데도 프로토콜은 제공하는 노드가 이를 다시 생성해 전송하게 했습니다. 명세는 이로 인해 풀 싱크당 약 530 GB가 추가된다고 추정합니다(snappy 압축 후 약 95 GiB).

## 어떻게 동작하나요?

`eth/69`는 세 가지 메시지를 바꿉니다.

**Status (0x00)**: `td`를 빼고 제공 범위를 추가합니다.

```text
eth/68: [version, networkid, td, blockhash, genesis, forkid]
eth/69: [version, networkid, genesis, forkid, earliestBlock, latestBlock, latestBlockHash]
```

**Receipts (0x10)**: 평평한 목록이며 bloom이 없고, 타입이 있는 영수증을 위한 특별한 래핑도 없습니다.

```text
eth/68: legacy = [status, cumulative-gas, bloom, logs]; typed = tx-type || rlp(legacy)
eth/69: receipt = [tx-type, post-state-or-status, cumulative-gas, logs]
```

수신 측은 블록의 영수증 루트를 확인하기 위해 로그에서 각 bloom을 다시 계산하며, 이는 비용이 적게 듭니다.

**BlockRangeUpdate (0x11)**, 신규: `[earliestBlock, latestBlock, latestBlockHash]`. 제공 범위가 바뀔 때 전송되지만, 트래픽을 낮게 유지하기 위해 대략 에포크(32블록)당 한 번을 넘지 않습니다.

## 샘플 코드

eth/69 영수증에서 합의 영수증(bloom 포함) 재구성하기. TypeScript 의사 코드:

```ts
import { encodeRlp, concat, toBeHex } from "ethers";

type Log = [address: string, topics: string[], data: string];
type Eth69Receipt = [txType: number, status: string, cumulativeGas: string, logs: Log[]];

function toConsensusEncoding([txType, status, gas, logs]: Eth69Receipt): string {
  const bloom = logsBloom(logs);                     // 256-byte bloom over addresses + topics
  const body = encodeRlp([status, gas, bloom, logs]);
  return txType === 0 ? body : concat([toBeHex(txType, 1), body]);  // typed: type || rlp(...)
}
```

`logsBloom`은 표준 이더리움 로그 bloom입니다(2048비트 필터에서 주소와 토픽마다 3비트를 설정).

## 알아둘 점

- 상태는 **Final**입니다. 네트워킹만 바뀌는 것으로, 하드 포크도 합의 변경도 없습니다. 클라이언트는 지원하는 피어와 `eth/69`를 협상하고, 더 오래된 피어와는 계속 `eth/68`로 통신할 수 있습니다.
- 이는 공지에 트랜잭션 타입을 추가한 `eth/68`([EIP-5793](/eip-5793/))을 기반으로 합니다.
- `earliestBlock`은 앞으로의 롤링 히스토리 윈도우([EIP-4444](/eip-4444/))에도 대비하며, 크롤러가 전체 히스토리를 아직 제공하는 노드가 몇 개인지 측정할 수 있게 합니다.
- 다음 프로토콜 버전은 별도로 작업 중입니다. [EIP-7975](/eip-7975/)는 부분 블록 영수증 목록을 갖춘 `eth/70`을 제안합니다(작성 시점에 Last Call).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7642
