From 59bf56a506a46a2c3b43b6dac25b5c35d3527f21 Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Thu, 28 Aug 2025 20:31:18 +0530 Subject: [PATCH] Enhance error handling in EIP-7702 executor for transaction hash retrieval - Updated error handling logic to differentiate between error responses and other errors when fetching transaction hashes from the bundler. - Improved the failure response mechanism by implementing specific handling for error responses, allowing for more granular control over job failures and retries. These changes enhance the robustness of the EIP-7702 executor's error management during transaction hash retrieval. --- executors/src/eip7702_executor/confirm.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/executors/src/eip7702_executor/confirm.rs b/executors/src/eip7702_executor/confirm.rs index fb3eb55..e8b213e 100644 --- a/executors/src/eip7702_executor/confirm.rs +++ b/executors/src/eip7702_executor/confirm.rs @@ -1,6 +1,7 @@ use alloy::primitives::TxHash; use alloy::providers::Provider; use alloy::rpc::types::TransactionReceipt; +use alloy::transports::RpcError; use engine_core::error::{AlloyRpcErrorToEngineError, EngineError}; use engine_core::rpc_clients::TwGetTransactionHashResponse; use engine_core::{ @@ -204,11 +205,19 @@ where error = ?e, "Failed to get transaction hash from bundler" ); - Eip7702ConfirmationError::TransactionHashError { - message: e.to_string(), + + if e.is_error_resp() { + Eip7702ConfirmationError::TransactionHashError { + message: e.to_string(), + } + .fail() + } else { + Eip7702ConfirmationError::TransactionHashError { + message: e.to_string(), + } + .nack(Some(Duration::from_secs(10)), RequeuePosition::Last) } - }) - .map_err_nack(Some(Duration::from_secs(10)), RequeuePosition::Last)?; + })?; let transaction_hash = match transaction_hash_res { TwGetTransactionHashResponse::Success { transaction_hash } => {