Count PTC votes from duplicated validators - #5222
Merged
Merged
Conversation
brech1
reviewed
May 8, 2026
Contributor
|
I reintroduced the lost change from the ptc and slot check assertion order: |
nflaig
commented
May 8, 2026
satushh
approved these changes
May 8, 2026
brech1
approved these changes
May 8, 2026
jtraglia
reviewed
May 8, 2026
jtraglia
reviewed
May 8, 2026
jtraglia
reviewed
May 8, 2026
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
jtraglia
approved these changes
May 8, 2026
brech1
added a commit
to brech1/consensus-specs
that referenced
this pull request
May 11, 2026
brech1
added a commit
to brech1/consensus-specs
that referenced
this pull request
May 12, 2026
twoeths
added a commit
to ChainSafe/lodestar
that referenced
this pull request
May 18, 2026
**Motivation** Follow consensus-specs PR ethereum/consensus-specs#5222. `compute_ptc` samples PTC seats by effective balance and may place the same validator at multiple positions in a slot's PTC. The previous `on_payload_attestation_message` recorded the vote only at `ptc.index(validator_index)` (first occurrence), leaving the other duplicate seats as `None`. With enough duplicates this can make `PAYLOAD_TIMELY_THRESHOLD = PTC_SIZE // 2` unreachable, particularly in testnets with many `0x02` validators. Sync committee already counts duplicate votes; PTC should match. **Description** - replace `getIndexInPayloadTimelinessCommittee` with `getIndicesInPayloadTimelinessCommittee` returning every PTC position a validator occupies - handle `PayloadAttestationPool.add()` to support multiple validator committee indices **AI Assistance Disclosure** Used Claude Code. Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
This was referenced May 18, 2026
pull Bot
pushed a commit
to Hawthorne001/prysm
that referenced
this pull request
Jun 11, 2026
…inLabs#16934) The gloas `on_payload_attestation_message` fork choice spec tests were silently passing because the runner's `Step`/`Check` types had no fields for `payload_attestation_message` steps or the `payload_timeliness_vote` / `payload_data_availability_vote` checks, so YAML unmarshalling silently dropped both. - Add `payload_attestation_message` step support: unmarshals the message and feeds it through `ReceivePayloadAttestationMessage`, asserting acceptance/rejection per the step's`valid` field - Add `payload_timeliness_vote` / `payload_data_availability_vote` check support, comparing the per-seat PTC vote bitvectors in forkchoice (`null` = no vote, `true`/`false` = recorded value) - Add a `PTCVotes` getter on the doubly-linked-tree forkchoice to expose the vote bit vectors - Convert the skip list to `map[string]string` so each skip logs its rationale With the steps actually wired up, 2 of 7 test cases pass (`from_block`, `not_ptc_member`). The remaining 5 are skipped with rationales: | Test | Reason | |---|---| | `valid`, `multiple_ptc_members_vote_independently` | PTC votes are only recorded at the validator's first committee seat [consensus-specs#5222](ethereum/consensus-specs#5222) requires recording at every duplicate seat (balance-weighted committee) | | `current_slot_and_signature` | Signature and current-slot checks live in gossip validation (`validate_payload_attestation.go`), not the fork choice handler | | `unknown_block_root` | Unknown block root check lives in gossip validation (`VerifyBlockRootSeen`) | | `slot_mismatch` | Block slot match check lives in gossip validation (`VerifyBlockSlotMatches`) |
pull Bot
pushed a commit
to Hawthorne001/prysm
that referenced
this pull request
Jul 7, 2026
see ethereum/consensus-specs#5222 --------- Co-authored-by: Potuz <potuz@prysmaticlabs.com> Co-authored-by: terence <terence@prysmaticlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A validator can be part of the PTC multiple times in a slot because
compute_ptcsamples by effective balance.Right now,
on_payload_attestation_messageonly records the vote atptc.index(validator_index), so the validator's other entries stayNone. With enough duplicates this makes the fixedPAYLOAD_TIMELY_THRESHOLD = PTC_SIZE // 2unreachable. While this is very unlikely to have any meaningful impact on mainnet, it's notable during testing, especially if we have many0x02validators in the network.In principle, it also seems more correct to count these votes, since the PTC is not one validator, one vote, it's balance weighted. We also already do the same for sync committee where
process_sync_aggregatecounts duplicate votes. I don't see a reason why PTC should work differently.Related discussion on discord