Repository navigation
wallet: deprecate replaceable argument from transaction (and psbt) creation (and modification) RPCs - #35433
wallet: deprecate replaceable argument from transaction (and psbt) creation (and modification) RPCs#35433rkrux wants to merge 7 commits into
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, 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:
Possible places where named args for integral literals may be used (e.g.
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. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
Done now. |
196214c to
17d9368
Compare
|
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 #35442 (comment). Edit: Reverted as they are dependent on #35405 as well slightly. |
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 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 (comment) still apply |
|
Ping for rebase @rkrux. |
|
ACK dc62ab2 |
…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.
…bt, fundrawtransaction, send
Tested RPCs: createrawtransaction, fundrawtransaction, createpsbt, bumpfee walletcreatefundedpsbt, send, sendtoaddress, sendmany, sendall, psbtbumpfee.
|
Rebased over master to remove usage of |
polespinasa
left a comment
There was a problem hiding this comment.
ACK cb12ebf
I think it is worth to address the first Ralph's comment https://git.fish.foo/bitcoin/bitcoin/pulls/35433#issuecomment-609561
| + FeeModesDetail(std::string("economical mode is used if the transaction is replaceable;\notherwise, conservative mode is used")), RPCArgOptions{.also_positional = true}}, | ||
| { | ||
| "replaceable", RPCArg::Type::BOOL, RPCArg::DefaultHint{"wallet default"}, "Marks this transaction as BIP125-replaceable.\n" | ||
| "replaceable", RPCArg::Type::BOOL, RPCArg::DefaultHint{"wallet default"}, "(DEPRECATED) Marks this transaction as BIP125-replaceable.\n" |
There was a problem hiding this comment.
in 2abeff7 wallet, rpc: deprecate replaceable in sendall, walletcreatefundedpsbt, fundrawtransaction, send
This should mention the -deprecatedrpc command that re-enables this feature. See the developer guidelines

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.