[0.13] release-notes: Do not encourage changing blockmaxsize to blockmaxweight #8459

pull luke-jr wants to merge 2 commits into bitcoin:0.13 from luke-jr:0.13_relnotes_remove_bad_advice changing 1 files +5 −20
  1. luke-jr commented at 7:18 pm on August 4, 2016: member

    Alternative to #8388 without the code changes. Since the only difference is adding numbers, there shouldn’t be any noticable performance hit with blockmaxsize anyway.

    (If we want to eliminate any difference just in case, another code change possibility would be to simply translate blockmaxsize to blockmaxweight when segwit is not enabled (ie, mainnet): 29000050e575a26b7f7c853cbccdb6bc60ddfdd9.)

  2. laanwj added the label Docs and Output on Aug 4, 2016
  3. laanwj added this to the milestone 0.13.0 on Aug 4, 2016
  4. sipa commented at 8:59 pm on August 4, 2016: member
    ACK
  5. sdaftuar commented at 9:07 pm on August 4, 2016: member
    Nack, see discussion in #8374
  6. luke-jr commented at 9:25 pm on August 4, 2016: member
    @sdaftuar #8374 should never have been merged with this language in the first place. The advice given is bad advice and harmful to Bitcoin. There is no reason to suspect there is any observable performance difference either, and even if there was, it would not be an excuse to give bad advice.
  7. sipa commented at 9:35 pm on August 4, 2016: member

    @luke-jr The advice given is something that’s inevitably going to happen by adopting segwit, and you can’t expect miners to decide to cut in their own flesh in order to making competition easier.

    I am fine with not giving advice either way. I prefer to still mention the performance effect, though.

  8. luke-jr commented at 9:44 pm on August 4, 2016: member

    If miners start producing way-too-large blocks immediately when segwit activates, that would be cutting their own flesh.

    There is no evidence of a performance effect, and fixing any trivial difference is so simple here (3 easily-reviewed LOC: 29000050e575a26b7f7c853cbccdb6bc60ddfdd9) that it would be very poor judgement to prefer giving bad advice rather than just fixing it.

  9. morcos commented at 9:54 pm on August 4, 2016: member

    NACK these changes

    It’s important to explain the changes so that miners can make educated decisions on how to use the code. blockmaxweight is now the consensus enforced limit and I think its pretty relevant to explain to miners that using that is the most direct way to create blocks that maximize fees while being consensus compatible. Although it is true in this version you could achieve the same effect using blockmaxsize, you’ll be doing extra computation for no reason.

    In the end, I think its most important to provide explanation about what the functionality and command line option changes are and the prior version does a better job at that than this.

  10. sipa commented at 9:58 pm on August 4, 2016: member
    Compromise: can we just remove the second and third paragraph modified by this PR? That way we still explain the difference in what the code optimizes for, without the performance effect (which is at this point not known to be significant, and in any case, not worse than 0.12).
  11. release-notes: Do not encourage changing blockmaxsize to blockmaxweight 2d081ffde2
  12. release-notes: Clarify meaning of transaction selection 29f05100e2
  13. luke-jr force-pushed on Aug 4, 2016
  14. luke-jr commented at 10:35 pm on August 4, 2016: member

    Ok, I made the compromise change suggested by @sipa.

    I also added (in a separate commit) what I believe explains the change clearer, which can be merged with this or backed out if there’s some issue with it.

  15. sdaftuar commented at 1:06 am on August 5, 2016: member

    NACK removal of mentioning the potential performance effect from using -blockmaxsize.

    In rewriting CreateNewBlock to do ancestor feerate mining, an important consideration was being able to fail fast if a package wouldn’t fit in a block, due to size or sigops. In that situation, we are able to skip the call to CalculateMemPoolAncestors. This makes it pretty cheap to iterate the whole mempool looking for things to add, even when we’re very close to the size (or sigops) limit. (The old addScoreTx’s had a heuristic for bailing out early from mempool looping when it got close to the size limit, I believe because it had to do more expensive calculations to figure out if a transaction could be added to a block.)

    However, the -blockmaxsize constraint cannot currently be calculated at the package level – we can only test for that constraint after calculating the ancestors of a transaction to be added, and considering each one in turn. Consequently, if someone were to configure the mining code with a -blockmaxsize that is less than -blockmaxweight/4, then we should expect a very inefficient result in CreateNewBlock, because once we’re very close to the -blockmaxsize constraint but still have room on the weight constraint, we’d be walking everything in the mempool and calculating ancestors for each transaction, and then walking those ancestors, just to find that the package fails as we count each transaction’s bytes. With a default chain limit length of 25, I think as a first guess, in the worst case I’d assume that such a configuration could slow down the transaction selection part of CreateNewBlock by roughly a factor of 25.

    So to be clear, it is incorrect to say that the only difference between using -blockmaxsize and -blockmaxweight is “adding numbers”. These options can interact badly, and it’s important to disclose that potential performance degradation if misused. I think the existing release notes language does an adequate job of neutrally explaining the issue. I would not object to language changes that further clarify how these parameters interact, but I strongly object to withholding material information about how the software works.

  16. sipa commented at 1:45 am on August 5, 2016: member
    Ah, I wasn’t aware of the risk for long iterations to fill up the last part of a block. I retract my suggestion.
  17. luke-jr commented at 3:10 am on August 5, 2016: member
    @sdaftuar Almost sounds like the sane policy is being intentionally sabotaged there… nevertheless, do you see any reason 29000050e575a26b7f7c853cbccdb6bc60ddfdd9 will not cleanly address that for 0.13?
  18. MarcoFalke added the label Mining on Aug 10, 2016
  19. laanwj commented at 8:49 am on August 25, 2016: member
    This didn’t make 0.13.0
  20. laanwj closed this on Aug 25, 2016

  21. 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: 2025-01-15 09:12 UTC

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