-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(l2-withdrawals): Decompose ExecutionPayloadValidator::ensure_well_formed_payload
#14566
Conversation
…fork specific functions
…d into fork specific functions
ExecutionPayloadValidator::ensure_well_formed_payload
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 is cleaner
is_cancun_active: bool, | ||
) -> Result<(), PayloadError> { | ||
if is_cancun_active { | ||
if !block_body.has_eip4844_transactions() { |
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 check is wrong I believe
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.
should the error variant be removed from alloy?
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.
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 so, i believe this was intended for the sidecar fields which we check seperately
is_cancun_active: bool, | ||
) -> Result<(), PayloadError> { | ||
if is_cancun_active { | ||
if !block_body.has_eip4844_transactions() { |
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 so, i believe this was intended for the sidecar fields which we check seperately
…ll_formed_payload` (paradigmxyz#14566)
Pre-req for #14177
Moves the payload field checks into functions, grouped in modules based on hardfork. This provides building blocks for L2s to implement custom payload validation, for example OP would skip the Cancun validations on the transactions field, but would still check if cancun payload fields are present or not present.