Rename “block cost” to “block weight” #8363

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:cost-to-weight changing 18 files +69 −69
  1. sdaftuar commented at 5:46 pm on July 18, 2016: member

    Alternate to #8354/#8359. Intended for 0.13.0.

    As @laanwj observed, this is somewhat of a tedious change to make, but I do think that it’d be better to make this change now than live with the confusing “cost” terminology indefinitely into the future.

    If we go with this, we should re-open https://github.com/bitcoin/bips/pull/420 and make the corresponding change to the BIP.

    I didn’t change qt/bitcoinstrings.cpp, which – if I am understanding correctly – was just changed so that we wouldn’t translate the help language for -blockmaxcost. Should I push a commit to this PR that changes the text there as well to refer to “weight”, to make this change self-contained?

    There’s one more language reconciliation we should still do after this, which is that BIP 141 doesn’t define “sigop cost”, yet we refer to “sigop cost” as a term both in RPC calls (eg getblocktemplate) and throughout the code (comments, variables, function names, etc). I think it’d be best to pick a term, use that in the BIP, and then make a pass through the code to be compatible – presumably the simplest thing would be to just define “sigop cost” in BIP 141.

  2. Rename "block cost" to "block weight" 2c06bae39e
  3. MarcoFalke added the label Mining on Jul 18, 2016
  4. MarcoFalke added the label Needs backport on Jul 18, 2016
  5. MarcoFalke commented at 6:03 pm on July 18, 2016: member
    utACK 2c06bae39edfaa9c0855d83377ad8fda09e4fa08
  6. luke-jr commented at 7:45 pm on July 18, 2016: member

    Concept ACK here. BIP 145 also needs updating.

    Re sigops, it’s IMO simply a bug that Core uses “sigop cost” anywhere, and should be fixed by changing it to either “sigops” or (in comments/help only, not RPC) “BIP141 sigops”.

  7. btcdrak commented at 8:09 pm on July 18, 2016: contributor
    utACK 2c06bae
  8. sipa commented at 8:12 pm on July 18, 2016: member
    utACK 2c06bae39edfaa9c0855d83377ad8fda09e4fa08
  9. laanwj commented at 10:02 am on July 19, 2016: member

    Should I push a commit to this PR that changes the text there as well to refer to “weight”, to make this change self-contained?

    No, better to not update bitcoinstrings.cpp manually, it’s supposed to be updated as part of translation updates (make translate).

  10. laanwj merged this on Jul 19, 2016
  11. laanwj closed this on Jul 19, 2016

  12. laanwj referenced this in commit ca7550e128 on Jul 19, 2016
  13. laanwj referenced this in commit fca1a415ce on Jul 19, 2016
  14. MarcoFalke removed the label Needs backport on Jul 31, 2016
  15. MarcoFalke locked this on Sep 8, 2021

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-22 06:12 UTC

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