Skip to content

Conversation

@0xMushow
Copy link
Contributor

@0xMushow 0xMushow commented Dec 2, 2025

This incorrect ordering was confusing and can cause clients to implement wrongly the following functions.

According to the structure in the specifications

data should be the 2nd parameter:

class PendingAttestation(Container):
aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE]
data: AttestationData
inclusion_delay: Slot
proposer_index: ValidatorIndex

committee_bits should be the 4th parameter:

class Attestation(Container):
# [Modified in Electra:EIP7549]
aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
data: AttestationData
signature: BLSSignature
# [New in Electra:EIP7549]
committee_bits: Bitvector[MAX_COMMITTEES_PER_SLOT]

deposit_count comes first prior to block_hash.

class Eth1Data(Container):
deposit_root: Root
deposit_count: uint64
block_hash: Hash32

@0xMushow 0xMushow marked this pull request as draft December 2, 2025 03:36
@0xMushow 0xMushow changed the title Fix incorrect ordering in ProcessAttestation Fix incorrect ordering in PendingAttestation, Attestation, Eth1Data Dec 2, 2025
@0xMushow 0xMushow marked this pull request as ready for review December 2, 2025 03:51
Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I like little improvements like this 🙂 thank you!

@jtraglia jtraglia added the proofread Spelling, grammar, accuracy label Dec 2, 2025
@jtraglia jtraglia merged commit b8e0a3a into ethereum:master Dec 2, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proofread Spelling, grammar, accuracy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants