doc: Clarify that feerates are per virtual size #21752

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2104-docFee changing 10 files +24 −24
  1. MarcoFalke commented at 10:21 am on April 22, 2021: member

    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 6da3afbaee5809ebf6d88efaa3958c505c2d71c7, which did the replacement for wallet RPCs.

  2. MarcoFalke added the label Docs on Apr 22, 2021
  3. MarcoFalke renamed this:
    scripted-diff: Clarify that feerates are per virtual size
    [doc] scripted-diff: Clarify that feerates are per virtual size
    on Apr 22, 2021
  4. jarolrod commented at 6:36 pm on April 30, 2021: member

    Concept ACK

    What about: https://github.com/bitcoin/bitcoin/blob/2b45cf0bcdb3d2c1de46899e30885c953b57b475/src/qt/forms/sendcoinsdialog.ui#L853

     0--- a/src/qt/forms/sendcoinsdialog.ui
     1+++ b/src/qt/forms/sendcoinsdialog.ui
     2@@ -850,7 +850,7 @@
     3                    <property name="toolTip">
     4                     <string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size.
     5 
     6-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>
     7+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>
     8                    </property>
     9                    <property name="text">
    10                     <string>per kilobyte</string>
    
  5. jonatack commented at 6:48 pm on April 30, 2021: member
    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 fee_rate changes. A further possibility would be to replace “fee” with “fee rate” where the meaning is a fee rate and not a fee (credit to @Xekyo for tuning my antennae to this).
  6. jonatack commented at 6:55 pm on April 30, 2021: member

    There might be some remaining user-facing ones, grepping for “per kB”.

    0src/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);
    1src/wallet/rpcwallet.cpp:2295:                "\nSet the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.\n"
    2src/qt/forms/sendcoinsdialog.ui:851:                    <string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size.
    3src/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.

  7. jarolrod commented at 6:58 pm on April 30, 2021: member

    @jonatack

    src/qt/forms/sendcoinsdialog.ui:851: Specify a custom fee per kB (1,000 bytes) of the transaction’s virtual size.

    That states "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.

    Brought this one up here: #21752#pullrequestreview-649501091

  8. ghost commented at 7:19 pm on April 30, 2021: none

    @jonatack

    I was hesitant to propose this across the codebase, as some reviewers prefered vB to kvB when I was working on the initial sat/vB fee_rate changes.

    vB will be better IMO

    A further possibility would be to replace “fee” with “fee rate” where the meaning is a fee rate and not a fee

    Agree

  9. MarcoFalke renamed this:
    [doc] scripted-diff: Clarify that feerates are per virtual size
    [doc] Clarify that feerates are per virtual size
    on May 1, 2021
  10. MarcoFalke renamed this:
    [doc] Clarify that feerates are per virtual size
    doc: Clarify that feerates are per virtual size
    on May 1, 2021
  11. scripted-diff: Clarify that feerates are per virtual size
    -BEGIN VERIFY SCRIPT-
    sed -i 's|/kB|/kvB|g' $( git grep -l '/kB' ./src )
    -END VERIFY SCRIPT-
    fa83e95ac6
  12. MarcoFalke force-pushed on May 1, 2021
  13. MarcoFalke commented at 7:53 am on May 1, 2021: member
    Thanks, done
  14. doc: Clarify that feerates are per virtual size fae196147b
  15. in src/rpc/net.cpp:605 in fa3df8d8b7 outdated
    600@@ -601,8 +601,8 @@ static RPCHelpMan getnetworkinfo()
    601                                 {RPCResult::Type::BOOL, "proxy_randomize_credentials", "Whether randomized credentials are used"},
    602                             }},
    603                         }},
    604-                        {RPCResult::Type::NUM, "relayfee", "minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB"},
    605-                        {RPCResult::Type::NUM, "incrementalfee", "minimum fee increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kB"},
    606+                        {RPCResult::Type::NUM, "relayfee", "minimum relay feerate for transactions in " + CURRENCY_UNIT + "/kvB"},
    607+                        {RPCResult::Type::NUM, "incrementalfee", "minimum feerate increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kvB"},
    


    jonatack commented at 11:33 am on May 1, 2021:
    ISTM the user-facing rpc and qt mostly use “fee rate”

    MarcoFalke commented at 4:22 pm on May 1, 2021:
    Thanks, fixed
  16. MarcoFalke force-pushed on May 1, 2021
  17. ryanofsky approved
  18. ryanofsky commented at 8:20 pm on May 6, 2021: member
    Code review ACK fae196147bae11202c0d54543dc12ba5d92ab0cc. Checked instances where units were being added in the second commit and they all looked right.
  19. MarcoFalke merged this on May 11, 2021
  20. MarcoFalke closed this on May 11, 2021

  21. MarcoFalke deleted the branch on May 11, 2021
  22. sidhujag referenced this in commit cabc7ce1e9 on May 11, 2021
  23. in src/qt/forms/sendcoinsdialog.ui:853 in fae196147b
    849@@ -850,7 +850,7 @@
    850                    <property name="toolTip">
    851                     <string>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size.
    852 
    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>
    854+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>
    


    rebroad commented at 5:26 pm on May 15, 2021:
    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.

    sipa commented at 5:38 pm on May 15, 2021:
    We’re everywhere referring to fee/(v)byte as feerate.
  24. gwillen referenced this in commit 3402d0aa23 on Jun 1, 2022
  25. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me