Skip to content

wallet: mark bip125-replaceable RPC key and walletrbf startup option as deprecated#34917

Merged
achow101 merged 4 commits into
bitcoin:masterfrom
rkrux:wallet-rbf
May 26, 2026
Merged

wallet: mark bip125-replaceable RPC key and walletrbf startup option as deprecated#34917
achow101 merged 4 commits into
bitcoin:masterfrom
rkrux:wallet-rbf

Conversation

@rkrux

@rkrux rkrux commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Partially fixes #32661.

This patch set is in line with the deprecation of outdated
BIP 125 opt-in RBF signalling and fullrbf in wallet transaction
RPCs and startup options.

@DrahtBot

DrahtBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

Code Coverage & Benchmarks

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

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK w0xlt, polespinasa, achow101

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:

  • #33034 (wallet: Store transactions in a separate sqlite table by achow101)

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:

  • Using this options emits -> Using this option emits [“options” should be singular to match the referenced startup option.]

2026-05-22 14:48:57

Comment thread src/wallet/init.cpp
@rkrux

rkrux commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Rebased over master to incorporate changes from #21283 and #33671.

Comment thread src/wallet/wallet.h
@polespinasa

Copy link
Copy Markdown
Member

Concept ACK

Will review soon.
This will need a release note indicating all the deprecated fields and startup options.

@rkrux

rkrux commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased over master to incorporate changes from #35279 and changed the approach to deprecate the walletrbf startup option instead of removing it outright as highlighted in #34917 (comment).

@rkrux rkrux changed the title wallet: mark bip125-replaceable deprecated, remove walletrbf argument wallet: mark bip125-replaceable RPC key and walletrbf startup option as deprecated May 20, 2026
@rkrux

rkrux commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Interesting compilation error that happens in non-mac envs, that's why worked in my local: https://github.com/bitcoin/bitcoin/actions/runs/26166359698/job/76975610926?pr=34917

rkrux added 2 commits May 21, 2026 15:23
Transactions are replaceable by default since v28 and the corresponding
tweaking argument has been removed since v29. The related key from the
mempool RPC has been marked deprecated as well since v29, this patch
does the same for the wallet transaction RPCs such as listtransactions,
listsinceblock, and gettransaction.

Users can pass the -deprecatedrpc=bip125 startup argument to retrieve
this key in the responses of above mentioned RPCs.
All transactions are by default replaceable since v28, the wallet need not have
a configuration option to opt into RBF signalling because it seems redundant
now. Emit a warning if this option is used.
Comment thread src/wallet/init.cpp Outdated

@w0xlt w0xlt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5faf2ad

@DrahtBot DrahtBot requested a review from polespinasa May 23, 2026 09:04

@polespinasa polespinasa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code reviewed ACK 5faf2ad

Tested it manually locally and the behavior is the expected.

I think if we are deprecating this for v32.0 we be consistent and do the same with all other RPCs. We have time though, if you open a PR deprecating the others feel free to ping me to review.

marked as deprecated. Users still have the option to retrieve this
key by passing the `-deprecatedrpc=bip125` startup option. Also,
the `-walletrbf` startup option has been marked as deprecated and
will be fully removed in the next release. Using this options emits

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel-free-to-ignore-nit: Maybe worth explicitly saying the next release number.
I guess we can get this merged for v32.0. So removed by v33.0?

@polespinasa

Copy link
Copy Markdown
Member

I was just thinking (post-acking the PR) if keeping ONLY the information fields is useful. For monitoring and analysis on the network it might be useful.

@0xB10C would removing this bip125-replaceable affect any of your monitoring on transactions signaling RBF?

@0xB10C

0xB10C commented May 25, 2026

Copy link
Copy Markdown
Contributor

No, I don't think I/we care about bip125-replaceable anymore at this point.

@achow101

Copy link
Copy Markdown
Member

ACK 5faf2ad

@achow101 achow101 merged commit dd0dea3 into bitcoin:master May 26, 2026
27 checks passed

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ack. I had a branch doing this last year, but I forgot to create a pull for this.

Haven't checked everything, but I think the approach may be moving in the wrong direction.

Comment thread doc/release-notes-34917.md
Comment thread test/functional/wallet_send.py
Comment thread test/functional/wallet_migration.py
Comment thread test/functional/wallet_backwards_compatibility.py
Comment thread src/wallet/wallet.cpp
Comment thread src/wallet/wallet.cpp
wallet->m_confirm_target = args.GetIntArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
wallet->m_spend_zero_conf_change = args.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE);
wallet->m_signal_rbf = args.GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
wallet->m_signal_rbf = DEFAULT_WALLET_RBF;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the wrong default.

