MAX_BLOCK_SERIALIZED_SIZE is not a consensus-enforced constant #10289

issue SergioDemianLerner opened this issue on April 27, 2017
  1. SergioDemianLerner commented at 7:07 PM on April 27, 2017: contributor

    The constant MAX_BLOCK_SERIALIZED_SIZE in
    https://github.com/bitcoin/bitcoin/blob/master/src/consensus/consensus.h#L12

    is not a consensus constant. It's not enforced by consensus code. Its presence in consensus.h only confuses the reader.

    What version of bitcoin-core are you using?

    0.14.0

  2. TheBlueMatt commented at 3:09 AM on April 28, 2017: contributor

    I believe the comment that's there is intended to imply this, do you have a proposed better wording for it?

    On April 27, 2017 3:07:34 PM EDT, Sergio notifications@github.com wrote:

    The constant MAX_BLOCK_SERIALIZED_SIZE in
    https://github.com/bitcoin/bitcoin/blob/master/src/consensus/consensus.h#L12

    is not a consensus constant. It's not enforced by consensus code. Its presence in consensus.h only confuses the reader.

    What version of bitcoin-core are you using?

    0.14.0

  3. dcousens commented at 3:46 AM on April 28, 2017: contributor

    @TheBlueMatt I suppose the idea was that, if it isn't relevant to consensus, why is it in consensus.h

  4. sipa commented at 4:03 AM on April 28, 2017: member

    It isn't exactly a consensus constant, but it is related to it (if it's set to a value below the consensus maximum, some of the rescanning/network code may start failing). Perhaps we should just remove the constant, and replace its use sites with an expression that computes it from consensus constants.

  5. fanquake added the label Consensus on Apr 28, 2017
  6. maflcko added the label Brainstorming on Nov 10, 2017
  7. maflcko removed the label Consensus on Nov 10, 2017
  8. pinheadmz commented at 4:51 PM on April 6, 2023: member

    Could the useage sites be switched to MAX_BLOCK_WEIGHT?

    an expression that computes it from consensus constants.

    What would this expression be besides MAX_BLOCK_WEIGHT * 1 ?

  9. pinheadmz commented at 1:41 PM on April 27, 2023: member

    This issue is unlikely to be fixed in Bitcoin Core. We'll close for now, but feel free to open another issue or pull request with a fix.

  10. pinheadmz closed this on Apr 27, 2023

  11. bitcoin locked this on Apr 26, 2024

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: 2026-04-24 18:16 UTC

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