Skip to content

Conversation

@0xc0de42
Copy link

@0xc0de42 0xc0de42 commented Nov 5, 2025

Fix processing of same-slot slashings before builder payments in Gloas (#4561)

Related to #4561

Slashing currently only succeeds when the validator is slashed after the block has been processed.
This behavior fails earlier because of the assert not builder.slashed check in process_execution_payload_bid(state, block).
Reordering the internal function calls within process_block. For example, evaluating process_block_header at the end, does not resolve the issue, as the slashing condition is still enforced before the builder payment is applied.

@0xc0de42 0xc0de42 force-pushed the fix_same_slot_slashing branch from fe3e8d7 to 68a9c02 Compare November 7, 2025 15:35
@leolara leolara requested review from jtraglia and leolara November 11, 2025 13:31

@with_gloas_and_later
@spec_state_test
def test_process_block_then_slash_non_timely_builder(spec, state):
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be good if you yield so it would create a test vector

Copy link
Member

Choose a reason for hiding this comment

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

Perphas one of the operations formats here: tests/formats/operations/README.md

@jtraglia jtraglia changed the title Fix Process same-slot slashings before builder payments in Gloas #4561 Process same-slot slashings before builder payments in Gloas Nov 11, 2025
@jtraglia
Copy link
Member

Hey @0xc0de42, I'm confused. This PR doesn't do this:

Reordering the internal function calls within process_block.

@0xc0de42
Copy link
Author

0xc0de42 commented Nov 11, 2025

Hey @jtraglia , thanks for the response.

The PR doesn't do that, I mentioned this topic as it was suggested to do so at issue #4561. Sorry for the confusion.
As mentioned in #4561:

however, there is a simple fix to just move the header processing after the other operation processing

I was not sure whether specs should cover both cases:

  1. builder is slashed before the beacon block is processed.
  2. builder is slashed after the beacon block is processed.

This test case only addressed the second case.

yield "block", block
spec.process_block(state, block)
# Slash validator
spec.slash_validator(state, builder_index)
Copy link
Member

Choose a reason for hiding this comment

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

This state change would have to be after the post, but I think it is better to use another format that sorrounds the slashing

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants