Skip to content

Commit 172491e

Browse files
authored
Enhance error handling for oversized transactions in EoaExecutorWorker (#37)
* Enhance error handling for oversized transactions in EoaExecutorWorker - Added a specific error case to handle oversized transaction data during gas estimation, ensuring that such transactions are correctly identified as fundamentally broken and fail the individual transaction rather than the worker. This improves the robustness of transaction simulation error handling. * Enhance error classification for transaction failures in EoaExecutorWorker - Added handling for oversized transaction errors in the `classify_send_error` function, ensuring that such cases are classified as deterministic failures. This improves the accuracy of error handling during transaction processing.
1 parent f3d700a commit 172491e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

executors/src/eoa/worker/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ pub fn classify_send_error(
185185
if error_str.contains("malformed")
186186
|| error_str.contains("gas limit")
187187
|| error_str.contains("intrinsic gas too low")
188+
|| error_str.contains("oversized")
188189
{
189190
return SendErrorClassification::DeterministicFailure;
190191
}

executors/src/eoa/worker/transaction.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,16 @@ impl<C: Chain> EoaExecutorWorker<C> {
335335
),
336336
inner_error: e.to_engine_error(&self.chain),
337337
});
338+
} else if error_payload.message.to_lowercase().contains("oversized") {
339+
// This is an oversized transaction - the transaction is fundamentally broken
340+
// This should fail the individual transaction, not the worker
341+
return Err(EoaExecutorWorkerError::TransactionSimulationFailed {
342+
message: format!(
343+
"Transaction data is oversized during gas estimation: {}",
344+
error_payload.message
345+
),
346+
inner_error: e.to_engine_error(&self.chain),
347+
});
338348
}
339349
}
340350

0 commit comments

Comments
 (0)