# アテステーションと確定

> バリデーターの票が1つの署名にまとめられてブロックに入り、約13分かけてブロックが確定するまでを段ごとに追います。

- URL: https://cardene.dev/diagrams/ethereum-attestation
- 公開日: 2026-11-01
- 更新日: 2026-11-01
- トピック: Blockchain
- タグ: Ethereum
- 親の図解: [トランザクションがブロックに入るまで](https://cardene.dev/diagrams/ethereum-transaction-to-block.md): ウォレットで署名したトランザクションが、ビルダーの入札とリレーを経てブロックに入り、確定するまでを段ごとに追います。
- 子の図解: [フォークチョイスで先頭を選ぶ](https://cardene.dev/diagrams/ethereum-fork-choice.md): チェーンが枝分かれした時に、ノードが票の重みを比べて枝を選び、チェーンの先頭のブロックを決めるまでを段ごとに追います。

Ethereumのブロックは、作られた時点ではまだ取り消される可能性があります。
バリデーターの票が十分に集まって初めて確定し、事実上取り消せなくなります。
この票をアテステーションと呼びます。
バリデーターは、約6.4分のエポックという区切りごとに1度、どのブロックを正しいと判断したかを署名して配ります。

## 票がブロックに入るまで

ただし、全員の署名がそのままブロックに入るわけではありません。
同じ委員会の票は、署名を1つにまとめてからブロックに入れます。
票が指す先頭のブロックをどう選ぶかは、「[フォークチョイスで先頭を選ぶ](/diagrams/ethereum-fork-choice)」の図解で追えます。

```dragon
lineup 票がブロックに入るまで

box 委員会 [color: green]
box サブネット [color: slate]
box 集約者 [color: violet]
box ブロック [color: blue]

item 自分 [color: amber, label: 自分]
item 人1, 人2, 人3, 人4, 人5, 人6, 人7 [color: slate]
item 票0 [color: amber, label: ✓]
item 票1, 票2, 票3, 票4, 票5, 票6, 票7 [color: green, label: ✓]
item 束 [color: violet, label: 8票]

strip アテステーション: 中身, 署名の数

step 担当のスロットを知る
  say バリデーターは全員が同時に投票するのではなく、1エポックの中で自分の番が1度だけ回ってきます。1エポックは32スロットで、1スロットは12秒です。どのスロットでどの委員会に入るかは1エポック以上前に分かるので、バリデーターはその番を待ちます。図の8枚は例で、委員会の人数の目安は128人です。
  code get_committee_assignment
  line 委員会: 自分, 人1, 人2, 人3, 人4, 人5, 人6, 人7
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source consensus-specsのPhase 0 Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md]

step ブロックを受け取る
  say 番が来たスロットでは、まず提案者のブロックを待ちます。ただし、ブロックが届かない時に備えて、スロットの開始から約4秒が過ぎたら、届いていなくても票を作り始めます。どのブロックをチェーンの先頭と見るかは、フォークチョイスという規則で決めます。
  note 委員会: 約4秒まで
  set 中身: 先頭
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source consensus-specsのmainnetの設定 [url: https://github.com/ethereum/consensus-specs/blob/master/configs/mainnet.yaml]

step 票の中身を書く
  say 次に、票の中身を書きます。票が持つのは、先頭のブロックと、sourceとtargetの2つのチェックポイントです。先頭のブロックはチェーンが分かれた時にどちらを選ぶかに使い、sourceとtargetはブロックの確定に使います。チェックポイントはエポックの境界のブロックのことで、targetには今のエポックのチェックポイントを、sourceにはすでに正当化されたチェックポイントを書きます。
  code AttestationData
  set 中身: 先頭 / source / target
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]

step それぞれが署名する
  say 中身が決まると、委員会の全員が自分の票に、自分の秘密鍵でBLS署名をします。BLS署名は、複数の署名を足し合わせて1つの署名にまとめられる方式です。このとき、委員会の中での自分の位置を表すビットを1にするので、誰の票かが後から分かります。
  line 委員会: 票0, 票1, 票2, 票3, 票4, 票5, 票6, 票7
  set 署名の数: 票ごとに1つ
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]

step サブネットへ配る
  say 署名した票は、まずサブネットへ配ります。サブネットは票を配るために分けた64本の配信の経路で、どのサブネットに配るかはスロットと委員会で決まります。
  line サブネット: 票0, 票1, 票2, 票3, 票4, 票5, 票6, 票7
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source consensus-specsのPhase 0 P2P Interface [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/p2p-interface.md]

step 集約者が1つにまとめる
  say サブネットの票は、委員会から選ばれた集約者が受け取ります。集約者は、委員会ごとに16人ほど選ばれます。集約者は同じ中身の票の署名を1つにまとめ、スロットの開始から約8秒でネットワーク全体へ配ります。
  line 集約者: 束
  note 集約者: 約8秒
  set 署名の数: 8票で1つ
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source consensus-specsのmainnetの設定 [url: https://github.com/ethereum/consensus-specs/blob/master/configs/mainnet.yaml]

step 提案者がブロックに入れる
  say まとめた票は、次のスロット以降の提案者が自分のブロックに入れます。Ethereumのアップグレードの1つのElectra以降は、中身が同じなら、委員会の違う票も提案者が1件にまとめます。1つのブロックには、まとめた票が最大8件入ります。
  line ブロック: 束
  source consensus-specsのPhase 0 Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md]
  source consensus-specsのElectra Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/electra/validator.md]
  source consensus-specsのElectra Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/electra/beacon-chain.md]
```

## ブロックが確定するまで

こうしてブロックに入った票は、チェックポイントと呼ぶエポックの境界のブロックへの重みになります。
票の重みが全体の3分の2以上になったチェックポイントが2つ続くと、前のチェックポイントが確定します。

```dragon
time ブロックが確定するまで

scale スロット 12s 96
period エポック 32
row ブロック [color: blue]
point C0 at 0
point C1 at 32
zoom 0-1

box 委員会 [color: green, icon: user]
box 票 [color: amber, icon: doc]

strip 確定の進み: 経過, 今のエポックの票 [meter: 2/3]

step 委員会が順に票を出す
  say バリデーター全員が1エポックに1度ずつ投票できるよう、スロットごとに別の委員会が票を出します。チェーンが分かれた時は、これらの票の重みが最も大きい枝を選びます。上の帯は、最初の2スロットを拡大したものです。
  委員会 -> 票 [at: 0]
  委員会 -> 票 [at: 1]
  now -> 1
  set 経過: 24秒
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source ethereum.orgのGasper [url: https://ethereum.org/developers/docs/consensus-mechanisms/pos/gasper/]

step 1エポック分の票を集める
  say 32スロットが過ぎると、1エポック分の票が揃います。これらの票のtargetは、どれもエポックの境界のブロックC0です。図の割合は例で、ステークされたETHのうち、C0へ投票したバリデーターのETHの割合を表します。
  note C0: 票を集める [color: blue]
  span 0-31: 1エポック = 32スロット [color: slate]
  now -> 31
  set 経過: 6分24秒
  set 今のエポックの票: 90%
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]
  source consensus-specsのPhase 0 Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md]

step C0が正当化される
  say C0への票の重みが、ステークされたETH全体の3分の2以上になると、C0は正当化(justified)されます。ただし、この時点ではまだ確定ではありません。次のエポックの票はC1へ集まります。
  note C0: 正当化 [color: violet]
  note C1: 票を集める [color: blue]
  set 今のエポックの票: 0%
  source ethereum.orgのGasper [url: https://ethereum.org/developers/docs/consensus-mechanisms/pos/gasper/]
  source consensus-specsのPhase 0 Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md]

step 次のエポックの票を集める
  say 次の32スロットでは、票のsourceに正当化されたC0を書き、targetにC1を書きます。
  now -> 63
  set 経過: 12分48秒
  set 今のエポックの票: 90%
  source consensus-specsのPhase 0 Honest Validator [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/validator.md]

step C1も正当化されてC0が確定する
  say C1も3分の2以上の票を集めて正当化されると、1つ前のC0が確定(finalized)します。ここまでで約13分かかります。
  C0 -> C1: 3分の2以上の票 [carry: none]
  note C1: 正当化 [color: violet]
  note C0: 確定 [color: green]
  mark ブロック 0-31 [color: green]
  span 0-31: 確定 [shape: box, color: rose]
  source ethereum.orgのGasper [url: https://ethereum.org/developers/docs/consensus-mechanisms/pos/gasper/]
  source consensus-specsのPhase 0 Beacon Chain [url: https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md]
```
