mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:08:38 +00:00
wallet: deprecate replaceable argument from transaction (and psbt) creation (and modification) RPCs #35433
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!35433
Loading…
Reference in a new issue
No description provided.
Delete branch "deprecaterbf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #32661.
The
replaceableargument in several wallet RPC requestshas been marked deprecated and for now users have the
option to use this argument via the
-deprecatedrpc=bip125startup 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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
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.
LLM Linter (✨ experimental)
Possible typos and grammar issues:
doc/release-notes-35433.md:Effected RPCs→Affected RPCs[wrong word: “affected” means the RPCs impacted by the change]Possible places where named args for integral literals may be used (e.g.
func(x, /*named_arg=*/0)in C++, andfunc(x, named_arg=0)in Python):test/functional/wallet_balance.py:node.createrawtransaction(inputs, outputs, 0)test/functional/rpc_psbt.py:walletcreatefundedpsbt(..., block_height+2, {"add_inputs": True}, False)test/functional/rpc_psbt.py:walletcreatefundedpsbt(..., block_height, {"add_inputs": True}, True)test/functional/wallet_signer.py:walletcreatefundedpsbt([], {dest:0.5}, 0, {}, True)2026-11-23 08:46:47
I will add test case for bumpfee and psbtbumpfee along with release note.
🚧 At least one of the CI tasks failed.
Task
lint: https://github.com/bitcoin/bitcoin/actions/runs/26763283466/job/78882570147LLM reason (✨ experimental): CI failed because the Python lint (ruff) reported an error—an unused import
MAX_BIP125_RBF_SEQUENCEintest/functional/rpc_psbt.py.Hints
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.
Done now.
Updated the PR to not depend on #35405, removed the two commit from that PR.
Pushed the last two testing related commits of PR #35442 here as per this review comment https://github.com/bitcoin/bitcoin/pull/35442#issuecomment-4648428333.
Edit: Reverted as they are dependent on #35405 as well slightly.
🚧 At least one of the CI tasks failed.
Task
lint: https://github.com/bitcoin/bitcoin/actions/runs/27275445645/job/80555467804LLM reason (✨ experimental): CI failed because Python linting reported an error:
test_framework.messagesis missingMAX_BIP125_RBF_SEQUENCEintest/functional/rpc_psbt.py.Hints
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.
I think the PR's description needs to be updated again?
as per #35405...
Done.
The description is fine, it was written before these two commits (now removed) were added in this PR.
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.
Force-pushed to update the rpc_psbt.py test that failed after reverting the default replaceable value to true in createpsbt RPC.
The CI / test ancestor commits (pull_request) failure is unrelated - #34731.
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_rbform_signal_rbfas deprecated? If so, it would be better to put the comment change there.Moved in rbf.h, it does look better as the comment becomes the documentation for this constant highlighting that this value is deprecated/outdated.
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_SEQUENCEas deprecated is done in https://github.com/bitcoin/bitcoin/pull/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_SEQUENCEis 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
Yeah, it does seem to be a remnant of an outdated version of this PR that was built over #34505.
Not marked it deprecated now. Maybe later in #35442 when I rework it, let's see.
Yes, this makes sense. I have separated it out now.
🚧 At least one of the CI tasks failed.
Task
iwyu: https://github.com/bitcoin/bitcoin/actions/runs/27553730406/job/81452610641LLM reason (✨ experimental): CI failed because IWYU detected missing/incorrect
#includes (failure generated from IWYU) insrc/bench/pool.cpp.Hints
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.
The CI / iwyu (pull_request) failure is unrelated and should have been fixed post #35535.
🐙 This pull request conflicts with the target branch and needs rebase.
Rebased over master to incorporate changes from PR #35543.
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 be set to optional and 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 forreplaceable=False.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
falseit will be overwritten toDEFAULT_WALLET_RBFin 020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features
nit: we use 4 spaces for indentation, this test uses 3.
in 020560e00a4b49e5ceb4365def4f2e07b60eee57 wallet, test: add test cases for deprecated RBF features
Should be
assert_rbf_in_tx_hex(funded_tx_hex)??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_nodeis 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
-deprecatedrpcis provided.In c2515fc66fb5b91dce6552e79286b6117dbd68df "doc: update release notes of 34917 mentioning
replaceabledeprecation"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)
It should also still be using
true, not be changed toDEFAULT_WALLET_RBFas the idea is to unconditionally set it totrue, not use the default for the wallet.In 85df2740b1e2cd6c7ca3e3d19180e707373244ee "wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs"
This should not be changed
Reverted
Fixed
Reverted
Fixed
Done
Done
Dropped
Done
In 3ac9c24124f0722649016a12fdf39eb9a628cd94 wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs
This stills wrong, this PR does not introduce the error, butm_signal_bip125_rbfis an optional, if it is not set, it will set it totrue, but if it is explicitly set tofalseit will be overwritten totrueanyway.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
This should be addressed in a separate PR.
🐙 This pull request conflicts with the target branch and needs rebase.
Rebased over master to incorporate changes from #35836.
On a node started without -deprecatedrpc=bip125 (the default), three sendtoaddress examples in this help block still supply the deprecated option.
in cc96cae71f1bf00d935a2a1ef305d3210547cdef wallet, rpc: deprecate replaceable argument in walletcreatefundedpsbt, fundrawtransaction
I think this is dead and duplicated code. Because all RPC calls that call
FundTransactionalready check forrpcEnableDeprecated.We can probably remove this code, or just remove all checks from other RPC calls and make them all relay on this one.
🚧 At least one of the CI tasks failed.
Task
lint: https://github.com/bitcoin/bitcoin/actions/runs/31592235170/job/94099596196LLM reason (✨ experimental): CI failed because the
commit_msglint detected an invalid commit message format (missing a blank line after the subject/body in commit6eff6977bc1a1b0aebbe28cfab63939c235cdbc6).Hints
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.
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.
Applied the suggestion.
Ideally deprecated RPC testing should be added to test file rpc_reprecated.py
This has been discussed before here: https://github.com/bitcoin/bitcoin/pull/35381#pullrequestreview-4371680101
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:Another nit on the tests, https://github.com/bitcoin/bitcoin/pull/35433#discussion_r3530723710 still apply
reviewed 3d06f13d55872047be21c9c417f4a3679510f661
in 3d06f13d55872047be21c9c417f4a3679510f661 doc: update release notes of 34917 mentioning
replaceabledeprecationIf I am not wrong,
createpsbt, andcreaterawtransactionare not Wallet rpcin 77ff18e43e08e74330cf339933a7515f746f8a3b wallet, rpc: deprecate replaceable argument in sendall RPC
This docs replaceable as deprecated for all RPC calls using
FundTxDoc, but in this commit onlysendallhas the flag check and the error throw. For the other callssend,fundrawtransaction,walletcreatefundedpsbtthe doc is incorrect until a future commit.Commits should be atomically corrects by themself, so probably using a single commit for all RPCs using
FundTxDocis a better option.in ebf0e4cd23836781d6df9e58c7883f343a08fdde wallet, rpc: deprecate
replaceablein walletcreatefundedpsbt, fundrawtransaction, sendThe 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.
in add1bf99e16139fe9be826aa42e300b54dc2806a wallet, rpc: deprecate replaceable argument in bumpfee, psbtbumpfee RPCs
testing bumpfee with
replaceable = Falseis removed and not added in any other place later. This removes test coverage.in ee5499a wallet, test: add test cases for deprecated RBF features
nit: Probably should add a guard that max takes a non empty value.
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
createrawtransactionandcreatepsbtshould be followed.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=Falseforsend,sendtoaddress,sendmanyandsendallin 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.
🐙 This pull request conflicts with the target branch and needs rebase.
Ping for rebase @rkrux.
2 additional verified findings in the Review report.
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
🟠 Minor · Explicit non-signalling inputs still depend on deprecated
replaceable=falseFor
send,sendall, andwalletcreatefundedpsbt, all-non-signalling explicit inputs still needreplaceable=false, now gated behind a startup flag; no current caller producing this input was found.Location:
src/wallet/rpc/spend.cpp:1485(head).🔵 Suggestion · Fee-bump deprecation rejection is not tested
The disabled-flag phase never calls
bumpfeeorpsbtbumpfeewithreplaceable, so removing their separate gate would leave the current assertions passing.Location:
test/functional/wallet_deprecated_rbf.py:60(head).🔵 Suggestion · The test no longer verifies the
-walletrbf=0defaultThe rewritten test checks explicit
replaceableoverrides and the startup warning, but loses the assertion that-walletrbf=0affects transactions created without an override.Location:
test/functional/wallet_deprecated_rbf.py:30(base).🔵 Suggestion · Wallet-added inputs lose
replaceable=falsecoverageThe forced-funding
walletcreatefundedpsbtcase now tests signalling defaults, while its compatibility replacement adds no inputs and runs under-walletrbf=0, masking an ignored false override.Location:
test/functional/rpc_psbt.py:1250(head).🔵 Suggestion · The non-signalling test accepts signalling sequences
check_rbf_signalling(..., rbf_signalling=False)excludes only0xfffffffd, so lower sequence values that still signal BIP125 pass the assertion.Location:
test/functional/wallet_deprecated_rbf.py:43(head).🔵 Suggestion · The Creator fixture changes with the default instead of retaining its vector
The Creator check in the BIP 174 test-vector section now expects default signalling sequences rather than its original final-sequence transaction.
Location:
test/functional/data/rpc_psbt.json:236(head).Review coverage was incomplete.
Reviewed:
cb12ebf07f8e· Review report · Previous reportspermalink
Addressed during rebase.
Not that important to test this field in bumpfee but added coverage for it.
Merged the two commits affecting the 4 RPCs.
Addressed.
Yes, this flow was outdated making this comment incorrect - updated.
Added an assertion in the try block in case the exception is not thrown.
Addressed.
Added.
It was using 2, updated to 4 now.
ACK
dc62ab2ca9Addressed.
Rebased over master to remove usage of
replaceableargument added in the recently merged PR #36040 that was causing test failures.ACK
cb12ebf07fI think it is worth to address the first Ralph's comment #35433 (comment)
in
2abeff74ddwallet, rpc: deprecatereplaceablein sendall, walletcreatefundedpsbt, fundrawtransaction, sendThis should mention the
-deprecatedrpccommand that re-enables this feature. See the developer guidelinesACK
cb12ebf07f