Description
Handle PENDING and NOT_FOUND statuses in the poll_until_confirmed loop. These are expected intermediate states during transaction confirmation.
Current Behavior
poll_until_confirmed in submit.rs matches on transaction status. PENDING and NOT_FOUND are handled by the default _ => arm, which logs and sleeps.
Desired Behavior
Explicitly match PENDING and NOT_FOUND with dedicated log levels:
PENDING: tracing::debug! with attempt count and next backoff
NOT_FOUND: tracing::debug! with attempt count — this is normal for very recent transactions
- Both should continue the poll loop with exponential backoff
Implementation Details
In poll_until_confirmed, replace the _ => arm with explicit matches:
"PENDING" | "NOT_FOUND" => {
tracing::debug!(
hash,
status = result.status,
attempt,
max_attempts = MAX_POLL_ATTEMPTS,
next_backoff_ms = backoff_ms,
"transaction still pending"
);
sleep_ms(backoff_ms).await;
backoff_ms = (backoff_ms * 2).min(30_000);
}
- Keep exponential backoff: 1s, 2s, 4s, ... capped at 30s
- Max attempts: 10
- Log at
debug level (not warn — these are expected states)
Acceptance Criteria
Description
Handle
PENDINGandNOT_FOUNDstatuses in thepoll_until_confirmedloop. These are expected intermediate states during transaction confirmation.Current Behavior
poll_until_confirmedinsubmit.rsmatches on transaction status.PENDINGandNOT_FOUNDare handled by the default_ =>arm, which logs and sleeps.Desired Behavior
Explicitly match
PENDINGandNOT_FOUNDwith dedicated log levels:PENDING:tracing::debug!with attempt count and next backoffNOT_FOUND:tracing::debug!with attempt count — this is normal for very recent transactionsImplementation Details
In
poll_until_confirmed, replace the_ =>arm with explicit matches:debuglevel (notwarn— these are expected states)Acceptance Criteria
PENDINGstatus logs at debug level and continues pollingNOT_FOUNDstatus logs at debug level and continues pollingMAX_POLL_ATTEMPTS, returnsSubmitError::PollTimeout