Skip to content

Force the proposer to reorg unavailable blocks - #5186

Merged
jtraglia merged 9 commits into
ethereum:masterfrom
potuz:proposer_da
May 14, 2026
Merged

Force the proposer to reorg unavailable blocks#5186
jtraglia merged 9 commits into
ethereum:masterfrom
potuz:proposer_da

Conversation

@potuz

@potuz potuz commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

In the event the proposer has seen the payload timely and its local view of DA passes, the node will have the payload verified. However, if the PTC is signalling that the Payload blob data is not available, the proposer MUST reorg the payload.

This PR implements this mechanism with a few caveats.

  • Most importantly, currently it is very aggressive and if there are no PTC attestations the proposer will be forced to reorg the payload. There are many solutions to this problem like simply counting the PTC attestations (which is also a way of counting the NAY votes) or using
    Distinguish absent PTC votes from negative votes #5180. If we go with Distinguish absent PTC votes from negative votes #5180 this PR needs to be accomodated to that and actually count the NAY votes.
  • The threshold could be different than 50%.
  • The proposer may have all the data available locally and decide to build on full even though the PTC voted no. I think it's better to leave that unspecified.

@github-actions github-actions Bot added the gloas label Apr 28, 2026
@mkalinin

Copy link
Copy Markdown
Contributor

However, if the PTC is signalling that the Payload blob data is not available, the proposer MUST reorg the payload.

Why do we want to make this behavior preferable? Honest proposer will propagate blob data and it will likely reach attesters before the attestation deadline and then attesters will have to vote against the proposed block

Comment thread specs/gloas/validator.md
@fradamt

fradamt commented May 6, 2026

Copy link
Copy Markdown
Contributor

However, if the PTC is signalling that the Payload blob data is not available, the proposer MUST reorg the payload.

Why do we want to make this behavior preferable? Honest proposer will propagate blob data and it will likely reach attesters before the attestation deadline and then attesters will have to vote against the proposed block

If the PTC signals unavailability, attesters will not vote against the proposed block. The PTC basically gives a "reorg pass" to the proposer.

As for why the default behavior should be to reorg, the main reason is that a proposer that samples is not able to fully determine availability by itself, so it makes sense for them to follow the PTC's availability determination. Otherwise, they might just be wrong (their 8 columns are available, but the rest is not), and their proposal would end up being reorged.

However, this does not necessarily need to be the case for proposers that download the whole data. They could ignore the PTC in principle.

In the event the proposer has seen the payload timely and its local view
of DA passes, the node will have the payload verified. However, if the
PTC is signalling that the Payload blob data is not available, the proposer MUST
reorg the payload.

This PR implements this mechanism with a few caveats.

- Most importantly, currently it is very aggressive and if there are no
  PTC attestations the proposer will be forced to reorg the payload.
There are many solutions to this problem like simply counting the PTC
attestations (which is also a way of counting the NAY votes) or using
5180. If we go with 5180 this PR needs to be accomodated to that and
actually count the NAY votes.
- The threshold could be different than 50%.
- The proposer may have all the data available locally and decide to
  build on full even though the PTC voted no. I think it's better to
leave that unspecified.
Comment thread specs/gloas/fork-choice.md Outdated
Comment thread specs/gloas/fork-choice.md Outdated
Comment thread specs/gloas/validator.md Outdated
Comment thread specs/gloas/fork-choice.md Outdated
### New `ptc_voted_data_unavailable`

```python
def ptc_voted_data_unavailable(store: Store, root: Root) -> bool:

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.

After #5186 and #5210, there will be very similar four PTC-related functions. We can at least shrink it into two: timeliness and availability. For instance,

def payload_data_availability(store: Store, root: Root, available: bool) -> bool:
	"""
	Return whether the blob data for the beacon block with root ``root``
    was voted as present by the PTC, and was locally determined to be available or unavailable.
	"""
	# The beacon block root must be known
	assert root in store.payload_data_availability_vote

	# If the payload is not locally available, the blob data
	# is not considered available regardless of the PTC vote
	if not is_payload_verified(store, root):
	  return not available

	votes = store.payload_data_availability_vote[root]
	return sum(vote is available for vote in votes) > DATA_AVAILABILITY_TIMELY_THRESHOLD

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.

@jihoonsong I agree. I've fixed this here: ab43f0e

Comment thread specs/gloas/validator.md Outdated
@github-actions github-actions Bot added the heze label May 14, 2026
@github-actions github-actions Bot added the testing CI, actions, tests, testing infra label May 14, 2026
@jtraglia

Copy link
Copy Markdown
Member

For the record, @potuz does not like the shared helper functions.

honestly having payload_timeliness return true or false depending on a boolean flag is a bad antipattern, just to avoid helpers that are named similarly but that have clear meanings, I do not like this next commit

Though Jihoon & I still prefer it for deduplication reasons.

@jtraglia
jtraglia merged commit 63fc11e into ethereum:master May 14, 2026
15 checks passed
@jihoonsong

jihoonsong commented May 15, 2026

Copy link
Copy Markdown
Member

For the record, @potuz does not like the shared helper functions.

honestly having payload_timeliness return true or false depending on a boolean flag is a bad antipattern, just to avoid helpers that are named similarly but that have clear meanings, I do not like this next commit

Sure, and sibling functions with mismatched names is also an anti-pattern: is_payload_data_available and ptc_voted_data_unavailable. It makes it hard to tell they're a pair checking the same dataset. Good names aren't optional; they're part of the code itself.

Having payload_timeliness and payload_data_availability with the convention of using keyword argument for the boolean flag (and assigning the return value to a well-named variable that describes its meaning in our case) is one way. Another approach is adding is_payload_data_available and is_payload_data_unavailable, and making them call payload_data_availability inside.

Whichever we choose, it's an improvement to the original code.

@zilm13 zilm13 mentioned this pull request May 18, 2026
17 tasks
wemeetagain added a commit to ChainSafe/lodestar that referenced this pull request May 21, 2026
**Motivation**

- implement `shouldBuildOnFull()` as in
ethereum/consensus-specs#5186

**Description**

- track blob data available in a new `daVotes`
- thread blob data available from block import, gossip handler and api
- track ptc voted in a new `ptcAttested`
- count NO votes and implement `shouldBuildOnFull()` when producing
block


**AI Assistance Disclosure**

Created with Claude

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
Co-authored-by: Cayman <caymannava@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas heze testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants