wallet: deprecate replaceable argument from transaction (and psbt) creation (and modification) RPCs #35433

pull rkrux wants to merge 8 commits into bitcoin:master from rkrux:deprecaterbf changing 15 files +162 −69
  1. rkrux commented at 3:03 PM on June 1, 2026: contributor

    Fixes #32661.

    The replaceable argument in several wallet RPC requests has been marked deprecated and for now users have the option to use this argument via the -deprecatedrpc=bip125 startup option. Affected RPCs are createrawtransaction, fundrawtransaction, createpsbt, walletcreatefundedpsbt, send, sendtoaddress, sendmany, sendall, bumpfee, and psbtbumpfee.

    This builds upon the existing issue of removing the option for users to signal replaceability because fullrbf is the default policy and prevalent in the network (since bitcoin core v28 was released in late 2024) that makes every transaction replaceable by default, making this user option unnecessary.

  2. DrahtBot commented at 3:04 PM on June 1, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35433.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    Concept ACK polespinasa

    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:

    • #35852 (scripted-diff: Use inline const(expr) over static constexpr in headers by maflcko)
    • #35358 (external signer: verify PSBT is reliable after signing it by brunoerg)

    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-->

    LLM Linter (✨ experimental)

    Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

    • walletcreatefundedpsbt([...], [...], block_height+2, {"add_inputs": True}, False) in test/functional/rpc_psbt.py
    • walletcreatefundedpsbt([], {dest:0.5}, 0, {}, True) in test/functional/wallet_signer.py
    • createrawtransaction(inputs, outputs, 0) in test/functional/wallet_balance.py
    • createrawtransaction([], {target_address: 0.1}, 0) in test/functional/wallet_fundrawtransaction.py

    <sup>2026-08-12 11:44:19</sup>

  3. rkrux commented at 3:08 PM on June 1, 2026: contributor

    I will add test case for bumpfee and psbtbumpfee along with release note.

  4. rkrux renamed this:
    Deprecaterbf
    wallet: deprecate replaceable argument from transaction ( and psbt) creation (and modification) RPCs
    on Jun 1, 2026
  5. DrahtBot added the label Wallet on Jun 1, 2026
  6. rkrux renamed this:
    wallet: deprecate replaceable argument from transaction ( and psbt) creation (and modification) RPCs
    wallet: deprecate replaceable argument from transaction (and psbt) creation (and modification) RPCs
    on Jun 1, 2026
  7. DrahtBot added the label CI failed on Jun 1, 2026
  8. DrahtBot commented at 4:29 PM on June 1, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/26763283466/job/78882570147</sub> <sub>LLM reason (✨ experimental): CI failed because the Python lint (ruff) reported an error—an unused import MAX_BIP125_RBF_SEQUENCE in test/functional/rpc_psbt.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>

  9. rkrux force-pushed on Jun 2, 2026
  10. rkrux commented at 10:03 AM on June 2, 2026: contributor

    I will add test case for bumpfee and psbtbumpfee along with release note.

    Done now.

  11. rkrux force-pushed on Jun 2, 2026
  12. rkrux force-pushed on Jun 2, 2026
  13. rkrux force-pushed on Jun 2, 2026
  14. rkrux force-pushed on Jun 2, 2026
  15. rkrux force-pushed on Jun 2, 2026
  16. DrahtBot removed the label CI failed on Jun 2, 2026
  17. rkrux force-pushed on Jun 5, 2026
  18. rkrux commented at 11:01 AM on June 5, 2026: contributor

    Updated the PR to not depend on #35405, removed the two commit from that PR.

  19. rkrux marked this as ready for review on Jun 5, 2026
  20. rkrux commented at 12:14 PM on June 10, 2026: contributor

    Pushed the last two testing related commits of PR #35442 here as per this review comment #35442 (comment).

    Edit: Reverted as they are dependent on #35405 as well slightly.

  21. rkrux force-pushed on Jun 10, 2026
  22. DrahtBot added the label CI failed on Jun 10, 2026
  23. DrahtBot commented at 12:21 PM on June 10, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/27275445645/job/80555467804</sub> <sub>LLM reason (✨ experimental): CI failed because Python linting reported an error: test_framework.messages is missing MAX_BIP125_RBF_SEQUENCE in test/functional/rpc_psbt.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>

  24. DrahtBot removed the label CI failed on Jun 10, 2026
  25. pablomartin4btc commented at 7:31 PM on June 12, 2026: member

    Edit: Reverted as they are dependent on #35405 as well slightly.

    I think the PR's description needs to be updated again?

  26. in doc/release-notes-34917.md:1 in db831dbde6
       0 | @@ -1,9 +1,23 @@
       1 |  RPC and Startup Option
    


    pablomartin4btc commented at 7:45 PM on June 12, 2026:

    as per #35405...

    Wallet RPC and Startup Option
    

    rkrux commented at 7:51 AM on June 15, 2026:

    Done.

  27. rkrux force-pushed on Jun 15, 2026
  28. rkrux commented at 7:54 AM on June 15, 2026: contributor

    Edit: Reverted as they are dependent on #35405 as well slightly.

    I think the PR's description needs to be updated again?

    The description is fine, it was written before these two commits (now removed) were added in this PR.

  29. rkrux force-pushed on Jun 15, 2026
  30. DrahtBot added the label CI failed on Jun 15, 2026
  31. rkrux commented at 8:44 AM on June 15, 2026: contributor

    Force-pushed to not hardcode replaceable as false in the RPC help sections and CCoinControl objects. Based on the feedback on PR #35405 and the corresponding responses in the ML.

  32. rkrux force-pushed on Jun 15, 2026
  33. rkrux force-pushed on Jun 15, 2026
  34. rkrux commented at 9:03 AM on June 15, 2026: contributor

    Force-pushed to update the rpc_psbt.py test that failed after reverting the default replaceable value to true in createpsbt RPC.

  35. rkrux commented at 9:18 AM on June 15, 2026: contributor
  36. in src/wallet/spend.cpp:1304 in ac6ad606d1


    maflcko commented at 10:55 AM on June 15, 2026:

    ac6ad606d1a10ed9f30433e6d6f038c3a2e39cab: This seems to be the wrong commit/change. It marks the comment why maxint-2 was chosen as deprecated. However, the code here doesn't use a maxint-2 int literals. Instead, the comment should be moved to MAX_BIP125_RBF_SEQUENCE, which picks the int literal.

    In this commit, I guess you wanted to mark m_signal_bip125_rbf or m_signal_rbf as deprecated? If so, it would be better to put the comment change there.


    rkrux commented at 12:28 PM on June 15, 2026:

    Instead, the comment should be moved to MAX_BIP125_RBF_SEQUENCE, which picks the int literal.

    Moved in rbf.h, it does look better as the comment becomes the documentation for this constant highlighting that this value is deprecated/outdated.


    maflcko commented at 1:29 PM on June 15, 2026:

    Sorry, I think I was unclear. What I wanted to say was that the change seems to be unrelated (to this pull request, as well as this commit), so at a minimum, it should be split into a separate commit.

    Marking MAX_BIP125_RBF_SEQUENCE as deprecated is done in #35405, so if that pull request is closed, it doesn't make sense to mark it as deprecated, because it will stay around.

    Also, MAX_BIP125_RBF_SEQUENCE is used in more RPC than just bumpfee, so bundling this change in the commit that changes bumpfee doesn't really make sense.

    So I think this change should be split into a separate commit


    rkrux commented at 2:35 PM on June 15, 2026:

    What I wanted to say was that the change seems to be unrelated (to this pull request, as well as this commit), so at a minimum, it should be split into a separate commit.

    Yeah, it does seem to be a remnant of an outdated version of this PR that was built over #34505.

    Marking MAX_BIP125_RBF_SEQUENCE as deprecated is done in #35405, so if that pull request is closed, it doesn't make sense to mark it as deprecated, because it will stay around.

    Not marked it deprecated now. Maybe later in #35442 when I rework it, let's see.

    Also, MAX_BIP125_RBF_SEQUENCE is used in more RPC than just bumpfee, so bundling this change in the commit that changes bumpfee doesn't really make sense. So I think this change should be split into a separate commit

    Yes, this makes sense. I have separated it out now.


    polespinasa commented at 2:19 PM on July 7, 2026:

    In 3ac9c24124f0722649016a12fdf39eb9a628cd94 wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs

    ~This stills wrong, this PR does not introduce the error, but m_signal_bip125_rbf is an optional, if it is not set, it will set it to true, but if it is explicitly set to false it will be overwritten to true anyway. It should be if (!cc.m_signal_bip125_rbf.has_value())~

    Nevermind, I just got confused, it does not make sense, feel free to resolve the conversation


    rkrux commented at 2:31 PM on July 7, 2026:

    this PR does not introduce the error

    This should be addressed in a separate PR.

  37. rkrux force-pushed on Jun 15, 2026
  38. DrahtBot removed the label CI failed on Jun 15, 2026
  39. rkrux force-pushed on Jun 15, 2026
  40. DrahtBot added the label CI failed on Jun 15, 2026
  41. DrahtBot commented at 4:44 PM on June 15, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task iwyu: https://github.com/bitcoin/bitcoin/actions/runs/27553730406/job/81452610641</sub> <sub>LLM reason (✨ experimental): CI failed because IWYU detected missing/incorrect #includes (failure generated from IWYU) in src/bench/pool.cpp.</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>

  42. rkrux commented at 6:59 AM on June 16, 2026: contributor

    The CI / iwyu (pull_request) failure is unrelated and should have been fixed post #35535.

  43. DrahtBot removed the label CI failed on Jun 16, 2026
  44. achow101 referenced this in commit 93012d7ff9 on Jun 25, 2026
  45. DrahtBot added the label Needs rebase on Jun 26, 2026
  46. rkrux force-pushed on Jun 27, 2026
  47. rkrux commented at 7:36 AM on June 27, 2026: contributor

    Rebased over master to incorporate changes from PR #35543.

  48. DrahtBot removed the label Needs rebase on Jun 27, 2026
  49. in src/wallet/rpc/spend.cpp:231 in 85df2740b1
     227 | @@ -228,7 +228,7 @@ static void SetFeeEstimateMode(const CWallet& wallet, CCoinControl& cc, const Un
     228 |          cc.m_feerate = CFeeRate{AmountFromValue(fee_rate, /*decimals=*/3)};
     229 |          if (override_min_fee) cc.fOverrideFeeRate = true;
     230 |          // Default RBF to true for explicit fee_rate, if unset.
     231 | -        if (!cc.m_signal_bip125_rbf) cc.m_signal_bip125_rbf = true;
     232 | +        if (!cc.m_signal_bip125_rbf) cc.m_signal_bip125_rbf = DEFAULT_WALLET_RBF;
    


    polespinasa commented at 4:58 PM on July 6, 2026:

    in 85df2740b1e2cd6c7ca3e3d19180e707373244ee wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs

    This looks wrong, should be !cc.m_signal_bip125_rbf.hasValue(). As it is if it has value and the value if false it will be overwritten to DEFAULT_WALLET_RBF


    achow101 commented at 8:15 PM on July 6, 2026:

    It should also still be using true, not be changed to DEFAULT_WALLET_RBF as the idea is to unconditionally set it to true, not use the default for the wallet.


    rkrux commented at 11:45 AM on July 7, 2026:

    Reverted

  50. in test/functional/wallet_deprecated_rbf.py:58 in 020560e00a
      56 | +                              self.nodes[0].createrawtransaction, [{'txid': unspent["txid"], 'vout': unspent["vout"], 'sequence': MAX_BIP125_RBF_SEQUENCE+1}], {}, 0, True)
      57 | +
      58 | +      raw_tx_hex = wallet.createrawtransaction(inputs=[unspent], outputs=[{wallet.getnewaddress(): 1}], replaceable=True)
      59 | +      assert_rbf_in_tx_hex(raw_tx_hex)
      60 | +      funded_tx_hex = wallet.fundrawtransaction(raw_tx_hex)["hex"]
      61 | +      assert_rbf_in_tx_hex(raw_tx_hex)
    


    polespinasa commented at 5:00 PM on July 6, 2026:

    in 020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features

    Should be assert_rbf_in_tx_hex(funded_tx_hex) ??


    rkrux commented at 11:45 AM on July 7, 2026:

    Fixed

  51. in test/functional/wallet_deprecated_rbf.py:5 in 020560e00a outdated
       1 | @@ -2,8 +2,9 @@
       2 |  # Copyright (c) 2026-present The Bitcoin Core developers
       3 |  # Distributed under the MIT software license, see the accompanying
       4 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       5 | -"""Test deprecation of RPC calls."""
       6 | -from test_framework.util import assert_equal
       7 | +"""Test deprecation of wallet RBF RPCs and startup options."""
    


    polespinasa commented at 5:02 PM on July 6, 2026:

    in 020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features

    nit: we use 4 spaces for indentation, this test uses 3.

  52. polespinasa commented at 5:05 PM on July 6, 2026: member

    concept ACK

    reviewed 020560e00a4b49e5ceb4365def4f2e07b60eee57

    The code looks good, but I think the way it is done the deprecation might be invisible for the users. If a user does add a replaceable argument but does not enable the deprecated flag it will be ignored without the user noticing.

    I think all deprecated fields should throw if used when the deprecated flag is not set.

    in 020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features The test only checks the replaceable=True, does not check for replaceable=False.

  53. in src/wallet/rpc/spend.cpp:1050 in 85df2740b1
    1046 | @@ -1047,7 +1047,7 @@ static RPCMethod bumpfee_helper(std::string method_name)
    1047 |  
    1048 |      CCoinControl coin_control;
    1049 |      // optional parameters
    1050 | -    coin_control.m_signal_bip125_rbf = true;
    1051 | +    coin_control.m_signal_bip125_rbf = DEFAULT_WALLET_RBF;
    


    achow101 commented at 8:16 PM on July 6, 2026:

    In 85df2740b1e2cd6c7ca3e3d19180e707373244ee "wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs"

    This should not be changed


    rkrux commented at 11:45 AM on July 7, 2026:

    Reverted

  54. in doc/release-notes-34917.md:1 in c2515fc66f
       0 | @@ -1,9 +1,23 @@
       1 | -RPC and Startup Option
       2 | +Wallet RPC and Startup Option
    


    achow101 commented at 8:19 PM on July 6, 2026:

    In c2515fc66fb5b91dce6552e79286b6117dbd68df "doc: update release notes of 34917 mentioning replaceable deprecation"

    This is not a valid section header for release notes.

    This could either be a standalone Notable Change, in which case this section header should be a title that describes what the change, or it should be one of the standard section headers in doc/release-notes-empty-template.md (i.e. Wallet)


    rkrux commented at 11:45 AM on July 7, 2026:

    Fixed

  55. achow101 commented at 8:37 PM on July 6, 2026: member

    a00899f3d7fca8ed5d8f849bca4979099a3d8aac "wallet, test: replace rbf_node with node in wallet_bumpfee.py" seems entirely unnecessary. Mass renaming things in that file breaks git blame, and I don't really see the benefit for changing the name. rbf_node is still kind of appropriate because that's node that's doing all of the rbf things.

    The deprecation should be throwing if the option is set, not silently ignoring it. For the options objects, it can throw if the option is provided at all. For positional arguments, the argument must be null. We only accept the option if -deprecatedrpc is provided.

  56. rkrux force-pushed on Jul 7, 2026
  57. rkrux commented at 11:45 AM on July 7, 2026: contributor

    I think all deprecated fields should throw if used when the deprecated flag is not set.

    Done

    in https://github.com/bitcoin/bitcoin/commit/020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features The test only checks the replaceable=True, does not check for replaceable=False.

    Done

    https://github.com/bitcoin/bitcoin/commit/a00899f3d7fca8ed5d8f849bca4979099a3d8aac "wallet, test: replace rbf_node with node in wallet_bumpfee.py" seems entirely unnecessary. Mass renaming things in that file breaks git blame, and I don't really see the benefit for changing the name. rbf_node is still kind of appropriate because that's node that's doing all of the rbf things.

    Dropped

    The deprecation should be throwing if the option is set, not silently ignoring it. For the options objects, it can throw if the option is provided at all. For positional arguments, the argument must be null. We only accept the option if -deprecatedrpc is provided.

    Done

  58. DrahtBot added the label Needs rebase on Aug 5, 2026
  59. wallet, util: move BIP-125 related comment to util/rbf.h from wallet/spend.cpp
    This comment is an explanation for why such a value was chosen in
    the now outdated BIP-125 opt-in signalling flow, so moving it to where
    this constant is defined seems more appropriate instead of it being present
    deep in a nested transaction creation flow in the wallet.
    
    It also serves as a documentation for this constant now, which is helpful.
    5d02584be9
  60. wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs add1bf99e1
  61. wallet, rpc: deprecate replaceable argument in sendall RPC 77ff18e43e
  62. rkrux force-pushed on Aug 11, 2026
  63. rkrux commented at 9:42 AM on August 11, 2026: contributor

    Rebased over master to incorporate changes from #35836.

  64. DrahtBot removed the label Needs rebase on Aug 11, 2026
  65. w0xlt commented at 9:56 PM on August 11, 2026: contributor

    On a node started without -deprecatedrpc=bip125 (the default), three sendtoaddress examples in this help block still supply the deprecated option.

    diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp
    index 068b3fda13..fdd6e4c89d 100644
    --- a/src/wallet/rpc/spend.cpp
    +++ b/src/wallet/rpc/spend.cpp
    @@ -280,14 +280,14 @@ RPCMethod sendtoaddress()
                         "\nSend 0.1 BTC\n"
                         + HelpExampleCli("sendtoaddress", "\"" + EXAMPLE_ADDRESS[0] + "\" 0.1") +
                         "\nSend 0.1 BTC with a confirmation target of 6 blocks in economical fee estimate mode using positional arguments\n"
    -                    + HelpExampleCli("sendtoaddress", "\"" + EXAMPLE_ADDRESS[0] + "\" 0.1 \"donation\" \"sean's outpost\" false true 6 economical") +
    -                    "\nSend 0.1 BTC with a fee rate of 1.1 " + CURRENCY_ATOM + "/vB, subtract fee from amount, BIP125-replaceable, using positional arguments\n"
    -                    + HelpExampleCli("sendtoaddress", "\"" + EXAMPLE_ADDRESS[0] + "\" 0.1 \"drinks\" \"room77\" true true null \"unset\" null 1.1") +
    +                    + HelpExampleCli("sendtoaddress", "\"" + EXAMPLE_ADDRESS[0] + "\" 0.1 \"donation\" \"sean's outpost\" false null 6 economical") +
    +                    "\nSend 0.1 BTC with a fee rate of 1.1 " + CURRENCY_ATOM + "/vB, subtract fee from amount, using positional arguments\n"
    +                    + HelpExampleCli("sendtoaddress", "\"" + EXAMPLE_ADDRESS[0] + "\" 0.1 \"drinks\" \"room77\" true null null \"unset\" null 1.1") +
                         "\nSend 0.2 BTC with a confirmation target of 6 blocks in economical fee estimate mode using named arguments\n"
                         + HelpExampleCli("-named sendtoaddress", "address=\"" + EXAMPLE_ADDRESS[0] + "\" amount=0.2 conf_target=6 estimate_mode=\"economical\"") +
                         "\nSend 0.5 BTC with a fee rate of 25 " + CURRENCY_ATOM + "/vB using named arguments\n"
                         + HelpExampleCli("-named sendtoaddress", "address=\"" + EXAMPLE_ADDRESS[0] + "\" amount=0.5 fee_rate=25")
    -                    + HelpExampleCli("-named sendtoaddress", "address=\"" + EXAMPLE_ADDRESS[0] + "\" amount=0.5 fee_rate=25 subtractfeefromamount=false replaceable=true avoid_reuse=true comment=\"2 pizzas\" comment_to=\"jeremy\" verbose=true")
    +                    + HelpExampleCli("-named sendtoaddress", "address=\"" + EXAMPLE_ADDRESS[0] + "\" amount=0.5 fee_rate=25 subtractfeefromamount=false avoid_reuse=true comment=\"2 pizzas\" comment_to=\"jeremy\" verbose=true")
                     },
             [](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
     {
    
  66. in src/wallet/rpc/spend.cpp:578 in cc96cae71f outdated
     574 | @@ -575,6 +575,9 @@ CreatedTransactionResult FundTransaction(CWallet& wallet, const CMutableTransact
     575 |          }
     576 |  
     577 |          if (options.exists("replaceable")) {
     578 | +            if (!wallet.chain().rpcEnableDeprecated("bip125")) {
    


    polespinasa commented at 10:14 AM on August 12, 2026:

    in cc96cae71f1bf00d935a2a1ef305d3210547cdef wallet, rpc: deprecate replaceable argument in walletcreatefundedpsbt, fundrawtransaction

    I think this is dead and duplicated code. Because all RPC calls that call FundTransaction already check for rpcEnableDeprecated.

    We can probably remove this code, or just remove all checks from other RPC calls and make them all relay on this one.


    rkrux commented at 11:37 AM on August 12, 2026:

    Because all RPC calls that call FundTransaction already check for rpcEnableDeprecated.

    fundrawtransaction didn't, but the other two (walletcreatefundedpsbt and send) did. So, I kept this check in FundTransaction and removed the ones from the other two, reducing the diff.

  67. rkrux force-pushed on Aug 12, 2026
  68. rkrux force-pushed on Aug 12, 2026
  69. DrahtBot added the label CI failed on Aug 12, 2026
  70. DrahtBot commented at 11:37 AM on August 12, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/31592235170/job/94099596196</sub> <sub>LLM reason (✨ experimental): CI failed because the commit_msg lint detected an invalid commit message format (missing a blank line after the subject/body in commit 6eff6977bc1a1b0aebbe28cfab63939c235cdbc6).</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>

  71. rkrux commented at 11:38 AM on August 12, 2026: contributor

    On a node started without -deprecatedrpc=bip125 (the default), three sendtoaddress examples in this help block still supply the deprecated option.

    Applied the suggestion.

  72. wallet, rpc: deprecate `replaceable` in walletcreatefundedpsbt, fundrawtransaction, send ebf0e4cd23
  73. wallet, rpc: deprecate replaceable argument in sendtoaddress, sendmany RPCs c587369564
  74. rpc: deprecate replaceable argument in createrawtransaction, createpsbt f93b8e1a26
  75. wallet, test: add test cases for deprecated RBF features
    Tested RPCs: createrawtransaction, fundrawtransaction, createpsbt, bumpfee
    walletcreatefundedpsbt, send, sendtoaddress, sendmany, sendall, psbtbumpfee.
    ee5499af96
  76. doc: update release notes of 34917 mentioning `replaceable` deprecation 3d06f13d55
  77. rkrux force-pushed on Aug 12, 2026
  78. polespinasa commented at 12:24 PM on August 12, 2026: member

    Ideally deprecated RPC testing should be added to test file rpc_reprecated.py

  79. rkrux commented at 12:56 PM on August 12, 2026: contributor

    Ideally deprecated RPC testing should be added to test file rpc_reprecated.py

    This has been discussed before here: #35381#pullrequestreview-4371680101

  80. DrahtBot removed the label CI failed on Aug 12, 2026
  81. polespinasa commented at 1:30 PM on August 12, 2026: member

    Ideally deprecated RPC testing should be added to test file rpc_reprecated.py

    This has been discussed before here: #35381 (review)

    Oh right, I knew we discussed this before but I couldn't find the conversation.

    Anyway I think you should be able to move this block adding the self.is_wallet_compiled, the tests passes locally for me compiling without a wallet:

            if self.is_wallet_compiled():
                self.log.info("Test without -deprecatedrpc=bip125")
                DEPRECATED_RPC_MESSAGE = "Deprecated \"replaceable\" argument passed. Run with -deprecatedrpc=bip125 startup option to use it."
                node = self.nodes[0]
                node.createwallet("deprecated_optinrbf")
                wallet = node.get_wallet_rpc("deprecated_optinrbf")
                self.generatetoaddress(node, nblocks=101, address=wallet.getnewaddress(), sync_fun=self.no_op)
    
                # helper functions
                def get_largest_unspent():
                  return max(wallet.listunspent(), key=lambda unspent: unspent["amount"])
    
                def check_rbf_signalling(inputs, rbf_signalling=True):
                  for input in inputs:
                    if rbf_signalling:
                      assert_equal(input["sequence"], MAX_BIP125_RBF_SEQUENCE)
                    else:
                      assert_not_equal(input["sequence"], MAX_BIP125_RBF_SEQUENCE)
    
                def assert_rbf_signalling_in_wallet_tx(tx_id):
                  wallet_mempool_tx = wallet.gettransaction(tx_id)
                  assert_equal("bip125-replaceable" in wallet_mempool_tx, True)
                  assert_equal(wallet_mempool_tx["bip125-replaceable"], "yes")
    
                send_rpcs = [
                  lambda: wallet.send(outputs=[{wallet.getnewaddress(): 1}], options={"replaceable": True})["txid"],
                  lambda: wallet.sendtoaddress(address=wallet.getnewaddress(), amount=1, replaceable=True),
                  lambda: wallet.sendmany(amounts={wallet.getnewaddress():1, wallet.getnewaddress():1}, replaceable=True),
                  lambda: wallet.sendall(recipients=[wallet.getnewaddress()], replaceable=True)["txid"],
                ]
        
                # check for errors regarding usage of deprecated arguments without -deprecatedrpc startup option
                unspent = get_largest_unspent()
                assert_raises_rpc_error(-32, DEPRECATED_RPC_MESSAGE, wallet.createrawtransaction, inputs=[unspent], outputs=[{wallet.getnewaddress(): 1}], replaceable=True)
                assert_raises_rpc_error(-32, DEPRECATED_RPC_MESSAGE, wallet.createpsbt, inputs=[unspent], outputs=[{wallet.getnewaddress(): 1}], replaceable=True)
                for rpc in send_rpcs:
                  try:
                    rpc()
                  except JSONRPCException as e:
                    assert_equal(e.error["code"], -32)
                    assert_equal(e.error["message"], DEPRECATED_RPC_MESSAGE)
                  except Exception as e:
                    raise AssertionError("Unexpected exception raised: " + type(e).__name__)
    

    Another nit on the tests, #35433 (review) still apply

  82. in test/functional/wallet_bumpfee.py:658 in add1bf99e1
     651 | -        tx = rbf_node.getrawtransaction(tx["txid"])
     652 | -        tx = rbf_node.decoderawtransaction(tx)
     653 | -        seq = [i["sequence"] for i in tx["vin"]]
     654 | -        assert_equal(seq, [seq_in])
     655 | -
     656 | -    bumped = rbf_node.bumpfee(rbfid, fee_rate=ECONOMICAL, replaceable=False)
    


    polespinasa commented at 1:34 PM on August 12, 2026:

    in add1bf99e16139fe9be826aa42e300b54dc2806a wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs

    testing bumpfee with replaceable = False is removed and not added in any other place later. This removes test coverage.

  83. in src/wallet/rpc/spend.cpp:445 in 77ff18e43e
     441 | @@ -442,7 +442,7 @@ static std::vector<RPCArg> FundTxDoc(bool solving_data = true)
     442 |          {"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, "The fee estimate mode, must be one of (case insensitive):\n"
     443 |            + FeeModesDetail(std::string("economical mode is used if the transaction is replaceable;\notherwise, conservative mode is used")), RPCArgOptions{.also_positional = true}},
     444 |          {
     445 | -            "replaceable", RPCArg::Type::BOOL, RPCArg::DefaultHint{"wallet default"}, "Marks this transaction as BIP125-replaceable.\n"
     446 | +            "replaceable", RPCArg::Type::BOOL, RPCArg::DefaultHint{"wallet default"}, "(DEPRECATED) Marks this transaction as BIP125-replaceable.\n"
    


    polespinasa commented at 1:40 PM on August 12, 2026:

    in 77ff18e43e08e74330cf339933a7515f746f8a3b wallet, rpc: deprecate replaceable argument in sendall RPC

    This docs replaceable as deprecated for all RPC calls using FundTxDoc, but in this commit only sendall has the flag check and the error throw. For the other calls send, fundrawtransaction, walletcreatefundedpsbt the doc is incorrect until a future commit. Commits should be atomically corrects by themself, so probably using a single commit for all RPCs using FundTxDoc is a better option.

  84. in test/functional/wallet_sendall.py:438 in 77ff18e43e
     434 | @@ -435,7 +435,7 @@ def sendall_does_ancestor_aware_funding(self):
     435 |      def sendall_anti_fee_sniping(self):
     436 |          self.log.info("Testing sendall does anti-fee-sniping when locktime is not specified")
     437 |          self.add_utxos([10,11])
     438 | -        tx_from_wallet = self.test_sendall_success(sendall_args = [self.remainder_target], options={"replaceable":False})
    


    polespinasa commented at 1:42 PM on August 12, 2026:

    in 77ff18e wallet, rpc: deprecate replaceable argument in sendall RPC

    sendall with replaceable = False is no longer tested after this commit, until the feature is removed it should be tested.

  85. in test/functional/rpc_psbt.py:911 in ebf0e4cd23
     910 |              assert "bip32_derivs" not in psbt_in
     911 |          assert_equal(decoded_psbt["fallback_locktime"], block_height+2)
     912 |  
     913 | -        # Same construction with only locktime set and RBF explicitly enabled
     914 | -        psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height, {"replaceable": True, "add_inputs": True}, True)
     915 | +        # Same construction with only locktime set and deprecated RBF explicitly enabled
    


    polespinasa commented at 1:45 PM on August 12, 2026:

    in ebf0e4cd23836781d6df9e58c7883f343a08fdde wallet, rpc: deprecate replaceable in walletcreatefundedpsbt, fundrawtransaction, send

    The comment is incorrect, depreacted RBF is not explicitly enabled as this commit removes it, probably should change the comment and mention that is enabled by wallet defaults.

  86. in test/functional/wallet_deprecated_rbf.py:60 in ee5499af96
      61 | +      # check for errors regarding usage of deprecated arguments without -deprecatedrpc startup option
      62 | +      unspent = get_largest_unspent()
      63 | +      assert_raises_rpc_error(-32, DEPRECATED_RPC_MESSAGE, wallet.createrawtransaction, inputs=[unspent], outputs=[{wallet.getnewaddress(): 1}], replaceable=True)
      64 | +      assert_raises_rpc_error(-32, DEPRECATED_RPC_MESSAGE, wallet.createpsbt, inputs=[unspent], outputs=[{wallet.getnewaddress(): 1}], replaceable=True)
      65 | +      for rpc in send_rpcs:
      66 | +        try:
    


    polespinasa commented at 1:48 PM on August 12, 2026:

    in ee5499af965c7a835a3472e11d4e2ee1d7010ad7 wallet, test: add test cases for deprecated RBF features

    This tests feels wrong, it is not testing that the RPC error is enforced, only that, in case it fails, the error is the expected one.

    I think the same approach used for createrawtransaction and createpsbt should be followed.

  87. in test/functional/wallet_deprecated_rbf.py:93 in ee5499af96
      94 | +      assert_greater_than(bumped_tx_details["fee"], bumped_tx_details["origfee"])
      95 | +      assert_rbf_signalling_in_wallet_tx(bumped_tx_details["txid"])
      96 | +      wallet.sendrawtransaction(wallet.gettransaction(bumped_tx_details["txid"])["hex"])
      97 | +      self.generate(node, 1, sync_fun=self.no_op)
      98 | +
      99 | +      # test psbt RPCs (along with testing bumping non-replaceable passes)
    


    polespinasa commented at 1:49 PM on August 12, 2026:

    in ee5499a wallet, test: add test cases for deprecated RBF features

    This is a bit a duplicated comment from others I left, but just to summarize, this is not covering the cases for Replaceable=False for send, sendtoaddress, sendmany and sendall

  88. in test/functional/wallet_deprecated_rbf.py:34 in ee5499af96
      35 | -      assert_equal("bip125-replaceable" in tx, True)
      36 | -      assert_equal(tx["bip125-replaceable"], "no")
      37 | +
      38 | +      # helper functions
      39 | +      def get_largest_unspent():
      40 | +        return max(wallet.listunspent(), key=lambda unspent: unspent["amount"])
    


    polespinasa commented at 1:52 PM on August 12, 2026:

    in ee5499a wallet, test: add test cases for deprecated RBF features

    nit: Probably should add a guard that max takes a non empty value.

  89. in doc/release-notes-34917.md:16 in 3d06f13d55
      15 |  key by passing the `-deprecatedrpc=bip125` startup option. Also,
      16 |  the `-walletrbf` startup option has been marked as deprecated and
      17 |  will be fully removed in the next release. Using this option emits
      18 |  a warning in the logs.
      19 | +
      20 | +Additionally, the `replaceable` argument in several wallet RPC
    


    polespinasa commented at 1:54 PM on August 12, 2026:

    in 3d06f13d55872047be21c9c417f4a3679510f661 doc: update release notes of 34917 mentioning replaceable deprecation

    If I am not wrong, createpsbt, and createrawtransaction are not Wallet rpc

  90. polespinasa commented at 1:55 PM on August 12, 2026: member

    reviewed 3d06f13d55872047be21c9c417f4a3679510f661

  91. DrahtBot added the label Needs rebase on Aug 14, 2026
  92. DrahtBot commented at 5:52 PM on August 14, 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-08-24 06:51 UTC

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