Skip to content

node: a redeemMany or reclaim send whose request failed in transport is counted as refused, not possibly broadcast #2568

Closed

Description

@thiras

Problem

The node's seller and reclaim sends run on a provider that carries decdn_incentive::tx::SendLegLayer (#2567), but nothing in crates/node reads the marker. onchain_tx::TxOutcome::SendErr (crates/node/src/onchain_tx.rs:63) documents every failed .send() as "no transaction was issued", and both callers treat it that way:

  • payment_settlement::submit_chunk (crates/node/src/payment_settlement.rs:2115, :2156-2158): a redeemMany whose send request failed in transport (timeout, reset, HTTP 5xx after the node may have accepted it) logs redeemMany send failed; leaving claims for retry and is_redemption_failure (:2204) counts it into decdn_redemption_failures_total as a definite refusal.
  • The reclaim sweep (crates/node/src/buyer_pool.rs:3886) logs a failed reclaim send the same way.

A redeemMany that did reach a mempool then mines while the node believes nothing was sent. The re-send goes out at a fresh nonce with cumulative vouchers, so the cost is a reverted or no-op transaction and its gas rather than a double spend, but the operator log and the metric misreport a possibly-broadcast transaction as refused, and the "may have broadcast" note the CLI and the buyer side give is absent here.

Fix

Split TxOutcome::SendErr by decdn_incentive::tx::send_broadcast_unknown (or SendLegFailure::from_error): a rejected send keeps today's log and counter; a send whose broadcast is unknown logs that the transaction may be in a mempool, counts into its own counter (or decdn_onchain_tx_send_failed_total with a sibling, per the metrics convention of one unlabeled counter per reason), and is_chain_fault / is_redemption_failure treat it as a chain fault rather than a redemption failure. Update the SendErr doc and the runtime::ProviderFactory::wallet comment, which says the seller does not read the marker yet.

Done when

  • A mocked redeemMany whose send request fails in transport (filler-free provider with SendLegLayer, empty asserter) logs the may-have-broadcast wording and does not count into decdn_redemption_failures_total; one whose gas estimate fails (provider with with_gas_estimation()) keeps today's behaviour.
  • The same split for the reclaim sweep.
  • adr/appendix-observability.md rows for any new counter.

Related: #2567 (the marker), #2465 (dRPC nonce too low noise on landed redeemMany), #2340 (retry cadence).

Activity

  1. added
    kind:feature
    prio:low
    area:node
    area:payments
    on Oct 20, 2026
  2. self-assigned this
    on Oct 21, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 21, 2026
  4. moved this from In progress to Done in deCDNon Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:paymentskind:featureprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions