Skip to content
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: validate empty execution requests for OP #13980

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/optimism/node/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ impl<Types> EngineValidator<Types> for OpEngineValidator
where
Types: EngineTypes<PayloadAttributes = OpPayloadAttributes>,
{
fn validate_execution_requests(
&self,
requests: &alloy_eips::eip7685::Requests,
) -> Result<(), EngineObjectValidationError> {
// according to op spec, execution requests must be empty
if !requests.is_empty() {
return Err(EngineObjectValidationError::InvalidParams(
"non-empty execution requests".to_string().into(),
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this match the style of the other error messages?
eg, camel case

"MissingGasLimitInPayloadAttributes".to_string().into(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

that would make sense

))
}
Ok(())
}

fn validate_version_specific_fields(
&self,
version: EngineApiMessageVersion,
Expand Down
Loading