---
eip: 6465
label: EIP-6465
title: SSZ withdrawals root
status: Draft
type: Standards Track
category: Core
created: 2023-02-08
requires: 2718, 4895, 6404, 7495, 7916
official: https://eips.ethereum.org/EIPS/eip-6465
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6465.md
canonical: https://eips.huatuo.xyz/ko/eip-6465/
lang: ko
tldr: 실행 블록 헤더의 withdrawals_root를 Merkle Patricia Trie 루트에서 SSZ hash_tree_root로 바꾸자고 제안한다. 실행 계층과 합의 계층이 출금을 같은 방식으로 커밋하게 된다.
tags: [ssz, withdrawals, core, consensus, block-header]
---

# EIP-6465: SSZ withdrawals root

> Migration of withdrawals MPT commitment to SSZ

**TL;DR:** 실행 블록 헤더의 withdrawals_root를 Merkle Patricia Trie 루트에서 SSZ hash_tree_root로 바꾸자고 제안한다. 실행 계층과 합의 계층이 출금을 같은 방식으로 커밋하게 된다.

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

검증자 출금([EIP-4895](/eip-4895/))은 합의 계층에서 각 실행 블록으로 밀어 넣어집니다. 두 계층 모두 `withdrawals_root`를 저장하지만 의미가 다릅니다. 실행 블록 헤더에는 RLP로 인코딩된 출금의 **Merkle Patricia Trie(MPT)** 루트가 들어 있고, 합의 계층의 `ExecutionPayloadHeader`에는 **SSZ** 루트가 들어 있습니다.

이름은 같은데 해시는 서로 다릅니다. EIP-6465는 실행 헤더도 SSZ 루트를 쓰게 합니다. 그러면 클라이언트가 MPT를 필요로 하는 곳이 하나 줄어들고, `withdrawals_root`가 어디서나 하나의 의미를 갖게 됩니다.

## 어떻게 동작하나요?

- 합의 계층의 `Withdrawal` 컨테이너를 같은 네 개 필드(`index`, `validator_index`, `address`(20바이트), `amount`(Gwei 단위))를 가진 [EIP-7495](/eip-7495/) `ProgressiveContainer`로 옮깁니다.
- 블록의 출금은 `ProgressiveList[Withdrawal]`이 됩니다(progressive list는 [EIP-7916](/eip-7916/)에서 나왔습니다).
- 실행 헤더의 `withdrawals_root`는 MPT 루트 대신 그 리스트의 SSZ `hash_tree_root()`로 설정됩니다.
- 합의 계층의 `ExecutionPayload.withdrawals`도 같은 progressive list 타입을 사용하며, 상태 전이는 여전히 출금 수를 `MAX_WITHDRAWALS_PER_PAYLOAD`로 제한합니다.

이는 [EIP-6404](/eip-6404/)(SSZ 트랜잭션 루트)와 함께 "어디서나 SSZ" 제안군의 일부입니다.

## 샘플 코드

사양의 Python 스타일로 작성한 새 정의와 루트 계산입니다.

```python
class Withdrawal(ProgressiveContainer(active_fields=[1, 1, 1, 1])):
    index: WithdrawalIndex          # uint64
    validator_index: ValidatorIndex # uint64
    address: ExecutionAddress       # Bytes20
    amount: Gwei                    # uint64

withdrawals = ProgressiveList[Withdrawal](
    withdrawal_0, withdrawal_1, withdrawal_2, ...)

# Before: MPT root over RLP-encoded withdrawals
# After:
block_header.withdrawals_root = withdrawals.hash_tree_root()
```

## 알아둘 점

- 상태는 **Draft**입니다. 하드 포크가 필요한 Core 변경이며 메인넷에서는 동작하지 않습니다.
- 원래 Shanghai에서 검토되었지만, 출금을 더 빨리 출시할 수 있도록 미뤄졌습니다.
- 헤더의 MPT `withdrawals_root`에 대해 출금을 검증하는 모든 것(라이트 클라이언트, 증명자, 인덱서)은 SSZ 증명으로 바꿔야 합니다.
- 출금의 RLP 인코딩과 SSZ 인코딩은 충돌할 수 있습니다. 채널마다 하나의 형식만 사용하고, 어느 쪽이 적용되는지는 블록의 포크로 확인하세요.


---

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