feat: validate empty execution requests for OP (#13980)

This commit is contained in:
Julian Meyer
2025-01-24 13:54:35 -08:00
committed by GitHub
parent a087731199
commit 60f9277dc5

View File

@ -105,6 +105,19 @@ impl<Types> EngineValidator<Types> for OpEngineValidator
where where
Types: EngineTypes<PayloadAttributes = OpPayloadAttributes>, 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(
"NonEmptyExecutionRequests".to_string().into(),
))
}
Ok(())
}
fn validate_version_specific_fields( fn validate_version_specific_fields(
&self, &self,
version: EngineApiMessageVersion, version: EngineApiMessageVersion,