---
eip: 7807
label: EIP-7807
title: SSZ execution blocks
status: Draft
type: Standards Track
category: Core
created: 2024-10-28
requires: 7495, 7773, 7916
official: https://eips.ethereum.org/EIPS/eip-7807
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7807.md
canonical: https://eips.huatuo.xyz/ko/eip-7807/
lang: ko
tldr: 실행 블록을 RLP 대신 SSZ로 다시 인코딩하자고 제안한다. 블록 해시는 합의 계층과 공유하는 SSZ hash_tree_root가 되고, 블록의 개별 필드를 증명할 수 있게 된다.
tags: [ssz, block, serialization, core, consensus]
---

# EIP-7807: SSZ execution blocks

> Migration of execution blocks to SSZ

**TL;DR:** 실행 블록을 RLP 대신 SSZ로 다시 인코딩하자고 제안한다. 블록 해시는 합의 계층과 공유하는 SSZ hash_tree_root가 되고, 블록의 개별 필드를 증명할 수 있게 된다.

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

이더리움에는 두 개의 직렬화 세계가 있습니다. 합의 계층은 SSZ(Simple Serialize)와 Merkle `hash_tree_root` 커밋먼트를 사용합니다. 실행 계층은 블록 헤더를 RLP로 인코딩해 keccak256으로 해시하고, 트랜잭션, 영수증, 인출은 Merkle-Patricia 트라이로 커밋합니다. 두 계층 사이의 모든 상호작용에서는 이 둘 사이를 번역해야 합니다.

EIP-7807은 실행 블록을 SSZ로 옮깁니다. 스펙은 네 가지 이점을 듭니다.

1. 합의 계층이 실행 클라이언트에 묻지 않고도 실행 블록 해시를 스스로 계산하고 확인할 수 있다.
2. Engine API를 JSON에서 바이너리 SSZ로 바꿀 수 있으며, 스펙은 메시지 크기가 대략 절반으로 줄 것으로 추정한다.
3. 블록의 개별 필드를 작은 Merkle 증명으로 증명할 수 있고, 블록이 진화해도 증명은 계속 유효하다.
4. PoW 시절의 잔재와 logs bloom을 없앨 수 있다.

## 어떻게 동작하나요?

- 새로운 SSZ `ExecutionPayload`가 RLP 헤더와 본문을 대체합니다. 이는 `ProgressiveContainer`([EIP-7495](/eip-7495/))이며 `parent_hash`, `miner`, `state_root`, `transactions`, `receipts_root`, `number`, `gas_limits`, `gas_used`, `timestamp`, `base_fees_per_gas`, `withdrawals`, `excess_gas`, `requests_hash`, `block_access_list`, `slot_number` 같은 필드를 가집니다.
- 일반 가스와 blob 가스는 별도의 헤더 필드 대신 하나의 `GasAmounts` 구조로 묶입니다(수수료도 `BlobFeesPerGas`로 묶입니다).
- 리스트는 `ProgressiveList`([EIP-7916](/eip-7916/))를 사용하므로 하드코딩된 크기 제한이 없고 Merkle 상의 위치도 안정적으로 유지됩니다.
- 바뀌지 **않는** 것: 각 트랜잭션과 영수증은 [EIP-2718](/eip-2718/) 타입 봉투 바이트를 유지합니다. 인출과 블록 접근 목록은 RLP를 유지합니다. 상태 트라이는 건드리지 않습니다.
- **블록 해시**는 `BLOCKHASH`, JSON-RPC `blockHash`, devp2p, 합의 계층의 참조 등 모든 곳에서 `ExecutionPayload.hash_tree_root()`가 됩니다.
- 헤더는 큰 리스트를 각자의 루트로 대체한, 페이로드의 SSZ 요약일 뿐입니다.
- JSON-RPC 블록은 `logsBloom`을 모두 `0xff` 바이트로 보고하여, 더는 존재하지 않는 bloom을 믿지 말고 영수증을 확인하도록 소비자에게 강제합니다.

## 샘플 코드

스펙의 핵심 컨테이너를 consensus-specs의 Python 스타일로 나타낸 것입니다.

```python
class GasAmounts(ProgressiveContainer(active_fields=[1] * 2)):
    regular: GasAmount   # uint64
    blob: GasAmount

class ExecutionPayload(ProgressiveContainer(active_fields=[1] * 18)):
    parent_hash: Root
    miner: ExecutionAddress
    state_root: Bytes32
    transactions: ProgressiveList[ProgressiveByteList]
    receipts_root: Root
    number: uint64
    gas_limits: GasAmounts
    gas_used: GasAmounts
    timestamp: uint64
    # ... extra_data, mix_hash, base_fees_per_gas, withdrawals, excess_gas,
    #     parent_beacon_block_root, requests_hash, block_access_list, slot_number

block_hash = payload.hash_tree_root()   # replaces keccak256(rlp(header))
```

## 알아둘 점

- 상태는 **Draft**입니다. Glamsterdam의 예정 목록([EIP-7773](/eip-7773/))에는 들어 있지 않습니다.
- RLP 블록 헤더를 파싱하는 컨트랙트(예: `BLOCKHASH`에 대해 헤더를 검증하는 경우)는 동작하지 않게 되며, 대신 SSZ 증명 로직이 필요합니다.
- 새 해시는 keccak256이 아니라 SHA-256을 사용합니다. 스펙은 기존 keccak 기반 해시와의 충돌 위험을 무시할 수 있는 수준으로 봅니다.
- 영수증 수준의 `logsBloom`은 영향을 받지 않습니다. 폐기되는 것은 블록 수준의 bloom뿐입니다.
- ePBS([EIP-7732](/eip-7732/))와 함께 도입된 Gloas 페이로드 봉투를 기반으로 합니다.


---

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