You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
topUp re-send on replacement transaction underpriced can double-escrow under a gateway retry #2565
send_top_up (crates/client/src/buyer_pool.rs) re-sends a topUp on a fresh pending nonce when the submit is answered replacement transaction underpriced (decdn_incentive::tx::is_nonce_collision). The answering backend holds a different transaction at the nonce, so that backend broadcast nothing of this send. That does not hold for the network:
A load-balancing gateway forwards our topUp at nonce N to backend A. A accepts it, and the response is lost.
A same-key transaction at N (a node's seller redemption, which signs with the same operator key) reached backend B first.
The gateway retries our signed bytes on B, which answers replacement transaction underpriced.
send_top_up releases the TopUpUnconfirmed entry and re-sends at N+1.
If A's copy wins nonce N, both topUps mine and the pool escrows twice; the first one is untracked.
It needs a gateway retry and a concurrent same-key transaction on another backend at once, so it is narrow. On a sequencer chain (Arbitrum, anvil) a same-key collision is mostly answered nonce too low, which #2563 treats as possibly broadcast, so this re-send rarely runs there.
Options:
Treat replacement transaction underpriced as possibly broadcast too (TopUpUnconfirmed at N, settled by the node against the chain) and delete the re-send loop (TOPUP_NONCE_RETRIES, TOPUP_NONCE_BACKOFF, the ended select) and its tests.
Keep the re-send, but sign locally first so the hash is known, and check that hash (pending pool / receipt) before re-sending on a fresh nonce.
Activity
fix(incentive): report a `nonce too low` send as possibly broadcast (#…
fix(incentive): report a `nonce too low` send as possibly broadcast (#…
fix(client): report an underpriced-replacement answer as possibly bro…