RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN #21934

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:rpc_getblockchaininfo_lockedin_statistics changing 1 files +12 −11
  1. luke-jr commented at 7:31 PM on May 12, 2021: member

    While the signal has no effect during LOCKED_IN, the bit is still defined and recommended for measuring uptake. Makes sense to expose statistics too.

  2. RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN 2b19f3443e
  3. laanwj added the label RPC/REST/ZMQ on May 12, 2021
  4. Sjors commented at 4:19 PM on May 21, 2021: member

    Concept ACK

    According to BIP 9 (as well as BIP 8):

    Miners should continue setting the bit in LOCKED_IN phase so uptake is visible, though this has no effect on consensus rules.

    I'm probably going to be lazy and test this if taproot locks in :-)

  5. DrahtBot commented at 4:18 AM on May 22, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. unknown approved
  7. theStack commented at 4:09 PM on May 24, 2021: member

    Concept ACK

  8. in src/rpc/blockchain.cpp:1380 in 2b19f3443e
    1376 | @@ -1377,23 +1377,24 @@ static void BIP9SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniVal
    1377 |      case ThresholdState::ACTIVE: bip9.pushKV("status", "active"); break;
    1378 |      case ThresholdState::FAILED: bip9.pushKV("status", "failed"); break;
    1379 |      }
    1380 | -    if (ThresholdState::STARTED == thresholdState)
    1381 | -    {
    1382 | +    const bool has_signal = (ThresholdState::STARTED == thresholdState || ThresholdState::LOCKED_IN == thresholdState);
    


    Sjors commented at 9:49 AM on June 16, 2021:

    may_signal?

  9. Sjors approved
  10. Sjors commented at 10:01 AM on June 16, 2021: member

    tACK 2b19f34

    Would be nice to add a test in rpc_blockchain.py

    Result for getblockchaininfo (partial):

    {
      "chain": "main",
      "blocks": 687794,
      "headers": 687794,
      "bestblockhash": "00000000000000000005ffb3c10a9c4f049cdc1b399431ba9c56ea36d7e5351f",
      "softforks": {
       "taproot": {
          "type": "bip9",
          "bip9": {
            "status": "locked_in",
            "bit": 2,
            "start_time": 1619222400,
            "timeout": 1628640000,
            "since": 687456,
            "statistics": {
              "period": 2016,
              "elapsed": 339,
              "count": 338
            },
            "min_activation_height": 709632
          },
          "active": false
        }
      }
    }
    
  11. luke-jr referenced this in commit 3e557107aa on Jun 27, 2021
  12. theStack approved
  13. theStack commented at 1:30 PM on July 20, 2021: member

    Tested ACK 2b19f3443efc9e7868746ea1c603b1027d822f32

    Master/PR branch diff of getblockchaininfo (mainnet) "segwit" soft-fork section output:

    @@ -2,11 +2,16 @@
           "type": "bip9",
           "bip9": {
             "status": "locked_in",
    +        "bit": 2,
             "start_time": 1619222400,
             "timeout": 1628640000,
             "since": 687456,
    +        "statistics": {
    +          "period": 2016,
    +          "elapsed": 2007,
    +          "count": 2002
    +        },
             "min_activation_height": 709632
           },
           "active": false
         }
    
  14. MarcoFalke commented at 2:40 PM on July 20, 2021: member

    review-only ACK 2b19f3443efc9e7868746ea1c603b1027d822f32

    Didn't think whether this makes sense, as I likely won't use it.

  15. MarcoFalke merged this on Jul 21, 2021
  16. MarcoFalke closed this on Jul 21, 2021

  17. sidhujag referenced this in commit 5517ebafb4 on Jul 23, 2021
  18. romanz referenced this in commit 007c9f6cd0 on Jul 29, 2021
  19. romanz referenced this in commit 65388515ad on Jan 8, 2022
  20. RCasatta referenced this in commit 11fcfcf3af on Jan 10, 2022
  21. 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: 2026-04-13 15:14 UTC

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