Repository navigation
fix(incentive): treat an "already known" send rejection as possibly broadcast - #2560
Merged
Merged
Conversation
…roadcast send_broadcast_unknown treated every JSON-RPC error response as a clean rejection. `already known` (geth, reth, Nitro) and `known transaction` (older geth) mean the node already holds this signed tx, so it may still mine. Those messages now classify as maybe-broadcast; `unknown transaction ...` and every other rejection stay definite. is_nonce_collision does not match them, so topUp never re-sends them on a fresh nonce. Closes #2432 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 3 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
…end docs The SendOutcome, send and send_for_receipt comments said only a transport-class failure leaves the broadcast unknown. An `already known` answer does too (#2432). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ller Adds caller-level tests for #2432: openPool keeps OpenUnconfirmed, topUp keeps TopUpUnconfirmed and reads no fresh nonce, approve says the tx may be pending, closePool carries TxUnconfirmed and counts as unconfirmed, and send_for_receipt sets MaybeBroadcast with its warning (and Rejected, with none, for any other rejection). The matcher test gains a prefixed `known transaction` case. The docs, comments, operator log lines, runbook and ADR text that said a no-hash submit means a transport failure now name the already-known case too. A no-hash send reports that the tx may be in a mempool, and the approve note says a re-approve to the same value is harmless. The CHANGELOG entry lists every chain write the verdict reaches. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
approved these changes
Oct 20, 2026
yigitdot
added a commit
that referenced
this pull request
Oct 20, 2026
…2562) Fold `nonce too low` into send_broadcast_unknown, as #2560 did for `already known`: every chain write (send_for_receipt, pool close/reclaim, approve, publish) now reports it as MaybeBroadcast, and open_pool / send_top_up need no separate check. is_nonce_spent goes away. Narrow is_nonce_collision's safety claim to the answering backend and point at #2565 for the remaining gateway-retry risk of the underpriced re-send. Add a test for `nonce too low` after a collision re-send, and fix review comments on the docs and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
pushed a commit
that referenced
this pull request
Oct 20, 2026
…2562) (#2563) * fix(client): keep an openPool/topUp answered `nonce too low` unconfirmed (#2562) A gateway that retries the same signed bytes on a second backend gets `nonce too low` once the first copy is sequenced. is_nonce_collision read that as a foreign collision that broadcast nothing, so topUp re-sent on a fresh nonce and openPool released its entry: either could escrow twice. is_nonce_collision now matches only `replacement transaction underpriced`; the new is_nonce_spent matches `nonce too low`, which open_pool and send_top_up treat as possibly broadcast at the pinned nonce. Closes #2562 Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(incentive): report a `nonce too low` send as possibly broadcast (#2562) Fold `nonce too low` into send_broadcast_unknown, as #2560 did for `already known`: every chain write (send_for_receipt, pool close/reclaim, approve, publish) now reports it as MaybeBroadcast, and open_pool / send_top_up need no separate check. is_nonce_spent goes away. Narrow is_nonce_collision's safety claim to the answering backend and point at #2565 for the remaining gateway-retry risk of the underpriced re-send. Add a test for `nonce too low` after a collision re-send, and fix review comments on the docs and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tx::send_broadcast_unknowntreated every JSON-RPC error response as a clean rejection.already known/known transactionmeans the node already holds this signed tx (for example after a gateway retriedeth_sendRawTransactionon a second backend), so the tx may still mine.unknown transaction …excluded) now classify as maybe-broadcast. Every caller picks this up:pool close/reclaimwarn and--allcounts the poolunconfirmed,send_for_receiptsetsMaybeBroadcast(publish statuses, key rotation, bond/register/appeal),open_pool/top_upkeepOpenUnconfirmed/TopUpUnconfirmed, andapprovesays the tx may be pending.is_nonce_collisionis unchanged and does not match them, sotopUpnever re-sends such a tx on a fresh nonce.docs/runbook.md,docs/sponsord/operator.mdandadr/appendix-observability.mdthat said a no-hash submit means a transport failure now name the already-known case. A no-hash send now says the tx "may be in a mempool"; theapprovenote says a re-approve to the same value is harmless.nonce too lowrace is out of scope here (buyer_pool: a gateway-retried openPool/topUp answerednonce too lowis treated as a foreign collision and double-escrows #2562 / fix(incentive): report anonce too lowsend as possibly broadcast (#2562) #2563).Test plan
tx::tests: classifier (incl. a prefixedknown transaction),send_for_receipt→MaybeBroadcastwith warning /Rejectedwithoutbuyer_pool::tests: already-knownopenPoolkeepsOpenUnconfirmed;topUpkeepsTopUpUnconfirmedand reads no fresh nonce;approvesays it may be pendingpool::tests: already-knownclosePoolcarriesTxUnconfirmedand tallies as unconfirmedErrorResparm tofalsefails all 6 new testscargo nextest run -p decdn-incentive -p decdn-client -p decdn-cli -p sponsord-core(2339 passed),-p decdn-node buyer_pool(117 passed)cargo fmt -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo docgateCloses #2432
🤖 Generated with Claude Code