EIPs Explained

EIP-7549 · Final · Core · 2023-11-01

EIP-7549: Move committee index outside Attestation

Took the committee index out of the signed attestation data so that identical votes from different committees can be aggregated into one signature, cutting verification work and packing more votes into each beacon block (shipped in Pectra).

What problem does it solve?

Every slot, validators are split into up to 64 committees, and each validator signs an attestation with two votes: an LMD-GHOST vote for the head block and a Casper FFG vote for (source, target) checkpoints. Before this change the signed AttestationData also contained the committee index.

That extra field meant that validators voting for exactly the same thing in different committees produced different messages, so their BLS signatures could not be aggregated together. Reaching a 2/3 supermajority required checking at least about 1,366 aggregates per epoch on a large network. Moving index out of the signed data cuts that to about 22, a 62× reduction. That matters most for light clients and ZK circuits proving Ethereum consensus, where each signature pairing is expensive.

It also lets blocks carry votes more compactly: a block can now hold up to 8 slots' worth of votes instead of 2.

How it works

Consensus-layer only; no execution-layer changes.

  • AttestationData.index is kept but must be 0. Keeping the field (rather than removing it) avoids complicating AttesterSlashing, whose indexed attestations carry no committee data.
  • The outer Attestation container gains committee_bits, a Bitvector[64] flagging which committees the aggregate covers.
  • aggregation_bits grows to cover the members of all committees in the slot.
  • Because each attestation can now be up to 64× larger, MAX_ATTESTATIONS per block was lowered to 8 and MAX_ATTESTER_SLASHINGS from 2 to 1 to bound block size.

The full rules live in the Electra consensus specs.

Sample code

Simplified SSZ containers after the change (Python-style spec notation):

class AttestationData(Container):
    slot: Slot
    index: CommitteeIndex          # now always 0
    beacon_block_root: Root        # LMD-GHOST vote
    source: Checkpoint             # FFG vote
    target: Checkpoint

class Attestation(Container):
    aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
    data: AttestationData
    signature: BLSSignature
    committee_bits: Bitvector[MAX_COMMITTEES_PER_SLOT]   # new: which committees are included

def get_committee_indices(committee_bits) -> Sequence[CommitteeIndex]:
    return [CommitteeIndex(i) for i, bit in enumerate(committee_bits) if bit]

Things to know

  • Status: Final. Activated on mainnet as part of the Pectra upgrade (EIP-7600).
  • committee_bits is a fixed-size Bitvector rather than a Bitlist because the length prefix of a Bitlist would roughly double its size.
  • The first block after the fork may contain no attestations, since pre-fork attestations do not fit the new container. The spec accepts this small one-time loss instead of adding complexity.
  • Because index is no longer signed, it could be tampered with on the gossip subnet topic; gossip validation rejects attestations whose attester is not in the claimed committee, so a mutated message is dropped.
  • Tooling that parses attestations (block explorers, staking dashboards, slashers) had to be updated for the new layout.

#consensus #attestations #beacon-chain #bls #pectra

Details

Authors
dapplion (@dapplion), Mikhail Kalinin (@mkalinin)
Status
Final
Type
Standards Track / Core
Created
2023-11-01
Required by

Machine-readable: Markdown · JSON