-
Notifications
You must be signed in to change notification settings - Fork 245
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: add PayloadError variants #649
feat: add PayloadError variants #649
Conversation
ptal @Rjected |
PreCancunBlockWithExcessBlobGas, | ||
/// cancun fields present in pre-cancun payload. | ||
#[error("cancun fields present in pre-cancun payload")] | ||
PreCancunWithCancunFields, |
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.
what fields in here are not captured in the others?
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.
sorry I meant to do that as a comment not a request changes:)
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.
what fields in here are not captured in the others?
yep, ensure_well_formed_payload
receives a cancun_fields
argument, of type MaybeCancunPayloadFields
, which contains a field of type Option<CancunPayloadFields>
, CancunPayloadFields
includes parent_beacon_block_root
and versioned_hashes
, see https://github.com/paradigmxyz/reth/blob/04636400dae1bfb19dddbb3dcc848b163be4dfbd/crates/payload/validator/src/lib.rs#L107.
The error here refers to MaybeCancunPayloadFields
containing a None
in its single field.
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.
lgtm
pending @onbjerg
* feat: add PayloadError variants * add PostCancunBlockWithoutBlobTransactions * update error messages
Towards paradigmxyz/reth#7993
Motivation
During the checks for well-formed payload the existence of hardfork-specific fields is missing.
Solution
Adds
PayloaError
variants to allow signaling failed checks for the existence of hardfork-specific fields.PR Checklist