fix: ignore PTC votes whose slot does not match the referenced block - #9425
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the notifyPtcMessages method in the fork-choice and proto-array modules to accept a slot parameter. This ensures that Payload Timeliness Committee (PTC) votes are only processed if their slot matches the assigned beacon block's slot, preventing out-of-slot votes from mutating the fork choice state. The corresponding API, gossip handlers, block import logic, and unit tests have been updated to support this new parameter. No review comments were provided, so there is no feedback to address.
There was a problem hiding this comment.
馃挕 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6fef950ae
鈩癸笍 About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (node === undefined || node.slot !== slot) { | ||
| return; |
There was a problem hiding this comment.
Reject slot-mismatched PTC messages before side effects
When this new branch returns for data.slot != block.slot, gossip/API validation has already treated the message as valid: validatePayloadAttestationMessage() only checks that the block root is known, verifies the signature against data.slot, and then adds the validator to seenPayloadAttesters; the API/gossip handlers also insert it into the payload-attestation pool before calling here. In the skipped-slot case the local validator API can produce exactly this shape by returning the closest prior canonical block with the current slot, so the message is then silently ignored by fork choice but still consumes the validator's per-epoch dedup and can be pooled/published. Please move this slot/root check into validation before marking seen/inserting, or make this call report that the message was ignored so callers can avoid those side effects.
Useful? React with 馃憤聽/ 馃憥.
There was a problem hiding this comment.
- will be addressed by fix: ignore PTC attestations for empty assigned slots聽#9427
Performance Report鉁旓笍 no performance regression detected Full benchmark results
|
|
馃帀 This PR is included in v1.44.0 馃帀 |
Motivation
adhere to spec
notify_ptc_messagessee #9415 (comment), this caused issues on
glamsterdam-devnet-4Description
Ignore PTC votes whose slot does not match the referenced block