Skip to content

node+contracts: make redeemMany skip failing claims, then remove the node's revert bisection #2857

Open

Description

@yigitdot

Today one failing claim reverts the whole redeemMany call, so the node bisects a reverted chunk down to the single failing claim (#2854). That is a workaround for the contract's all-or-nothing revert. It costs about 9 extra paying transactions and ~19 RPC calls per sweep per bad claim, plus log noise.

Proposal: extend the contract's existing skip rule to the claim-specific reverts, and delete the node's revert bisection. The oversize split stays (transport limit, not a revert).

What must land together:

  1. Contract: InvalidCapabilitySignature, InvalidVoucherSignature, BadPreimage, ChainMeterReservedNonZero and ClaimOverflow become skips with a reason code (return codes, not try/catch), reported in a ClaimsRejected(address indexed provider, Rejected[] items) event, each item { poolId, signer, reason }.
  2. PoolClosed becomes a per-pool skip, so one closing pool does not block the other pools in the chunk.
  3. Node reads ClaimsRejected from the receipt: a tx with a rejected claim still counts as landed; count it, warn with the lane, ideally quarantine the lane.
  4. Any remaining revert (ProviderNotBound, paused FeeRouter) is batch-wide: warn, leave claims for the next sweep, do not split.

Also: Solidity tests, updated gas snapshot, contract size check, regenerated bindings, update the "rolls back everything" wording in ADR 003 (Batch redemption) and the redeemMany NatSpec, and a Sepolia redeploy.

Order: open the contract PR first, redeploy and verify, then add the node event handling, and delete the bisection LAST. Until the redeployed contract is verified, the deployed contract still reverts on one bad claim, so removing bisection early would bring back the bug #2854 fixes.

Security notes: skipped claims write no state (watermark, spent, totalRedeemed advance only on paid vouchers), so no new double-pay, replay or reentrancy risk; redeemMany pays only msg.sender, so no griefing. Only the node fills the redeem queue, so failing claims are low risk as an attack and medium as misconfiguration.

Related: #2854. Priority: medium, not blocking #2854.

Activity

  1. added
    kind:feature
    prio:medium
    area:contracts
    area:node
    area:payments
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:contractsarea:nodearea:paymentskind:featureprio:medium

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions