Skip to content

feat: payload data availability votes + rename ptcVotes (consensus-specs#4884, #4930)#8

Open
lodekeeper wants to merge 2 commits intounstablefrom
feat/payload-data-availability-votes
Open

feat: payload data availability votes + rename ptcVotes (consensus-specs#4884, #4930)#8
lodekeeper wants to merge 2 commits intounstablefrom
feat/payload-data-availability-votes

Conversation

@lodekeeper
Copy link
Copy Markdown
Owner

Motivation

Implement payload data availability tracking (ethereum/consensus-specs#4884) and rename ptcVotes to match spec naming (ethereum/consensus-specs#4930).

Changes

Rename (consensus-specs#4930)

  • ptcVotespayloadTimelinessVotes to match spec naming

Data availability votes (consensus-specs#4884)

  • Add payloadDataAvailabilityVotes BitArray map for blob availability tracking
  • Add DATA_AVAILABILITY_TIMELY_THRESHOLD constant (PTC_SIZE / 2)
  • Update notifyPtcMessages to accept 4 args (+ blobDataAvailable)
  • Add isPayloadDataAvailable() method to proto-array
  • Update shouldExtendPayload: condition 1 = isPayloadTimely AND isPayloadDataAvailable

Anchor block initialization

  • Initialize both vote maps to all-True for anchor block per get_forkchoice_store spec

Split from alpha.3 upgrade PR #6.

…ecs#4884, ChainSafe#4930)

- Rename ptcVotes → payloadTimelinessVotes to match spec naming
- Add payloadDataAvailabilityVotes BitArray map for blob availability tracking
- Add DATA_AVAILABILITY_TIMELY_THRESHOLD constant (PTC_SIZE / 2)
- Update notifyPtcMessages to accept 4 args (+ blobDataAvailable)
- Add isPayloadDataAvailable() method to proto-array
- Update shouldExtendPayload: condition 1 = isPayloadTimely AND isPayloadDataAvailable
- Initialize both vote maps to all-True for anchor block per get_forkchoice_store spec
…le tests

Fix 5 test call sites still passing 3 arguments to notifyPtcMessages
after the 4-arg signature change (missing blobDataAvailable parameter).

Add dedicated test suite for isPayloadDataAvailable():
- returns false for unknown block
- returns false when no FULL variant exists
- returns true when threshold met and payload available
- returns false when below threshold
- tracks data availability votes independently from timeliness votes

🤖 Generated with AI assistance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant