New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wallet] Enable RBF by default in QT #11605
Conversation
Requesting Travis restart. Most of the environments passed, three failed for |
Concept ACK. I believe the test failures are, in fact, because of the change in default. |
@TheBlueMatt ok, I'll double check that. Any theory why they would not fail on all machines (including my own)? |
listtransactions fails for me locally, too. |
@Sjors not all the travis machines run the full python test suite, each one serves a different purpose, but those three failing definitely means its related to this change :) The listtransactions.py failure is due to assertions that transactions are not opt-in, such as: bitcoin/test/functional/listtransactions.py Line 117 in 2f959a5
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Number of unrelated whitespace changes too, you can disable your editor from doing that by default :)
src/qt/sendcoinsdialog.cpp
Outdated
} | ||
else | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, braces on same line as if
and else
src/qt/sendcoinsdialog.cpp
Outdated
questionString.append("<hr /><span>"); | ||
questionString.append(tr("This transaction signals replaceability (optin-RBF).")); | ||
questionString.append("</span>"); | ||
questionString.append(tr("You can increase the fee later (signals Replace-By-Fee).")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, indentation
Also perhaps add reference to BIP 125 again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Please don't tag with [qt], when you are actually modifying the default for all wallet created transactions |
Would also be helpful to have some reasoning in OP that outlines how this will not cause user dissatisfaction because some merchants handle rbf txes differently. |
@MarcoFalke I'll try if I can refactor this in a way that in only impacts QT. Changing the default behavior of RPC is probably not a good idea, since there are automated integrations. The current implementation also doesn't warn users that some merchants handle RBF differently, but this may indeed be useful when it becomes the default. Different is not always worse by the way; e.g. ShapeShift will show you a recommended fee to bump to if you want a tx to confirm faster. @meshcollider good to know not all Travis machines run the same tests. Does |
@MarcoFalke I'll take a look at how some merchants and payment processors currently handle RBF, and add that to my PR description. Unless someone has already done that recently and can link to the research... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR includes 2 different things: change the default RBF value and change the UI. I was expecting to not see the UI change. I think it is enough to change DEFAULT_WALLET_RBF
, update the current checkbox (should be checked) and fix the tests. The UI change could still be done in #11556.
Edit: agree that [qt] prefix doesn't apply.
src/wallet/wallet.h
Outdated
@@ -262,7 +262,7 @@ class CMerkleTx | |||
bool IsCoinBase() const { return tx->IsCoinBase(); } | |||
}; | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these whitespace changes.
Alternatively I could leave The changes in #11556 require very different wording imo. If you disable a feature by default you need to persuade users why they might want to opt-in to this functionality. You're selling them on the feature. If you enable it by default, then you need to explain why someone might object to it. You might even move the check box somewhere else in the UI, under some "advanced" section. |
@Sjors no, |
General Concept ACK. Most payment providers do wait for confirmations anyways so I think it makes sense now to use BIP125-RBF-signaling as a default. Conforming to an eventually (and unsafe) 0-conf payment receiver, one can then set the RBF disable flag. Code wise, this is incomplete.
|
I am fine if you change the default globally. But then remove the qt tag
and add some release notes.
|
@jonasschnelli what should be renamed (the RPC option is
Is it an API change because the default value changed? The default value can already be changed with I still think the UI change is independent of this, and subject to other discussion (aim for easier reviews). |
Things like....
This change does also change the default of the RPC layer which may have wide consequences for existing users. I think we should always mention to default state (based on |
Yes, that is missing. |
I'm not comfortable (yet) changing code at the RPC level. So what I can do is change this PR to work only at the QT level. Someone else can make a PR that changes it all the way down, which would supersede this. Then you can all choose between #11556, this and that other PR. |
Another point to consider: most users of QT (probably) don't launch it from the command line, so they're unlikely to use |
I pushed a new version: there's now a new setting Whitespace is gone now, but I'm still going through the other feedback. |
6aa6f55
to
af0f4c0
Compare
Rebased. Tests work. Updated screenshots. Explicitly mention BIP-125. |
If we can't separate the behavior, I don't think we should change the default at all, until we understand what the impact is on automated services with large transaction volumes. Or unless we're sure they read the release notes. |
I think if you run large volume business, you either use Qt or much more likely headless/RPC. You certainly will (should!) read default changes in the release notes during a software upgrade. The split use case would be for someone running both "worlds" (GUI/RPC) with different use cases which I think is unlikely. |
Yeah, agree. The current situation is absolutely insane (and tragically foreseeable). While obviously not the cause of the clusterfuck we're in, having clients aggressively blindly outbid each other is not helping. However, I'm still rather skeptical this is anything more than hack. If you want people to low ball fees, and then progressively bump them -- it really should be reliable. In my wallet now I have dozens of transactions that core isn't capable of fee-bumping due to either no change, or the receiver has spent/swept the output. It would also make sense to build this more first class. e.g. Generate 10 transactions with a progressively increasing nlockTime as well as fee rate. (although this is starting to get a bit off topic)
There's not going to really be any. A year ago or so, it would've been very different when a number of block-explorers and stuff used to reject them (until they confirmed) or show scary warnings. But there's nothing like that today. (Although they still show scary warnings if you actually do a fee bump, warning about double-spends) |
f1936be
to
dcd50b9
Compare
Alright, so we had some more back and forth on IRC. The new version I just pushed:
|
Nice. Consider also updating the original PR description. It will be part of the git history once it's merged. |
@jonasschnelli fixed the PR description. |
utACK dcd50b90b94fbf2295a122693570218932bf15b4 |
Travis fails on trailing whitespace :( diff --git a/doc/release-notes.md b/doc/release-notes.md
@@ -69,0 +70,8 @@ will only create hierarchical deterministic (HD) wallets.
+The send screen now uses BIP-125 RBF by default, regardless of `-walletrbf`.
+There is a checkbox to mark the transaction as final.
^---- failure generated from contrib/devtools/lint-whitespace.sh |
GUI wallet uses RBF by default, regardless of -walletrbf. RPC and debug console in the GUI remain unchanged; they don't use RBF by default, unless launched with -walletrbf=1.
@laanwj fixed Atom either automatically fixes all whitespace in a file or nothing at all. I haven't been able to tweak it to only fix whitespace in lines that I'm working on, as per the code style guidelines. Running Installing linters helps spotting missing whitespace in time, so that mitigates the issue (I hadn't done that yet on my new machine). Although in the case of linter-markdown, it takes a few additional steps to make it care about whitespace. I might make a PR with some hints later. |
Seems Travis is happy now, probably a transient issue. |
Tested ACK 5cbbbd7. |
5cbbbd7 [Wallet] Use RBF by default in QT only (Sjors Provoost) Pull request description: ~If there are no objections, this would supersede #11556.~ Enabling RBF by default avoids the need to explain all possible use cases of RBF. This PR does not change the default RPC wallet behavior, as this could break implementations that depend on it and it's not clear what happens when automated services suddenly switch on RBF on a large scale. After trying various approaches, we settled on just having QT ignore `-walletrbf`. Send screen: <img width="388" alt="send" src="https://user-images.githubusercontent.com/10217/34251097-329c8dee-e63f-11e7-9e14-d7f55d2b52cc.png"> Confirmation screen by default (with RBF): <img width="429" alt="rbf yes" src="https://user-images.githubusercontent.com/10217/32442799-f50d54aa-c2fc-11e7-9392-96339d0f1f74.png"> Confirmation screen without RBF: <img width="431" alt="rf no" src="https://user-images.githubusercontent.com/10217/32442793-ef30bc34-c2fc-11e7-8ca2-e86a97175278.png"> Tree-SHA512: 53efb5d277144478143e69dcae8112c1b9c2beb981fdd0fe778592e5f7d5bf838f73d48052ead874586a75b944e8af469b25e5f376c135cf48cc3598e77f5891
07c4838 Always return true if AppInitMain got to the end (Matt Corallo) Pull request description: This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd. I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from bitcoin#11605). Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
07c4838 Always return true if AppInitMain got to the end (Matt Corallo) Pull request description: This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd. I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from bitcoin#11605). Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
07c4838 Always return true if AppInitMain got to the end (Matt Corallo) Pull request description: This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd. I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from bitcoin#11605). Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
07c4838 Always return true if AppInitMain got to the end (Matt Corallo) Pull request description: This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd. I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from bitcoin#11605). Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
07c4838 Always return true if AppInitMain got to the end (Matt Corallo) Pull request description: This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd. I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from bitcoin#11605). Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
If there are no objections, this would supersede #11556.Enabling RBF by default avoids the need to explain all possible use cases of RBF.
This PR does not change the default RPC wallet behavior, as this could break implementations that depend on it and it's not clear what happens when automated services suddenly switch on RBF on a large scale.
After trying various approaches, we settled on just having QT ignore
-walletrbf
.Send screen:
Confirmation screen by default (with RBF):
Confirmation screen without RBF: