Skip to content

Commit 9913fda

Browse files
authored
Reduce nack durations in EIP-7702 executor and EOA worker error handling (#44)
- Updated the nack durations for various error handling scenarios in the EIP-7702 executor's confirm module, decreasing wait times from 10 seconds to 2 seconds and from 2 seconds to 1 second. - Adjusted the nack duration in the EOA worker for work remaining errors from 2 seconds to 200 milliseconds. These changes aim to improve responsiveness in error handling and reduce overall latency in transaction processing.
1 parent 1453e7a commit 9913fda

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

executors/src/eip7702_executor/confirm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ where
214214
Eip7702ConfirmationError::TransactionHashError {
215215
message: e.to_string(),
216216
}
217-
.nack(Some(Duration::from_secs(10)), RequeuePosition::Last)
217+
.nack(Some(Duration::from_secs(2)), RequeuePosition::Last)
218218
}
219219
})?;
220220

@@ -232,7 +232,7 @@ where
232232
return Err(Eip7702ConfirmationError::TransactionHashError {
233233
message: "Transaction not yet confirmed".to_string(),
234234
})
235-
.map_err_nack(Some(Duration::from_secs(2)), RequeuePosition::Last);
235+
.map_err_nack(Some(Duration::from_secs(1)), RequeuePosition::Last);
236236
}
237237
};
238238

@@ -253,7 +253,7 @@ where
253253
message: format!("Failed to get transaction receipt: {e}"),
254254
inner_error: Some(e.to_engine_error(&chain)),
255255
}
256-
.nack(Some(Duration::from_secs(5)), RequeuePosition::Last)
256+
.nack(Some(Duration::from_secs(1)), RequeuePosition::Last)
257257
})?;
258258

259259
let receipt = match receipt {
@@ -264,7 +264,7 @@ where
264264
message: "Transaction not mined yet".to_string(),
265265
transaction_hash,
266266
})
267-
.map_err_nack(Some(Duration::from_secs(2)), RequeuePosition::Last);
267+
.map_err_nack(Some(Duration::from_secs(1)), RequeuePosition::Last);
268268
}
269269
};
270270

executors/src/eoa/worker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ where
210210

211211
if result.is_work_remaining() {
212212
Err(EoaExecutorWorkerError::WorkRemaining { result })
213-
.map_err_nack(Some(Duration::from_secs(2)), RequeuePosition::Last)
213+
.map_err_nack(Some(Duration::from_millis(200)), RequeuePosition::Last)
214214
} else {
215215
Ok(result)
216216
}

0 commit comments

Comments
 (0)