-
Notifications
You must be signed in to change notification settings - Fork 38.7k
doc: Clarify that feerates are per virtual size #21752
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
jarolrod
left a comment
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.
Concept ACK
What about:
bitcoin/src/qt/forms/sendcoinsdialog.ui
Line 853 in 2b45cf0
| Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kB" for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</string> |
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -850,7 +850,7 @@
<property name="toolTip">
<string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size.
-Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kB" for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</string>
+Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kvB" for a transaction size of 500 virtual bytes (half of 1 kvB) would ultimately yield a fee of only 50 satoshis.</string>
</property>
<property name="text">
<string>per kilobyte</string>
|
Concept ACK. I was hesitant to propose this across the codebase, as some reviewers prefered kB to kvB when I was working on the initial sat/vB |
|
There might be some remaining user-facing ones, grepping for "per kB". src/init.cpp:541: argsman.AddArg("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
src/wallet/rpcwallet.cpp:2295: "\nSet the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.\n"
src/qt/forms/sendcoinsdialog.ui:851: <string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size.
src/qt/forms/sendcoinsdialog.ui:853:Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kB" for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</string>#20391 fixes the one in src/wallet/rpcwallet.cpp but we may as well do it here. |
That states
Brought this one up here: #21752 (review) |
vB will be better IMO
Agree |
-BEGIN VERIFY SCRIPT- sed -i 's|/kB|/kvB|g' $( git grep -l '/kB' ./src ) -END VERIFY SCRIPT-
|
Thanks, done |
ryanofsky
left a comment
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.
Code review ACK fae1961. Checked instances where units were being added in the second commit and they all looked right.
| <string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size. | ||
|
|
||
| Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kB" for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</string> | ||
| Note: Since the fee is calculated on a per-byte basis, a fee rate of "100 satoshis per kvB" for a transaction size of 500 virtual bytes (half of 1 kvB) would ultimately yield a fee of only 50 satoshis.</string> |
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.
Why the addition of the word "rate"? I thought the word "rate" usually meant over time, like a frequency. Not sure why we need the word here, given that a fee is a one to one relationship to a TX.
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.
We're everywhere referring to fee/(v)byte as feerate.
By implementing segwit, it is already clear that all feerates in Bitcoin Core are denoted in (amount/virtual size). Though, there is inconsistency, as some places use kvB, some use kB. Thus, replace all with "kvB".
See also commit 6da3afb, which did the replacement for wallet RPCs.