Skip to content

Add test coverage for bump fee calculation failure in feebumper #34902

Closed

Description

@rkrux

Motivation

There is no test coverage for the error here:

if (!combined_bump_fee.has_value()) {
errors.push_back(Untranslated(strprintf("Failed to calculate bump fees, because unconfirmed UTXOs depend on an enormous cluster of unconfirmed transactions.")));
}

Lack of coverage can be seen for line 85 (currently) here: https://maflcko.github.io/b-c-cov/total.coverage/src/wallet/feebumper.cpp.gcov.html

Possible solution

A functional test using the bumpfee RPC can be a possible solution.
There is a wallet_bumpfee test file that has a good amunt of tests, which can be referred to come up with a solution.

Useful Skills

  • Compiling Bitcoin Core from source
  • Running the C++ unit tests and the Python functional tests
  • Wallet transaction creation
  • Handling unconfirmed UTXOs while creating and bumping wallet transactions
  • Fee rate and mempool fee environment theoretical knowledge

Guidance for new contributors

Want to work on this issue?

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

Activity

  1. aya119119 commented on Mar 23, 2026

    @aya119119

    eloo I'de take this onee

  2. furszy commented on Mar 23, 2026

    @furszy
    Member

    @aya119119 awesome, welcome to Core. Feel free to tag me when you create the PR for it.

  3. Crystora commented on Mar 25, 2026

    @Crystora

    @rkrux @furszy Can I also contribute, too?

  4. mkdev5 commented on Mar 26, 2026

    @mkdev5

    @aya119119 @furszy I opened a PR to fix this issue. please review it and share your feedback. 🙏

  5. carloantinarella commented on Mar 26, 2026

    @carloantinarella
    Contributor

    @rkrux you are suggesting to develop a functional test to be added to wallet_bumpfee.py. I don’t think it is possible to have a cluster with more than 500 transactions without exceeding the hardcoded limit MAX_CLUSTER_COUNT_LIMIT{64} set in txgraph.h, am I right?

    sendrawtransaction RPC should return too-large-cluster.

  6. added 5 commits that reference this issue on Mar 31, 2026
    e991d5b
    b5dbe4a
  7. reza6ix commented on Apr 4, 2026

    @reza6ix

    I'd like to take a look at this. I'm currently setting up my local build with bitcoind and the test framework. I have experience with [C++/Python] and I've been contributing to other high-scale projects like Dify.

    I'll investigate the current test coverage in feebumper.cpp and see where the failure case needs to be added to the functional tests. I'll follow up with a PR or questions once I have the reproduction running

  8. maflcko commented on Apr 7, 2026

    @maflcko
    Member

    Removing the good first issue label, because it encourages llm bots to create duplicates

  9. 151henry151 commented on Jun 6, 2026

    @151henry151
    Contributor

    Opened #35472 for this — a functional test in wallet_bumpfee.py as requested.

    Earlier attempts (#34924, #34961, and a few duplicates) closed without landing. The closest functional one, #34961, calls bumpfee without an explicit fee_rate, which skips CheckFeeRate() — the path fixed in #34870 — and likely hits the same error from coin selection in spend.cpp instead. This test passes fee_rate and uses a short setup (create the bumped tx while clusters are still small, evict it from the mempool before growing them to 8×64) so we actually exercise the intended RPC path rather than accidentally merging clusters or failing earlier during tx creation.

    Reviews welcome.

  10. added a commit that references this issue on Sep 14, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions