{
 "number": 36380,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36380",
 "title": "wallet: extend -walletbroadcast to allow initial send only",
 "author": "vasild",
 "author_association": "MEMBER",
 "created_at": "2026-09-29T09:01:33Z",
 "updated_at": "2026-10-27T15:56:43Z",
 "description_hash": "678aa58c5c1839e4",
 "age_days": 33,
 "draft": false,
 "labels": [
  "Wallet"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "155eb27489f4fdbf9570dfb064e36fa12f37f399",
 "head_ref": "walletrebroadcast",
 "head_repo": "vasild/bitcoin",
 "head_history": [
  {
   "t": "2026-09-29T09:11:17Z",
   "sha": "57cbe86d86733d95d116c84a880c70c15dc99562"
  },
  {
   "t": "2026-10-05T09:55:00Z",
   "sha": "155eb27489f4fdbf9570dfb064e36fa12f37f399"
  }
 ],
 "additions": 42,
 "deletions": 20,
 "changed_files": 4,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_nack": [
     {
      "login": "achow101",
      "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5940478231"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "achow101",
   "mzumsande",
   "vicjuma",
   "w0xlt"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-10-05T09:59:35Z",
  "last_reviewer_activity": "2026-10-01T21:02:14Z",
  "last_reviewer": "achow101",
  "author_silent_days": 27,
  "waiting_on_author_days": 0,
  "days_since_update": 5
 },
 "refs": {
  "mentioned": [
   36398,
   36403
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 36398,
    "type": "pull",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "wallet: only rebroadcast transactions originating from the wallet"
   },
   {
    "number": 36403,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "Rethinking Transaction Rebroadcasting"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/wallet/wallet.h"
 ],
 "body": "`-walletbroadcast` was a boolean `0` or `1` meaning either \"do not broadcast transactions or \"initial broadcast plus periodic re-broadcast (every 12-36 hours)\".\n\nAdd a new possible value `initialonly` which would allow the user to configure the wallet to do the initial broadcast only and not to do the periodic rebroadcasts.\n\nNo new configuration options and no change in default behavior.",
 "commits": [
  {
   "sha": "155eb27489f4fdbf9570dfb064e36fa12f37f399",
   "date": "2026-10-05T09:48:26Z",
   "message": "wallet: extend -walletbroadcast to allow initial send only\n\n`-walletbroadcast` was a boolean `0` or `1` meaning either \"do not\nbroadcast transactions or \"initial broadcast plus periodic\nre-broadcast (every 12-36 hours)\".\n\nAdd a new possible value `initialonly` which would allow the user to\nconfigure the wallet to do the initial broadcast only and not to do the\nperiodic rebroadcasts.\n\nNo new configuration options and no change in default behavior."
  }
 ],
 "timeline": [
  {
   "t": "2026-09-29T09:11:17Z",
   "kind": "force_push",
   "who": "vasild",
   "commit": "57cbe86d86733d95d116c84a880c70c15dc99562",
   "id": "push:57cbe86d86733d95d116c84a880c70c15dc99562"
  },
  {
   "t": "2026-09-29T16:26:27Z",
   "kind": "review_comment",
   "who": "vicjuma",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/wallet.h",
   "commit": "57cbe86d86733d95d116c84a880c70c15dc99562",
   "in_reply_to": null,
   "text": "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 `-walletbroadcast` did not require any setup from the user. For this, what if the user forgets to set up the `-walletrebroadcast` option?. IMO, I think rebroadcasting outweighs privacy so defaulting to true would be convenient. Just a thought though, I might be missing something.",
   "id": "rc:4135840655",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#discussion_r4135840655",
   "hash": "87ec821c61de2313",
   "edited": "2026-09-29T16:27:07Z"
  },
  {
   "t": "2026-09-29T18:53:50Z",
   "kind": "comment",
   "who": "w0xlt",
   "assoc": "CONTRIBUTOR",
   "text": "Can we safely disable wallet re-broadcasting? If so, why do we need re-broadcasting at all?\n\nEven if we choose this approach, I think extending `-walletbroadcast` with new modes would be cleaner than introducing another parameter with a very similar name.",
   "id": "c:5896604099",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5896604099",
   "hash": "ac3c7a5ef97b291d",
   "edited": null
  },
  {
   "t": "2026-09-30T07:51:55Z",
   "kind": "review_comment",
   "who": "vasild",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "57cbe86d86733d95d116c84a880c70c15dc99562",
   "in_reply_to": 4135840655,
   "text": "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.\n\nAlso, 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\".\n\nThis 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 `master` without this PR).",
   "id": "rc:4142146539",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#discussion_r4142146539",
   "hash": "1fb667f440add65f",
   "edited": null
  },
  {
   "t": "2026-09-30T08:04:54Z",
   "kind": "comment",
   "who": "vasild",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI think yes. Most users don't need it, but are nevertheless exposed to the privacy leaks it brings even if they never use it.\n\n[quoted text omitted]\nIt serves this scenario:\n\n* The user creates a transaction in the wallet and broadcasts it to the network. So far so good.\n* The transaction is not very high fee so is not mined immediately.\n* Global mempool pressure increases and that causes the transaction to be evicted from everybody's mempools.\n* Global mempool pressure decreases.\n* Nobody knows about the transaction, except the user that created it.\n* It would have been mined if miners where aware of it but is never mined because the network \"forgot\" about it. In this case the user rebroadcasting the transaction would help.\n\nUp to your judgement if this is rare or not, but is good to have wallet rebroadcast in such cases.\n\n[quoted text omitted]\nHmm, sounds like something worth considering. Currently `-walletbroadcast` is a boolean. What would you suggest? Something like this maybe:\n* `0` no initial, no rebroadcast\n* `1` initial and rebroadcast\n* `initialonly` initial, no rebroadcast\n\n?",
   "id": "c:5906908312",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5906908312",
   "hash": "a33441c346fb1051",
   "edited": null
  },
  {
   "t": "2026-10-01T14:29:29Z",
   "kind": "comment",
   "who": "mzumsande",
   "assoc": "MEMBER",
   "text": "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).",
   "id": "c:5933552705",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5933552705",
   "hash": "fb66ee763b20fc12",
   "edited": null
  },
  {
   "t": "2026-10-01T19:49:31Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "I've opened #36403 where we can have more high level discussion about transaction rebroadcast in general.",
   "id": "c:5939297911",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5939297911",
   "hash": "92e45907e178e160",
   "edited": null
  },
  {
   "t": "2026-10-01T21:02:14Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nConcept NACK\n\nDisabling rebroadcasts by default has bad effects for the wallet.",
   "id": "c:5940478231",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5940478231",
   "hash": "7e5af691b9a6fbde",
   "edited": null
  },
  {
   "t": "2026-10-05T09:50:15Z",
   "kind": "review_comment",
   "who": "vasild",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "57cbe86d86733d95d116c84a880c70c15dc99562",
   "in_reply_to": 4135840655,
   "text": "Modified the PR to not change the default behavior.",
   "id": "rc:4182690345",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#discussion_r4182690345",
   "hash": "4a78c6becc229a78",
   "edited": null
  },
  {
   "t": "2026-10-05T09:55:00Z",
   "kind": "force_push",
   "who": "vasild",
   "commit": "155eb27489f4fdbf9570dfb064e36fa12f37f399",
   "id": "push:155eb27489f4fdbf9570dfb064e36fa12f37f399"
  },
  {
   "t": "2026-10-05T09:59:35Z",
   "kind": "comment",
   "who": "vasild",
   "assoc": "MEMBER",
   "text": "`57cbe86d86733d95d116c84a880c70c15dc99562...155eb27489f4fdbf9570dfb064e36fa12f37f399`: don't introduce a new option, instead extend the allowed values of `-walletbroadcast`.\n\n[quoted text omitted]\nChanged the PR. Now the default behavior is unmodified.\n\nNow this PR allows `-walletbroadcast=initialonly` (in addition to the existent `0` and `1`) to instruct it to only do the initial broadcasts and skip the periodic rebroadcasts.",
   "id": "c:5992221844",
   "url": "https://github.com/bitcoin/bitcoin/pull/36380#issuecomment-5992221844",
   "hash": "f48825728baa113f",
   "edited": null
  }
 ],
 "labels_log": [
  {
   "t": "2026-09-29T09:01:38Z",
   "action": "labeled",
   "label": "Wallet",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-29T09:12:29Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-29T10:24:26Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-10-05T09:50:50Z",
   "kind": "renamed",
   "who": "vasild",
   "from": "wallet: add an option to control rebroadcasts",
   "to": "wallet: extend -walletbroadcast to allow initial send only"
  }
 ],
 "text_chars": 4492,
 "text_tokens_estimate": 1123,
 "changed_paths": [
  "src/qt/test/wallettests.cpp",
  "src/wallet/init.cpp",
  "src/wallet/wallet.cpp",
  "src/wallet/wallet.h"
 ],
 "files": [
  {
   "path": "src/qt/test/wallettests.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/init.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/wallet.cpp",
   "add": 27,
   "del": 10
  },
  {
   "path": "src/wallet/wallet.h",
   "add": 13,
   "del": 8
  }
 ],
 "test_lines": 2,
 "git": {
  "head": "155eb27489f4fdbf9570dfb064e36fa12f37f399",
  "head_matches_backup": true,
  "base": "714261b508c237ce26b09b0e25f23262385b0152",
  "patch_id": "a621f39fb60a012d",
  "commits": [
   {
    "sha": "155eb27489",
    "subject": "wallet: extend -walletbroadcast to allow initial send only",
    "files": 4,
    "add": 42,
    "del": 20
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "a621f39fb60a012d",
 "input_hash": "a2c55fb96ca252f2",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}