---
eip: 8071
label: EIP-8071
title: Prevent using consolidations as withdrawals
status: Draft
type: Standards Track
category: Core
created: 2025-10-29
official: https://eips.ethereum.org/EIPS/eip-8071
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8071.md
canonical: https://eips.huatuo.xyz/ja/eip-8071/
lang: ja
tldr: 対象が最大実効残高を超えることになるバリデーター統合リクエストをキャンセルし、統合キューをより速い退出キューとして使えてしまう抜け穴を塞ぐ。
tags: [consensus, staking, consolidation, withdrawals, pectra]
---

# EIP-8071: Prevent using consolidations as withdrawals

> Cancels consolidation if the max effective balance of the target validator will be exceeded, preventing the withdrawal of the unused balance

**TL;DR:** 対象が最大実効残高を超えることになるバリデーター統合リクエストをキャンセルし、統合キューをより速い退出キューとして使えてしまう抜け穴を塞ぐ。

## 何を解決するのか

[EIP-7251](/eip-7251/)（Pectra）は最大実効残高を 2048 ETH に引き上げ、**統合（consolidation）**を追加しました。バリデーターは、compounding 資格情報を持つ別のバリデーターに自分のステークをまとめられます。統合元のバリデーターは統合キューを通って退出し、その残高は統合先に移されます。

欠陥は次のとおりです。統合先が最大実効残高を超えてしまうと、超過分は単に引き出されます。そのため、統合キューが通常の退出キューより速く進んでいたとき、ステーカーはほぼ満額のバリデーターへ「統合」することで、通常の退出よりも早く ETH を引き出せました。仕様には、執筆時点でこれが盛んに悪用されており、その手法を説明した公開記事があると記されています。これはセキュリティのバグではなく、UX と公平性の問題と位置づけられています。統合キューは引き出しのために作られたものではないからです。

## 仕組み

コンセンサスレイヤーの `process_consolidation_request` に、チェックが 1 つ追加されます。リクエストを受け付ける前に、次を計算します。

```
target balance after = pending consolidations already queued for the target
                     + source effective balance
                     + target's current balance
```

これが対象の最大実効残高を超える場合、リクエストは、他の無効な統合リクエストと同様に黙って無視されます。

新しいヘルパー `get_pending_balance_to_consolidate` は、同じ対象に対してすでにキューにあるすべての統合元の実効残高を合計します。これにより、個々のリクエストは問題なくても、合計すると対象があふれるケースを捕捉できます。

## サンプルコード

仕様にある、新しいヘルパーと追加されたチェック:

```python
def get_pending_balance_to_consolidate(state: BeaconState, target_index: ValidatorIndex) -> Gwei:
    total = Gwei(0)
    for pc in state.pending_consolidations:
        if pc.target_index == target_index:
            total += state.validators[pc.source_index].effective_balance
    return total

# inside process_consolidation_request, after the existing checks:
target_balance_after_consolidation = (
    get_pending_balance_to_consolidate(state, target_index)
    + source_validator.effective_balance
    + state.balances[target_index]
)
if target_balance_after_consolidation > get_max_effective_balance(target_validator):
    return  # cancelled: excess would otherwise be withdrawn
```

## 知っておくべきこと

- **ステータス: Draft。** コンセンサスの変更であり、予定されたネットワークアップグレードが必要です。
- キャンセルされたリクエストはコンセンサスレイヤーで破棄されますが、**実行レイヤーのリクエスト手数料とガスは返金されません**。送信前に対象の空き容量を確認してください。
- このチェックは対象の実効残高だけでなく実際の残高を使うため、対象に蓄積された報酬も上限に算入されます。
- compounding 資格情報へ切り替えるための自己統合は影響を受けません。
- 退出するには、通常の退出キューか、実行レイヤーからトリガーする退出（[EIP-7002](/eip-7002/)）を使ってください。


---

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