-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Process same-slot slashings before builder payments in Gloas #4726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
37d0a21 to
e0d251b
Compare
e0d251b to
fe3e8d7
Compare
fe3e8d7 to
68a9c02
Compare
|
|
||
| @with_gloas_and_later | ||
| @spec_state_test | ||
| def test_process_block_then_slash_non_timely_builder(spec, state): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
Hey @0xc0de42, I'm confused. This PR doesn't do this:
|
|
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.
I was not sure whether specs should cover both cases:
This test case only addressed the second case. |
| yield "block", block | ||
| spec.process_block(state, block) | ||
| # Slash validator | ||
| spec.slash_validator(state, builder_index) |
There was a problem hiding this comment.
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
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.