wallet: Delete `removeprunedfunds` and delete transaction delete code #36333

pull davidgumberg wants to merge 4 commits into bitcoin:master from davidgumberg:2026-09-24-removetxremoval changing 11 files +7 −230
  1. davidgumberg commented at 12:54 AM on September 25, 2026: contributor

    Deprecated in v32 (https://github.com/bitcoin/bitcoin/pull/35605), this deletes the useless and harmful removeprunedfunds RPC.

    It also removes deleting of watchonly transactions from the not-watchonly migrated wallet, which in theory we should clean up, but in practice this does nothing for the user, the only observable change is that if the user knows the txid they can do gettransaction and the migrated wallet will return the transaction information even though it does not have keys for the transaction, AFAICT for both GUI and RPC having irrelevant transactions inside of wallet is harmless and does not affect the output of anything, since most stuff is gated behind IsMine() anyways.

    Removing both the RPC and the deletion of watchonly tx'es allows deleting the logic for transaction removal and the associated tests.

    LLM Disclosure: Not used to write this PR or PR description, but I recently replaced clang on my machine with gemma-4-26B directly generating machine code.

  2. DrahtBot renamed this:
    wallet: Delete `removeprunedfunds` and delete transaction delete code
    wallet: Delete `removeprunedfunds` and delete transaction delete code
    on Sep 25, 2026
  3. DrahtBot added the label Wallet on Sep 25, 2026
  4. DrahtBot commented at 12:54 AM on September 25, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK w0xlt

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36481 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36481.svg"></sub> (wallet, rpc, gui: Allow users to manually rebroadcast a wallet transaction by achow101)
    • #36440 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36440.svg"></sub> (test: speed up functional tests by removing avoidable waits by ViniciusCestarii)
    • #36257 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36257.svg"></sub> (qa: assert_equals -> assert_true/assert_false by hodlinator)
    • #36167 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> ([RFC] Enable -Wunused by fanquake)
    • #36068 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36068.svg"></sub> (fuzz: reuse one fuzzed wallet across inputs by brunoerg)
    • #35786 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35786.svg"></sub> (wallet: drop spent parents redundant cache invalidation and notification by furszy)
    • #35569 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35569.svg"></sub> (Encapsulation for CTransaction by purpleKarrot)
    • #35302 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35302.svg"></sub> (Silent Payments: Sending (take 2) by Eunovo)
    • #34909 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34909.svg"></sub> (wallet, refactor: modularise wallet by extracting out legacy wallet migration by rkrux)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. davidgumberg force-pushed on Sep 25, 2026
  6. DrahtBot added the label CI failed on Sep 25, 2026
  7. DrahtBot commented at 12:59 AM on September 25, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/36079638513/job/107898503317</sub> <sub>LLM reason (✨ experimental): CI failed due to ruff Python lint errors (F401 unused imports) in test/functional/rpc_deprecated.py and test/functional/wallet_importprunedfunds.py.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  8. in src/wallet/rpc/wallet.cpp:1072 in 34f9514634 outdated
    1068 | @@ -1069,7 +1069,6 @@ RPCMethod walletdisplayaddress();
    1069 |  
    1070 |  // backup
    1071 |  RPCMethod importprunedfunds();
    1072 | -RPCMethod removeprunedfunds();
    


    crooksmadison69-cmd commented at 1:17 AM on September 25, 2026:

    Gettransaction

  9. bitcoin blocked a user on Sep 25, 2026
  10. DrahtBot removed the label CI failed on Sep 25, 2026
  11. maflcko added this to the milestone 33.0 on Sep 25, 2026
  12. DrahtBot added the label Needs rebase on Sep 26, 2026
  13. w0xlt commented at 1:30 AM on September 30, 2026: contributor

    Concept ACK

  14. davidgumberg force-pushed on Oct 9, 2026
  15. davidgumberg commented at 1:05 AM on October 9, 2026: contributor

    Rebased to fix merge conflicts.

  16. wallet: rpc: Delete removeprunedfunds 045a0c0c58
  17. wallet: migration: don't prune unnecessary tx'es from DB
    While this is nice in theory, it accomplishes very little in practice
    for the user, and deleting this allows removal of all transaction
    deleting logic.
    b43647960e
  18. wallet: qa: Prune unused functions for tx removal
    There is never a good reason to delete tx data from a wallet, so delete
    these functions.
    c7dfd82edb
  19. doc: release note for removeprunedfunds rpc deletion 360625ff4e
  20. davidgumberg force-pushed on Oct 9, 2026
  21. DrahtBot added the label CI failed on Oct 9, 2026
  22. DrahtBot commented at 1:18 AM on October 9, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/37868051410/job/113619418552</sub> <sub>LLM reason (✨ experimental): CI failed because Ruff’s Python lint check found an unused find_vout_for_address import in test/functional/wallet_importprunedfunds.py.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  23. DrahtBot removed the label Needs rebase on Oct 9, 2026
  24. DrahtBot removed the label CI failed on Oct 9, 2026
  25. DrahtBot added the label Needs rebase on Oct 13, 2026
  26. DrahtBot commented at 2:13 AM on October 13, 2026: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-18 10:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me