Repository navigation
Description
Problem
decdn_incentive::tx::send_broadcast_unknown (crates/incentive/src/tx.rs) treats every RpcError::ErrorResp as a definite rejection that broadcast nothing. One JSON-RPC error breaks that rule: already known (geth and reth; other clients use a similar known transaction text). The node returns it when the same signed transaction is already in its mempool.
A send can get this answer after the first copy reached the mempool. For example:
- A load-balancing RPC gateway retries
eth_sendRawTransactionagainst a second backend after the first backend accepted it. - A client-side retry layer re-sends the same raw transaction after a lost response.
The tx is then in flight, but the CLI reports a plain rejection with no warning:
pool close/pool reclaimprint "send failed" with no broadcast note.pool close --all/reclaim --allcount the pool asfailed, notunconfirmed(fix: pool batch summary counts a maybe-broadcast tx as failed #2427).tx::send_for_receiptsetsSendOutcome::Rejected, andopen_pool/top_updo not attachOpenUnconfirmed/TopUpUnconfirmed.
An operator who re-runs can then double-submit. For closePool or reclaim the second tx only reverts. For openPool or topUp, a second escrow is possible.
We have not seen this on the testnet RPC (dRPC) yet. It is a gap in the classifier, not an observed incident.
Fix
In send_broadcast_unknown, return true for an ErrorResp whose message matches already known or known transaction (case-insensitive). The tx is in a mempool, so it is "may still mine", not "rejected". Keep every other ErrorResp as a rejection.
Checks
- Unit tests in
crates/incentive/src/tx/tests.rs: anErrorRespwithalready knownand one withknown transaction→true.nonce too lowandinsufficient funds→false. is_nonce_collisiondoes not matchalready known, because that send must not be retried on a fresh nonce.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
docs(incentive): name the already-known case in the SendOutcome and s…
test(client,cli,incentive): pin the already-known verdict at every ca…
fix(incentive): treat an "already known" send rejection as possibly b…