2

The beacon chains Attestation data structure has an aggregation_bits

class Attestation(Container):
    aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE]
    data: AttestationData
    signature: BLSSignature

See.

I am not sure how to interpret it. I see the size is MAX_VALIDATORS_PER_COMMITTEE so my guess is that, it is a list of validators in a particular committee.

From the configurations here it can be seen that MAX_VALIDATORS_PER_COMMITTEE has a value of 2 ** 11 = 2,048

But when I look at the chain explorer, for example here I see Aggregation Bits and Validators but not sure how these two relate.

Anyone care enough explain what aggregation_bits is? And how it is used in the process of aggregation.

Update:

I found this link here where it is stated:

aggregation_bits - a list of bits containing a single bit for each member of the committee. Each validator that participated in this aggregate signature is assigned a value of 1. These bits are ordered by the sort of the associated crosslink committee

Looking at the blockchain explorer again, I am not sure how to map the bits to validator index?

1 Answer 1

3

First, I suggest you to look the annotated specs of Vitalik and Ben Edgington when you search for some info on the code. For instance, for the aggregation bit, Ben explains:

This is the form in which attestations make their way around the network. It is designed to be easily aggregatable: Attestations containing identical AttestationData can be combined into a single attestation by aggregating the signatures.

And Vitalik says:

instead of every validator's attestation being included separately, attestations first get broadcasted to an aggregation layer in the network, and then the block proposer can merge all attestations that sign the exact same AttestationData into a single Attestation that gets included on-chain.

Now concerning your updated question, the answer is that you can map aggregation bits with validator's index when you know the committee. In the instance you've given you can see each attestation has a committee index. Each committee is chosen by a pseudo random algorithm. The function get_beacon_committee returns a list of validator Index. With this list you can map aggregation bits to the validators' index.

3
  • Thanks for the reply but i still dont get how the list of validator index returned by get_beacon_committee gets mapped to the aggregate bits. Commented Apr 14, 2022 at 22:25
  • I mean, the aggregate bits is a list of bits, where 1 representing participating validator...this I understand, but I do not see how to map these 1's to a validator Index which actually identify the validator...Any ideas how this is done? Commented Apr 17, 2022 at 17:05
  • 1
    It's in the last paragraph, each epoch, committees are shuffled with a pseudo random algorithm. The committee is an ordered list of validator, so once you know the the committee you can map it with a list of 1 and 0 according to the vote they've made. Does this answer your question?
    – upavloff
    Commented Jun 8, 2022 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.