mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:42:38 +00:00
WIP: qml: make it possible to manually rebroadcast a wallet transaction #1143
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!1143
Loading…
Reference in a new issue
No description provided.
Delete branch "wallet_rebroadcast"
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?
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
Probably should just disable the rebroadcast button if it is disabled or transactions are not eligible for it (such as confirmed transactions)
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.
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
🔵 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 reportI 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.
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.
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.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 clickedRebroadcastagain. 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=0is set, it could explain that wallet broadcasting is disabled.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.
When the node rejects the request (screenshots 5 and 6). When I hit the
-maxfeeratelimit, Core returned a failure with no error text, and the menu still showedRebroadcast 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, theView errorlink in the status line lets me read the details again (6).What do you think of this approach?
Screenshots