close
Skip to content

Add tests for on_payload_attestation_message#5206

Merged
jtraglia merged 6 commits into
ethereum:masterfrom
brech1:test/on-payload-attestation-message
May 12, 2026
Merged

Add tests for on_payload_attestation_message#5206
jtraglia merged 6 commits into
ethereum:masterfrom
brech1:test/on-payload-attestation-message

Conversation

@brech1

@brech1 brech1 commented May 4, 2026

Copy link
Copy Markdown
Member

Description

This PR main objective is to add tests for the on_payload_attestation_message spec function.

Changes

  • Add on_payload_attestation is_from_block optional field.
  • Add payload_timeliness_vote and payload_data_availability_vote checks (up to date with Distinguish absent PTC votes from negative votes #5180).
  • Rename PayloadAttestationMessage fixture prefix to payload_attestation_message_<root> to match the SSZ type.

@github-actions github-actions Bot added the testing CI, actions, tests, testing infra label May 4, 2026
Comment thread tests/core/pyspec/eth_consensus_specs/test/helpers/fork_choice.py Outdated
Comment thread tests/formats/fork_choice/README.md Outdated
@jtraglia

jtraglia commented May 6, 2026

Copy link
Copy Markdown
Member

@brech1 I will approve/merge this after we resolve feedback!

@brech1 brech1 force-pushed the test/on-payload-attestation-message branch from 192095a to ef2efaa Compare May 8, 2026 01:54
@brech1 brech1 requested a review from ericsson49 May 8, 2026 01:54
@brech1 brech1 force-pushed the test/on-payload-attestation-message branch from ef2efaa to 44c14b4 Compare May 8, 2026 01:54
@brech1

brech1 commented May 8, 2026

Copy link
Copy Markdown
Member Author

Apologies for the rebase, needed a clean diff for some whitespace changes.

Regarding duplicated PTC members votes, here's a related ongoing thread discussing this:

It's certainly an option to drop this scenario and focus on changing this behavior instead

@brech1 brech1 force-pushed the test/on-payload-attestation-message branch from 44c14b4 to 0f33ce8 Compare May 11, 2026 15:42
@brech1

brech1 commented May 11, 2026

Copy link
Copy Markdown
Member Author

Applied the updates for the #5222 spec changes.

I removed the following tests:

I inlined the _get_non_ptc_member helper and joined _setup_store and _setup_ptc_block into _setup_test

Updated test functions name for correct full spec function name.

@brech1 brech1 requested a review from jtraglia May 11, 2026 20:20
Comment thread tests/core/pyspec/eth_consensus_specs/test/helpers/fork_choice.py Outdated

@jtraglia jtraglia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome. These look great. Just a few little nit fixes & we can get this merged.

@brech1 brech1 force-pushed the test/on-payload-attestation-message branch from b73ae2b to 8985840 Compare May 12, 2026 00:14
@jtraglia jtraglia merged commit 792a8b0 into ethereum:master May 12, 2026
15 checks passed
@brech1 brech1 deleted the test/on-payload-attestation-message branch May 12, 2026 16:45
nflaig pushed a commit to ChainSafe/lodestar that referenced this pull request Jun 5, 2026
)

**Motivation**

The consensus-specs repo added new fork choice test vectors for
on_payload_attestation_message (ethereum/consensus-specs#5206).
Lodestar's spec test runner needs a handler for this step type so the
nightly spec tests can run these vectors instead of failing on an
unrecognized step.

**Description**

Adds test infrastructure to handle `on_payload_attestation_message`
steps in fork choice spec tests:

- OnPayloadAttestationMessage step type and
`isPayloadAttestationMessage` type guard
- SSZ fixture loader for `payload_attestation_message_*.ssz_snappy`
files
- Step handler that deserializes the message and calls
`notifyPtcMessages`

Closes #9364
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants