Consensus: Modified BIP8 implementation #10462

pull jtimon wants to merge 5 commits into bitcoin:master from jtimon:b15-bip8-min changing 8 files +101 −24
  1. jtimon commented at 11:49 PM on May 26, 2017: contributor

    This is @shaolinfry 's implementation of bip8, but rebased, with some minor nits by myself freely applied, some squashes and with some sensible renames left out for later/before (whatever is decided, that's just self-documentation; orthogonal. Didn't separate s/BIP9SoftForkDescPushBack/VBSoftForkDescPushBack/ because I don't think it's worth it: it helps for review IMO and it's minimal).

    Please no merge before we decide what to do with my new TODO comment lines (I want to add something to bip8 for warnings), but I think review for bip8 as it is now can begin at any time. Kudos again to @shaolinfry not just for the idea but also for the cleanness: I enjoyed reviewing and rebasing this.

    EDIT:

    This modifies the original BIP specification to enable warnings for unkown deployments being locked in by bip8 timeout as proposed in https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-May/014417.html

    Dependencies:

    • Introduce static DoWarning (simplify UpdateTip) #10464
  2. jtimon renamed this:
    BIP8 implementation
    NOMERGE: Consensus: BIP8 implementation
    on May 26, 2017
  3. fanquake added the label Consensus on May 27, 2017
  4. jtimon force-pushed on May 27, 2017
  5. shaolinfry commented at 4:01 AM on May 27, 2017: contributor

    @jtimon It was not squashed because that harms review, people need to see each atomic change. Squash can be trivial after the code review. FWIW I have deliberately held back on any PRs to Bitcoin Core until nearer the time. I don't think "NOMERGE" pull requests are helpful, better to just have a serious pull request.

  6. jtimon commented at 12:14 PM on May 27, 2017: contributor

    It was not squashed because that harms review, people need to see each atomic change. Squash can be trivial after the code review.

    I can separate it back, but I disagree that having this in a single commit hurts review or that the commit doesn't represent an atomic change. And it's still quite simple.

    FWIW I have deliberately held back on any PRs to Bitcoin Core until nearer the time.

    What time? BIP8 is a generic mechanism that can be used for any future deployment.

    I don't think "NOMERGE" pull requests are helpful, better to just have a serious pull request.

    I think this PR is very serious as it provides the implementation for the current bip8 specification. I added "NOMERGE" because of the TODOs, because I want bip8's specification to change (and then change this PR to add the suggested addition), please, see https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-May/014417.html

  7. BIP8 implementation
    If flag set, transition to LOCKED_IN on timeout.
    
    Also Add BIP8 reporting to getblockchaininfo RPC
    b74e6cf8f3
  8. BIP8: Separated THRESHOLD_LOCKED_IN_BY_TIMEOUT state 71a022b350
  9. Introduce static DoWarning (simplify UpdateTip) efc1fb4d16
  10. BIP8: Warn when unkown deployments are locked in by bip8 timeout 01148bd417
  11. jtimon force-pushed on May 27, 2017
  12. jtimon renamed this:
    NOMERGE: Consensus: BIP8 implementation
    Consensus: Modified BIP8 implementation
    on May 27, 2017
  13. jtimon commented at 5:11 PM on May 27, 2017: contributor

    @shaolinfry updated the code to include my proposed modifications to bip8, updated OP and tittle. If you like the idea, I'm happy to help modifying the specification, otherwise I guess I will create a competing an extension one.

  14. f'BIP8: Separated THRESHOLD_LOCKED_IN_BY_TIMEOUT state' 2f88e5dcdc
  15. in src/rpc/blockchain.cpp:1128 in 2f88e5dcdc
    1124 | @@ -1124,6 +1125,15 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
    1125 |              "        },\n"
    1126 |              "     }, ...\n"
    1127 |              "  ],\n"
    1128 | +            "  \"bip8_softforks\": {          (object) status of BIP9 softforks in progress\n"
    


    kallewoof commented at 9:15 AM on May 30, 2017:

    Typo: should be BIP8 softforks

  16. shaolinfry commented at 6:20 AM on May 31, 2017: contributor

    This modification doesnt make sense and I already went through a similar iteration during development.

    The warning system will already notify users of unknown bits being signalled, and considering UASF deployment will be for a year. For upgraded clients they will also additionally emit warnings once LOCKED_IN has been reached. Unknown bits is also backwards compatible with BIP9 aware nodes.

    Asking miners to set a bit in order to trigger warnings seems fraught with trouble as well as for false triggering. I dont think it would work for parallel deployments.

    Soft forks are always deployed with considerable planning, and ecosystem collaboration, we cannot rely just on technical means, and actually, too many error messages or false warning just numbs users into ignoring them. We already say that happen with the chain split detection system which was removed a while ago.

  17. jtimon commented at 6:28 PM on June 5, 2017: contributor

    Thanks for the review!

    The warning system will already notify users of unknown bits being signalled

    Only if the same bit is active for 95% of a diff adjustment period (ie only when an unkown bip9 deployment seems to have locked in).

    and considering UASF deployment will be for a year.

    This depends on the concrete deployment, bip8 is general like bip9.

    For upgraded clients they will also additionally emit warnings once LOCKED_IN has been reached. Unknown bits is also backwards compatible with BIP9 aware nodes.

    Only if they lock in by bip9, not by bip8 (what this modification covers).

    Asking miners to set a bit in order to trigger warnings seems fraught with trouble as well as for false triggering. I dont think it would work for parallel deployments.

    If they don't signal, the warning after lock in via bip8 won't be shown, but that's no worse than the current bip8 without this modification. False signaling is more concerning, probably the code should allow for bip8 warnings to be disabled optionally. False signaling is also possible today (although requires 95% to trigger the warning), so perhaps we should also add an option to disable bip9 warnings.

    I think there's little incentive for miners to false signal here (or with plain bip9) though.

  18. jtimon commented at 11:11 PM on June 24, 2017: contributor
  19. jtimon closed this on Jun 24, 2017

  20. DrahtBot 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: 2026-04-17 15:15 UTC

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