Skip to content

RBF logic fails to reap stale outstanding TXs if RBF limit had been reached  #2644

Closed
@kantai

Description

@kantai

A testnet miner ended up stalling seemingly due to an issue in the RBF logic.

I believe the relevant code is here:

https://github.com/blockstack/stacks-blockchain/blob/67dccdf6d1c28e482d3d71eb616cf8682dac863d/testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs#L1033-L1073

In the first code block: we check if an outstanding TX has been committed.
In the second code block: we check if we're already exceeding the RBF limit.
In the third code block: we check if we should abandon any outstanding TXs because they've been reorged or stale.

I think that in the following scenario:

  • Outstanding TXs cause the miner to reach the "RBF limit"
  • Those outstanding TXs are reorged or never mined

The second code block would prevent the miner from ever getting to the third block and therefore some stale outstanding TXs would prevent the miner from ever producing a new commitment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnwanted or unintended property causing functional harmlockedmining

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions