-
Notifications
You must be signed in to change notification settings - Fork 37.7k
wallet: lower -txmaxfee default from 0.1 to 0.01 BTC #16539
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
Conversation
I think it would make sense for this absurdity check to use a feerate instead of an absolute fee. A 0.1 BTC fee might be perfectly reasonable for a 100 KB transaction (100 sat/byte); while clearly it is absurdly high for a typical (<1 KB) one. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
9fa6475
to
7f4b4f0
Compare
Conceptual it seems like a valid change but actually how would you account for changes in usages. hence I would require the PR #12833 to be merged with this in order to mitigate the issue described above. |
Somehow I dislike static fee values since it feels it does justify itself by somewhat predicting the future fee market. |
Regarding potentially large coin joins, would it be it be sufficient to give the PSBT methods a |
Now that this is a fee rate for the rpc, I'd prefer if this was also a feerate on the command line. See #16521 Otherwise we are going to allow small txs to pay an up to 10x higher fee rate (assuming tx size of 1/10 kB) and large txs with potentially reasonable fee rate to be rejected. Note that We should probably switch the wallet command line to accept a fee rate and then fail early when a higher fee rate is passed to any of the command line options or rpcs I mentioned previously. |
In short: Concept ACK. Approach NACK |
Adding sanity checks for the I'd like to keep this PR limited to |
7f4b4f0
to
3ff82b4
Compare
(reluctant, for this reason) concept ACK |
3ff82b4
to
31e29a3
Compare
Needs rebase |
0.01 is too low, it would actually get hit in practice for transactions with lots of inputs. A standard transaction can have up to about 1000 inputs. 0.01 BTC is a limit of 10s/byte for a maximum-sized standard transaction. 10s/vb is a totally reasonable feerate which is reached with some regularity. This was originally created to address a very specific need which has largely been made obsolete by segwit and/or PSBT. There were a number of incidents where users sent many (sometimes hundreds) of BTC to fees via the raw transaction interface... often using some web raw transaction creator because they didn't understand how fees work. It was sufficient to have a VERY high threshold which wouldn't need to be tinkered with as feerates change or the Bitcoin price changes because there was is a big gap between the mistaken "I sent most of my coins to fees" usage and real fees. Also because the setting didn't need to rescue every mistake in order to be a useful feature, missing some of the less significant ones was still better than nothing at all. Later, for refactoring reasons that I don't understand this functionality was spread to all transactions. It results in weird and irritating behaviour because there aren't good ways to bypass it (like in the original sendrawtransaction usage). However, because the limit is so high that it should never be hit the poor usability of it isn't a practical issue, but it would be if it was lowered by a factor of 10. To the extent that the maximum serves a secondary purpose of making users feel comfortable that the fees they pay are bounded and that the software won't do something really stupid, changing it to a feerate would not be sufficient because the number of inputs that a wallet selects is unpredictable to the user and varies over a factor of 1000. The wallet behaviour absent this limit should be reasonable, and if it isn't that is a serious bug. This secondary purpose is essentially just a security blanket: "the wallet behaviour is complicated to explain so some users will obsess over fears that it will spend a hundred thousand dollars of bitcoin on fees on a single transaction by surprise and bankrupt them, the limit gives them a hard and simple (if high!) maximum so they can stop worrying about it". A more difficult goal would be targeting a maximum fee that a user wouldn't regret spending. The fee level that a user "wouldn't regret" would be something like 1000s/vb for the first couple inputs and something like the effective minimum rate (or some small multiple of it) for the rest with the rationale that the extra inputs are eventually going to need to be spent at the minimum rate or higher, so you don't care if your wallet chooses a large number of inputs if it doesn't result in paying a lot more than you could pay at a later time. (Here, minimum rate really means something like a month long estimate... but currently the relay minimum suffices for that purpose because the network consistently has excess capacity now) Beyond the issues with configuring a regretless-rate any such rate would necessarily get triggered in practice, so the interface would have to actually handle it cleanly. |
I'm still seeing about a dozen 0.1 BTC fee transactions per month: https://blockchair.com/bitcoin/transactions?q=fee(10000000)# There's no way to know if those are caused by non-upgraded wallets that still have #16257, or whether there's another mistake that can trigger this fee (or different wallet software altogether). Closing this for now. |
There's a wallet safety feature, configurable via
-txmaxfee
, that refuses to create transactions with a fee above 0.1 BTC. This PR lowers that to 0.01 BTC.The highest priority fee in 2017 was about 1000 satoshi per vbyte. A transaction with 6 legacy inputs and 3 outputs is about 1000 vbyte. Such a transaction is still possible with the lower
-txmaxfee
default.The current value was decided in late 2014. In terms of several popular fiat currencies the highest seen price has increased by over a factor 10. Similarly the lowest seen price in two years is ~10x higher than the lowest price in 2014.
Of course we can't predict the future and shouldn't be changing this number too often.
The worst case scenario I can think of would be a high fee low price scenario where GUI users are suddenly forced to edit the config file. This could be mitigated by making settings easier to edit (#12833).
Another factor to consider is the potential for very large coin joins, which are becoming more feasible recently. In that case we could just consider fees from our own inputs rather than the full transaction.
See also #16257 which reduced the likeness of accidental
-maxtxfee
spends, which do happen. This PR reduces the damage is if it happens in some other way.