WIP: qml: make it possible to manually rebroadcast a wallet transaction #1143

Draft
vasild wants to merge 1 commit from wallet_rebroadcast into qt6 AGit
vasild commented 2026-11-18 16:29:00 +00:00 (Migrated from github.com)

Add QML interface for the manual rebroadcast of wallet transactions that is in https://github.com/bitcoin/bitcoin/pull/36481. Opening this as draft until https://github.com/bitcoin/bitcoin/pull/36481 is merged into https://github.com/bitcoin/bitcoin and then pulled here in the ./bitcoin/ submodule. In the mean time I did merge it manually into ./bitcoin/ to play with this.

This runs the rebroadcast asynchronously in the background and displays the status of the rebroadcast in an extra row in the context menu. Maybe not the best UI there can be. I am open to suggestions.

https://github.com/user-attachments/assets/1de15da7-d4d6-4690-938f-f251468db111

https://github.com/user-attachments/assets/b04f6b67-09c3-497a-8705-1a6cacfca432

Add QML interface for the manual rebroadcast of wallet transactions that is in https://github.com/bitcoin/bitcoin/pull/36481. Opening this as draft until https://github.com/bitcoin/bitcoin/pull/36481 is merged into https://github.com/bitcoin/bitcoin and then pulled here in the `./bitcoin/` submodule. In the mean time I did merge it manually into `./bitcoin/` to play with this. This runs the rebroadcast asynchronously in the background and displays the status of the rebroadcast in an extra row in the context menu. Maybe not the best UI there can be. I am open to suggestions. https://github.com/user-attachments/assets/1de15da7-d4d6-4690-938f-f251468db111 https://github.com/user-attachments/assets/b04f6b67-09c3-497a-8705-1a6cacfca432
polespinasa commented 2026-11-18 16:32:23 +00:00 (Migrated from github.com)

Probably should just disable the rebroadcast button if it is disabled or transactions are not eligible for it (such as confirmed transactions)

Probably should just disable the rebroadcast button if it is disabled or transactions are not eligible for it (such as confirmed transactions)
vasild commented 2026-11-18 16:37:10 +00:00 (Migrated from github.com)

Yes, I thought about this and it will be simpler that way and is like this in QT5.

However...

Then the reason is not communicated to the user. I find it precious to know why a transaction is not eligible for broadcast. The underlying layers have the reason. It would be suboptimal to not display it in some way to the user.

Yes, I thought about this and it will be simpler that way and is like this in QT5. However... Then the reason is not communicated to the user. I find it precious to know why a transaction is not eligible for broadcast. The underlying layers have the reason. It would be suboptimal to not display it in some way to the user.
polespinasa commented 2026-11-18 16:40:57 +00:00 (Migrated from github.com)

I find it precious to know why a transaction is not eligible for broadcast.

That could make sense if rebroadcast is disabled, so the user knows he needs to enable it, but there is no reason to inform the user that a confirmed transaction is not eligible for rebroadcast as it will never be eligible for it, he cannot "fix it". It could be misleading in the sense that could make a user think there is a way to do it. For those I guess hiding the option would be better

> I find it precious to know why a transaction is not eligible for broadcast. That could make sense if rebroadcast is disabled, so the user knows he needs to enable it, but there is no reason to inform the user that a confirmed transaction is not eligible for rebroadcast as it will never be eligible for it, he cannot "fix it". It could be misleading in the sense that could make a user think there is a way to do it. For those I guess hiding the option would be better
rreview commented 2026-11-18 17:02:58 +00:00 (Migrated from github.com)

🔵 Suggestion · Rebroadcast is offered without transaction eligibility checks

Both menus offer rebroadcast for confirmed, mined, cancelled and conflicted transactions, although the pinned dependency lacks the manual API needed to verify the resulting backend response.

Location: qml/components/TransactionActionsMenu.qml:63 (head).

🔵 Suggestion · In-flight rebroadcasts have no pending state or duplicate guard

Once a compatible backend is supplied, accepted clicks leave no pending feedback and allow duplicate jobs for the same transaction, whose completions cannot distinguish requests.

Location: qml/components/TransactionActionsMenu.qml:77 (head).

🔵 Suggestion · New QML tests bypass the production rebroadcast bridge

The added tests exercise a replacement model with single, which the production parser rejects, leaving the new bridge's validation, result conversion and completion wiring uncovered.

Location: test/mocks/mockwallet.h:165 (head).

Review coverage was incomplete.


Reviewed: 1403d5e7c888 · Review report

<!-- ralph-major:bitcoin-core/gui-qml --> **🔵 Suggestion · Rebroadcast is offered without transaction eligibility checks** Both menus offer rebroadcast for confirmed, mined, cancelled and conflicted transactions, although the pinned dependency lacks the manual API needed to verify the resulting backend response. Location: [qml/components/TransactionActionsMenu.qml:63](<https://github.com/bitcoin-core/gui-qml/blob/1403d5e7c8886a124ce9f378c0a7ed80d9f3198b/qml/components/TransactionActionsMenu.qml#L63>) (head). **🔵 Suggestion · In-flight rebroadcasts have no pending state or duplicate guard** Once a compatible backend is supplied, accepted clicks leave no pending feedback and allow duplicate jobs for the same transaction, whose completions cannot distinguish requests. Location: [qml/components/TransactionActionsMenu.qml:77](<https://github.com/bitcoin-core/gui-qml/blob/1403d5e7c8886a124ce9f378c0a7ed80d9f3198b/qml/components/TransactionActionsMenu.qml#L77>) (head). **🔵 Suggestion · New QML tests bypass the production rebroadcast bridge** The added tests exercise a replacement model with `single`, which the production parser rejects, leaving the new bridge's validation, result conversion and completion wiring uncovered. Location: [test/mocks/mockwallet.h:165](<https://github.com/bitcoin-core/gui-qml/blob/1403d5e7c8886a124ce9f378c0a7ed80d9f3198b/test/mocks/mockwallet.h#L165>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`1403d5e7c888`](<https://github.com/bitcoin-core/gui-qml/commit/1403d5e7c8886a124ce9f378c0a7ed80d9f3198b>) · [Review report](<https://review.fish.foo/report/gui/1143-1403d5e7c8886a124ce9f378c0a7ed80d9f3198b-2811-1.html>)
ValeraFinebits (Migrated from github.com) reviewed 2026-11-22 12:39:15 +00:00
ValeraFinebits (Migrated from github.com) left a comment

I tried this on regtest and put together the version in the screenshots below. I like being able to rebroadcast from either the right-click menu in Activity or the three-dot menu on the transaction page. I'd show the node's response on the page itself. I usually close a menu as soon as I've picked an action, so it's easy to miss the result there.

  1. Before rebroadcasting (screenshot 1). This is a payment I received. If I rebroadcast it, my peers may infer that I was involved in the payment. That's easy to overlook as a recipient, so I'd mention it in a short confirmation dialog and give the user a chance to cancel.

  2. When the node accepts the request (screenshot 2). A single line saying "Your node accepted the rebroadcast request" is enough for me. I can also see that the payment is still Unconfirmed. Rebroadcasting announces the same transaction with the same fee.

  3. When networking is turned off (screenshot 3). I saw Rebroadcast scheduled. and expected my node to announce the transaction once I turned networking back on. In my test, a newly connected peer only saw the announcement after I clicked Rebroadcast again. In that case, I'd suggest turning networking back on and trying again. If networking is on but there are no peers yet, the message could suggest waiting for a connection. If -walletbroadcast=0 is set, it could explain that wallet broadcasting is disabled.

  4. Once the transaction confirms (screenshot 4). I'd leave rebroadcast out of the menu at that point. I'd do the same for block rewards, conflicted transactions, and transactions the wallet has marked as abandoned. If the transaction confirms while the dialog is open, a short message saying it has already confirmed would explain what happened.

  5. When the node rejects the request (screenshots 5 and 6). When I hit the -maxfeerate limit, Core returned a failure with no error text, and the menu still showed Rebroadcast scheduled. I'd show the reason if Core provides one. Otherwise, "Your node rejected the rebroadcast request" is enough (5). After I close the dialog, the View error link in the status line lets me read the details again (6).

What do you think of this approach?

Screenshots rebroadcast1 rebroadcast2 rebroadcast3 rebroadcast4 rebroadcast5 rebroadcast6
I tried this on regtest and put together the version in the screenshots below. I like being able to rebroadcast from either the right-click menu in Activity or the three-dot menu on the transaction page. I'd show the node's response on the page itself. I usually close a menu as soon as I've picked an action, so it's easy to miss the result there. 1. **Before rebroadcasting (screenshot 1).** This is a payment I received. If I rebroadcast it, my peers may infer that I was involved in the payment. That's easy to overlook as a recipient, so I'd mention it in a short confirmation dialog and give the user a chance to cancel. 2. **When the node accepts the request (screenshot 2).** A single line saying "Your node accepted the rebroadcast request" is enough for me. I can also see that the payment is still `Unconfirmed`. Rebroadcasting announces the same transaction with the same fee. 3. **When networking is turned off (screenshot 3).** I saw `Rebroadcast scheduled.` and expected my node to announce the transaction once I turned networking back on. In my test, a newly connected peer only saw the announcement after I clicked `Rebroadcast` again. In that case, I'd suggest turning networking back on and trying again. If networking is on but there are no peers yet, the message could suggest waiting for a connection. If `-walletbroadcast=0` is set, it could explain that wallet broadcasting is disabled. 4. **Once the transaction confirms (screenshot 4).** I'd leave rebroadcast out of the menu at that point. I'd do the same for block rewards, conflicted transactions, and transactions the wallet has marked as abandoned. If the transaction confirms while the dialog is open, a short message saying it has already confirmed would explain what happened. 5. **When the node rejects the request (screenshots 5 and 6).** When I hit the `-maxfeerate` limit, Core returned a failure with no error text, and the menu still showed `Rebroadcast scheduled.` I'd show the reason if Core provides one. Otherwise, "Your node rejected the rebroadcast request" is enough (5). After I close the dialog, the `View error` link in the status line lets me read the details again (6). What do you think of this approach? <details> <summary>Screenshots</summary> <img width="1594" height="1324" alt="rebroadcast1" src="https://git.fish.foo/attachments/e28a7fab-6a12-453b-abea-31a3b609e86c" /> <img width="1594" height="1324" alt="rebroadcast2" src="https://git.fish.foo/attachments/89239bfc-dae5-4a3d-bffb-64a374c38ede" /> <img width="1592" height="1330" alt="rebroadcast3" src="https://git.fish.foo/attachments/329f464c-e492-4fed-91ba-64dc49dfc6ae" /> <img width="1594" height="1322" alt="rebroadcast4" src="https://git.fish.foo/attachments/f16c9cc5-59d2-4f08-83b2-24f3280617f4" /> <img width="1596" height="1330" alt="rebroadcast5" src="https://git.fish.foo/attachments/1451661b-c075-4fcf-aed3-d2f680ec8f65" /> <img width="1598" height="1332" alt="rebroadcast6" src="https://git.fish.foo/attachments/350a2154-df2a-4e75-8368-4b488cc2c998" /> </details>
Sign in to join this conversation.
No description provided.