Skip to content

node: seller lane state collides across PaymentPool redeploys (lane_state_v1 keyed without the contract address) #2181

Closed

Description

@yigitdot

What

Seller-side lane rows carry no PaymentPool deployment tag, so a provider repointed at a redeployed PaymentPool keeps treating a returning buyer's new pool as the old one.

Why

poolId = keccak256(owner, ownerPoolNonce) carries neither the contract address nor the chain id, and a redeploy restarts every owner's nonce. A buyer's Nth pool on the new deployment therefore has the same id as its Nth pool on the old one. #2087 closed this on the buyer side (BuyerPoolState::payment_pool, drop_foreign_row at bootstrap). The seller side has no equivalent:

  • lanes.redb lane_state_v1 is keyed pool_id ‖ signer ‖ provider (crates/node/src/channel_store.rs, lane_key_bytes). The record holds the old deployment's frontier, signature, capability and owner_sig, and hydrate_lanes loads it at boot with no chain check.
  • ClientHandler::register_lane returns early when the key exists, so the new pool's capability intake never resets the lane.
  • The PoolOpened watcher checkpoint (watcher_checkpoint_v1) is a bare block number, likewise unscoped.

Traced effect after a seller is repointed with its data dir intact:

  1. The buyer's first voucher on the new deployment counts from zero, below the stored frontier. The seller rejects it AmountRegression with a resume bundle signed under the old deployment's EIP-712 domain.
  2. A node buyer cannot verify that bundle under the new domain, discards it, and classifies the pull OurDeadLane — suppressing the provider for an hour, repeatedly. A buyer that folded the bundle would sign old + new against a contract whose watermark is zero, and over-pay.
  3. The seller's redeemer values the lane at the old claim and submits the stale voucher to the new contract. Once the colliding pool exists there it reverts (InvalidCapabilitySignature / InvalidVoucherSignature), and because it rides a redeemMany batch it takes the batch's other lanes down with it on every sweep.

Expected

Seller lane rows (and the tables keyed the same way) record the PaymentPool they were written against, and a row from another deployment is dropped or ignored at boot — the seller-side twin of drop_foreign_row. Pre-launch rules: change the format, no migration.

Acceptance

crates/e2e/tests/node_pull_pool_redeploy.rs (#2088) serves the redeploy leg from a fresh seeder bound to the new deployment, to keep the buyer-side assertions independent of this bug. A variant that repoints the original seeder, data dir intact, passes.

Activity

  1. self-assigned this
    on Sep 27, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
    8022189
    13f4cf6
  3. added
    kind:bug
    area:node
    area:payments
    rust
    prio:medium
    on Sep 29, 2026
  4. added 2 commits that reference this issue on Sep 29, 2026
    4dfc703
    49e511d
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:bugprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions