Skip to content

fix: daemon can escrow a second deposit after an openPool receipt failure #2415

Closed

Description

@thiras

Problem

run_open (crates/node/src/buyer_pool.rs, ~L2247) can open a second pool while the first openPool may still mine.

  1. open_pool returns PoolOpenFailureReason::RpcError when the receipt read fails after broadcast. The tx can still mine and escrow the deposit. The error names the tx (fix: four pool tx sites lose the tx hash when the receipt fetch fails #2413).
  2. run_open logs the error and returns. The open slot is released.
  3. The next cache miss claims the slot. The re-check under the slot reads only the local store. The store has no row for the in-flight open, so the node calls openPool again.
  4. If the first tx mines, the owner holds two funded pools. Only one is tracked.

Chain reconciliation (reconcile_owned_pool, ~L697) runs only at bootstrap. report_stranded_pools names the extra pool only at the next restart.

A transport-class send failure (no hash captured, may have broadcast) has the same effect.

Fix options

  • Keep the open slot, or a persisted "pending open tx" marker, until the hash resolves (receipt found, or the tx is dropped from the mempool).
  • Or, after an RpcError open, call getPools for the owner before the next openPool, and adopt a pool that appeared. reconcile_owned_pool already does this at bootstrap.

Related

#1143 (the unbounded wait and the open slot), #2072 (adoption at bootstrap), #2413 (the tx hash in the error).

Checks

  • A test where open_pool fails with RpcError after broadcast, and the next open attempt does not send openPool while the first tx is unresolved.

Activity

  1. added
    kind:bug
    prio:high
    on Oct 10, 2026
  2. self-assigned this
    on Oct 10, 2026
  3. added
    area:node
    area:payments
    on Oct 10, 2026
  4. assigned and unassigned on Oct 10, 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:bugprio:high

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions