Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 14 additions & 1 deletion executors/src/eoa/worker/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pub fn is_retryable_rpc_error(kind: &RpcErrorKind) -> bool {
RpcErrorKind::ErrorResp(resp) => {
let message = resp.message.to_lowercase();
// if the error message contains "invalid chain", it's not retryable
!message.contains("invalid chain")
!(message.contains("invalid chain") || message.contains("invalid opcode"))
}
_ => true,
}
Expand Down Expand Up @@ -323,3 +323,16 @@ impl SubmissionResult {
}
}
}

pub fn is_unsupported_eip1559_error(error: &RpcError<TransportErrorKind>) -> bool {
if let RpcError::UnsupportedFeature(_) = error {
return true;
}

if let RpcError::ErrorResp(resp) = error {
let message = resp.message.to_lowercase();
return message.contains("method not found");
}

false
}
11 changes: 4 additions & 7 deletions executors/src/eoa/worker/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ use engine_core::{
};

use crate::eoa::{
EoaTransactionRequest,
store::{
BorrowedTransaction, BorrowedTransactionData, PendingTransaction, SubmittedNoopTransaction,
},
worker::{
EoaExecutorWorker,
error::{EoaExecutorWorkerError, is_retryable_preparation_error},
},
}, worker::{
error::{is_retryable_preparation_error, is_unsupported_eip1559_error, EoaExecutorWorkerError}, EoaExecutorWorker
}, EoaTransactionRequest
};

// Retry constants for preparation phase
Expand Down Expand Up @@ -199,7 +196,7 @@ impl<C: Chain> EoaExecutorWorker<C> {
}
Err(eip1559_error) => {
// Check if this is an "unsupported feature" error
if let RpcError::UnsupportedFeature(_) = &eip1559_error {
if is_unsupported_eip1559_error(&eip1559_error) {
tracing::debug!("EIP-1559 not supported, falling back to legacy gas price");

// Fall back to legacy gas price only if no gas price is set
Expand Down