The general idea seems to avoid bip125-replacement, because it is deprecated. So using it, seems backwards. See also the related fixup #31953, which moved toward fullrbf, away from bip125-rbf.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is something we can debate on a next PR when removing the options or opening an issue to discuss what the correct path is, but I see some benefits on keep signaling bip125-replacement.

  1. Wallet fingerprinting, currently ~80% of the transactions are signaling it. data. Following what the majority do if it's harmless seems a good choice for privacy.
  2. I guess we want old nodes that still look for bip125-replacement signaling to also replace transactions. Signaling it on every transaction would act as a fullrbf.

Maybe I am missing some downside, but I cannot come with any.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was focussed on marking the fields as deprecated, it was intentional on my part to not change the default, which I think is best done in a separate PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wallet fingerprinting, currently ~80% of the transactions are signaling it. data. Following what the majority do if it's harmless seems a good choice for privacy.

I think the graph shows that the 90-day moving average was always below 50% up to 3 years ago (the year prior to when #30592 was opened and merged). Not sure which self-custodial wallets or which custodial wallets are responsible for the recent increase, but given that the increase was recent, it seems that those wallets are likely easier to upgrade to a new behavior than those wallets that haven't switched to bip125 signalling in a decade.

So I think for those that care about privacy, it would be beneficial to not use bip125 signalling and quickly (hopefully less than ~3 years) converge again toward an anonymity set where the majority is not signalling.

I guess we want old nodes that still look for bip125-replacement signaling to also replace transactions. Signaling it on every transaction would act as a fullrbf.

#25353 with fullrbf was merged 4 years ago, and I don't think one can meaningfully run a node older than that in a safe way.

@polespinasa polespinasa May 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure which self-custodial wallets or which custodial wallets are responsible for the recent increase

I think I can get some data for that, will check and write it here just for curiosity :)
I mostly agree with the other things you said, I was just pointing some ideas that came to my mind.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general idea seems to avoid bip125-replacement, because it is deprecated.

Raised the PR #35405 here that does this.

@polespinasa polespinasa May 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, some of my colleges at uni are doing research on wallet fingerprinting and they shared with me some data about bip125:
image
image

Which matches Ishaana's work results

rkrux added a commit to rkrux/bitcoin that referenced this pull request May 26, 2026
rkrux added a commit to rkrux/bitcoin that referenced this pull request May 27, 2026
rkrux added a commit to rkrux/bitcoin that referenced this pull request May 27, 2026
rkrux added a commit to rkrux/bitcoin that referenced this pull request May 27, 2026
rkrux added a commit to rkrux/bitcoin that referenced this pull request May 28, 2026
achow101 added a commit that referenced this pull request May 28, 2026
f701cd1 doc: fix typo in release notes of #34917 (rkrux)
7bc39e3 wallet, test: add wallet_deprecated_rbf.py for walletrbf deprecated keys & options (rkrux)
2cbbcb5 wallet, test: remove -deprecatedrpc=bip125 from wallet_send.py (rkrux)
307134b wallet, test: remove -deprecatedrpc=bip125 from wallet_migration.py (rkrux)
3ec550d wallet, test: remove -deprecatedrpc=bip125 from wallet_basic.py (rkrux)
a52ea9b wallet, test: remove -walletrbf startup option from wallet_backwards_compatibility.py (rkrux)
4233092 wallet, test: remove -walletrbf startup option from wallet_backwards_compatibility.py (rkrux)
8cb6e40 wallet, test: remove -walletrbf startup option from wallet_listtransactions.py (rkrux)
0ee94b2 wallet, test: remove -deprecatedrpc=bip125 from wallet_listtransactions.py (rkrux)
5e833e0 wallet, test: -walletrbf startup option from wallet_bumpfee.py (rkrux)
a2a2b17 wallet, test: remove -walletrbf startup option from rpc_psbt.py (rkrux)
a3fe455 wallet: refactor to read -walletrbf only once instead of twice (rkrux)

Pull request description:

  Prerequisite to #35404 and #35405.

  All these changes address the points raised in the review of PR #34917
  here: #34917 (review).

  Essentially updating the existing wallet functional tests without using
  the -deprecatedrpc=bip125 and -walletrbf startup options. Instead,
  these two are added and tested via a singular new
  wallet_deprecated_rbf.py test that can be removed easily later when
  these startup options are completely removed from the wallet post
  deprecation.

ACKs for top commit:
  maflcko:
    review ACK f701cd1  🌄
  achow101:
    ACK f701cd1

Tree-SHA512: 700785062b5de8ee3b6c4f50570b769d56c6c4960f2b6e2a2e71be8085c6b51eaeb34fb158fae76f812fe82791aaa0c0277f964f0472cb0784b86caabe6d4ec9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wallet, node: Redundant opt-in RBF wallet config and RPC parameters

8 participants