mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:14:39 +00:00
wallet: extend -walletbroadcast to allow initial send only #36380
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!36380
Loading…
Reference in a new issue
No description provided.
Delete branch "walletrebroadcast"
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?
-walletbroadcastwas a boolean0or1meaning either "do not broadcast transactions or "initial broadcast plus periodic re-broadcast (every 12-36 hours)".Add a new possible value
initialonlywhich would allow the user to configure the wallet to do the initial broadcast only and not to do the periodic rebroadcasts.No new configuration options and no change in default behavior.
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.
🚧 At least one of the CI tasks failed.
Task
lint: https://github.com/bitcoin/bitcoin/actions/runs/36546473252/job/109333967547LLM reason (✨ experimental): CI failed because the lint “doc” check detected undocumented command-line arguments:
-walletbroadcastand-walletrebroadcast(AssertionError).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.
Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive linked from the Review report for their assessments.
🔵 Suggestion ·
initialonlyalso disables non-relaying mempool restorationWith
-walletbroadcast=initialonly, startup and descriptor import skip non-relaying restoration, leaving missing pending transactions outside the local mempool and their change unavailable to default coin selection.Location:
src/wallet/wallet.cpp:1884(head).🔵 Suggestion · No test exercises
-walletbroadcast=initialonlyNo checked-in test selects the new mode, so mapping
initialonlyto eitherNEVERorINITIAL_AND_PERIODICwould escape the existing assertions.Location:
src/wallet/wallet.cpp:2865(head).Reviewed:
17bad7c1073d· Review report · Previous reportspermalink
Why default to false? I feel like the responsibility for privacy should be left to users desiring privacy. The majority of them probably just want convenience. The initial
-walletbroadcastdid not require any setup from the user. For this, what if the user forgets to set up the-walletrebroadcastoption?. IMO, I think rebroadcasting outweighs privacy so defaulting to true would be convenient. Just a thought though, I might be missing something.Can we safely disable wallet re-broadcasting? If so, why do we need re-broadcasting at all?
Even if we choose this approach, I think extending
-walletbroadcastwith new modes would be cleaner than introducing another parameter with a very similar name.No strong opinion. I was influenced by https://github.com/bitcoin/bitcoin/pull/36330 which would completely disable wallet re-broadcast with no way to enable it, if
privatebroadcast=1. So, this PR, even with the default to "off" is softer than that because it makes it possible to enable the wallet rebroadcast if needed.Also, my thinking, ignoring https://github.com/bitcoin/bitcoin/pull/36330 is that the wallet re-broadcast does more harm than good. It is a privacy nightmare and only provides some service in rare cases. But this is just my guess. For sure, there are users that use it and for them it is not "rare".
This is why I think it makes sense to have the wallet re-broadcast configurable in the first place. I am fine with a default to "on" (as in
masterwithout this PR).I think yes. Most users don't need it, but are nevertheless exposed to the privacy leaks it brings even if they never use it.
It serves this scenario:
Up to your judgement if this is rare or not, but is good to have wallet rebroadcast in such cases.
Hmm, sounds like something worth considering. Currently
-walletbroadcastis a boolean. What would you suggest? Something like this maybe:0no initial, no rebroadcast1initial and rebroadcastinitialonlyinitial, no rebroadcast?
I opened #36398 for a fix escpecially targeted at https://github.com/bitcoin/bitcoin/issues/3828, which doesn't have an option. One thing to note is that if we disable rebroadcast, we should probably also disable artificial resubmission to mempool (as explained there).
I've opened #36403 where we can have more high level discussion about transaction rebroadcast in general.
Concept NACK
Disabling rebroadcasts by default has bad effects for the wallet.
Modified the PR to not change the default behavior.
57cbe86d86733d95d116c84a880c70c15dc99562...155eb27489f4fdbf9570dfb064e36fa12f37f399: don't introduce a new option, instead extend the allowed values of-walletbroadcast.Changed the PR. Now the default behavior is unmodified.
Now this PR allows
-walletbroadcast=initialonly(in addition to the existent0and1) to instruct it to only do the initial broadcasts and skip the periodic rebroadcasts.🐙 This pull request conflicts with the target branch and needs rebase.
155eb27489f4fdbf9570dfb064e36fa12f37f399...17bad7c1073dc22d6dd8596e3786b0a01236db16: rebase due to conflicts@achow101, this PR does not disable rebroadcasts by default anymore. Just adds the possibility to switch them off. No changes in default behavior and no new config options. Would you reevaluate your NACK?
I think the option to disable automatic wallet rebroadcasts (this PR) would click well with the possibility to manually rebroadcast desired transactions (https://github.com/bitcoin/bitcoin/pull/36481).
https://github.com/bitcoin/bitcoin/pull/36398 is very much related to this, it disables the automatic wallet rebroadacast based on whether the wallet is sender or receiver. So we have:
Right now
-walletbroadcast=0disables all and=1enables all.This PR makes it possible to optionally disable 2 & 3, via
-walletbroadcast=initialonlyhttps://github.com/bitcoin/bitcoin/pull/36398 disables 3, unconditionally. @mzumsande what about making that configurable via e.g.
-walletbroadcast=senderonly?