Skip to content

Conversation

jonatack
Copy link
Member

Rename the status-next field to status_next in getdeploymentinfo before the RPC is released in v23.

Before

Result:
{                                       (json object)
  "hash" : "str",                       (string) requested block hash (or tip)
  "height" : n,                         (numeric) requested block height (or tip)
  "deployments" : {                     (json object)
    "xxxx" : {                          (json object) name of the deployment
      "type" : "str",                   (string) one of "buried", "bip9"
      "height" : n,                     (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
      "active" : true|false,            (boolean) true if the rules are enforced for the mempool and the next block
      "bip9" : {                        (json object, optional) status of bip9 softforks (only for "bip9" type)
        "bit" : n,                      (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status)
        "start_time" : xxx,             (numeric) the minimum median time past of a block at which the bit gains its meaning
        "timeout" : xxx,                (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
        "min_activation_height" : n,    (numeric) minimum height of blocks for which the rules may be enforced
        "status" : "str",               (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed")
        "since" : n,                    (numeric) height of the first block to which the status applies
        "status-next" : "str",          (string) status of deployment at the next block
        "statistics" : {                (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status)
          "period" : n,                 (numeric) the length in blocks of the signalling period
          "threshold" : n,              (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status)
          "elapsed" : n,                (numeric) the number of blocks elapsed since the beginning of the current period
          "count" : n,                  (numeric) the number of blocks with the version bit set in the current period
          "possible" : true|false       (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status)
        },
        "signalling" : "str"            (string) indicates blocks that signalled with a # and blocks that did not with a -
      }
    }
  }
}

After

Result:
{                                       (json object)
  "hash" : "str",                       (string) requested block hash (or tip)
  "height" : n,                         (numeric) requested block height (or tip)
  "deployments" : {                     (json object)
    "xxxx" : {                          (json object) name of the deployment
      "type" : "str",                   (string) one of "buried", "bip9"
      "height" : n,                     (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
      "active" : true|false,            (boolean) true if the rules are enforced for the mempool and the next block
      "bip9" : {                        (json object, optional) status of bip9 softforks (only for "bip9" type)
        "bit" : n,                      (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status)
        "start_time" : xxx,             (numeric) the minimum median time past of a block at which the bit gains its meaning
        "timeout" : xxx,                (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
        "min_activation_height" : n,    (numeric) minimum height of blocks for which the rules may be enforced
        "status" : "str",               (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed")
        "since" : n,                    (numeric) height of the first block to which the status applies
        "status_next" : "str",          (string) status of deployment at the next block
        "statistics" : {                (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status)
          "period" : n,                 (numeric) the length in blocks of the signalling period
          "threshold" : n,              (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status)
          "elapsed" : n,                (numeric) the number of blocks elapsed since the beginning of the current period
          "count" : n,                  (numeric) the number of blocks with the version bit set in the current period
          "possible" : true|false       (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status)
        },
        "signalling" : "str"            (string) indicates blocks that signalled with a # and blocks that did not with a -
      }
    }
  }
}

@jonatack
Copy link
Member Author

Hm, this field is in getblockchaininfo too, so it may break the existing API.

@jonatack jonatack closed this Mar 11, 2022
@ajtowns
Copy link
Contributor

ajtowns commented Mar 11, 2022

It was introduced into getblockchaininfo at the same time getdeploymentinfo was added, so it's not an additional break to the existing API.

@jonatack
Copy link
Member Author

Thanks @ajtowns, re-opening.

@jonatack jonatack reopened this Mar 11, 2022
@ajtowns
Copy link
Contributor

ajtowns commented Mar 11, 2022

ACK if it can make it into 23.0

@maflcko maflcko added this to the 23.0 milestone Mar 11, 2022
@maflcko
Copy link
Member

maflcko commented Mar 13, 2022

ACK. Looks like we prefer underscore over dash everywhere else.

@maflcko maflcko merged commit e04720e into bitcoin:master Mar 13, 2022
@jonatack jonatack deleted the getdeploymentinfo-rename-status-next-to-status_next branch March 13, 2022 09:47
@jonatack jonatack mentioned this pull request Mar 13, 2022
@jonatack
Copy link
Member Author

Added this commit to #24512.

jonatack added a commit to jonatack/bitcoin that referenced this pull request Mar 13, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 13, 2022
…tus_next

5d7c69b rpc: rename getdeploymentinfo status-next to status_next (Jon Atack)

Pull request description:

  Rename the `status-next` field to `status_next` in getdeploymentinfo before the RPC is released in v23.

  Before
  ```
  Result:
  {                                       (json object)
    "hash" : "str",                       (string) requested block hash (or tip)
    "height" : n,                         (numeric) requested block height (or tip)
    "deployments" : {                     (json object)
      "xxxx" : {                          (json object) name of the deployment
        "type" : "str",                   (string) one of "buried", "bip9"
        "height" : n,                     (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
        "active" : true|false,            (boolean) true if the rules are enforced for the mempool and the next block
        "bip9" : {                        (json object, optional) status of bip9 softforks (only for "bip9" type)
          "bit" : n,                      (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status)
          "start_time" : xxx,             (numeric) the minimum median time past of a block at which the bit gains its meaning
          "timeout" : xxx,                (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
          "min_activation_height" : n,    (numeric) minimum height of blocks for which the rules may be enforced
          "status" : "str",               (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed")
          "since" : n,                    (numeric) height of the first block to which the status applies
          "status-next" : "str",          (string) status of deployment at the next block
          "statistics" : {                (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status)
            "period" : n,                 (numeric) the length in blocks of the signalling period
            "threshold" : n,              (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status)
            "elapsed" : n,                (numeric) the number of blocks elapsed since the beginning of the current period
            "count" : n,                  (numeric) the number of blocks with the version bit set in the current period
            "possible" : true|false       (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status)
          },
          "signalling" : "str"            (string) indicates blocks that signalled with a # and blocks that did not with a -
        }
      }
    }
  }
  ```
  After
  ```
  Result:
  {                                       (json object)
    "hash" : "str",                       (string) requested block hash (or tip)
    "height" : n,                         (numeric) requested block height (or tip)
    "deployments" : {                     (json object)
      "xxxx" : {                          (json object) name of the deployment
        "type" : "str",                   (string) one of "buried", "bip9"
        "height" : n,                     (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
        "active" : true|false,            (boolean) true if the rules are enforced for the mempool and the next block
        "bip9" : {                        (json object, optional) status of bip9 softforks (only for "bip9" type)
          "bit" : n,                      (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status)
          "start_time" : xxx,             (numeric) the minimum median time past of a block at which the bit gains its meaning
          "timeout" : xxx,                (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
          "min_activation_height" : n,    (numeric) minimum height of blocks for which the rules may be enforced
          "status" : "str",               (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed")
          "since" : n,                    (numeric) height of the first block to which the status applies
          "status_next" : "str",          (string) status of deployment at the next block
          "statistics" : {                (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status)
            "period" : n,                 (numeric) the length in blocks of the signalling period
            "threshold" : n,              (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status)
            "elapsed" : n,                (numeric) the number of blocks elapsed since the beginning of the current period
            "count" : n,                  (numeric) the number of blocks with the version bit set in the current period
            "possible" : true|false       (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status)
          },
          "signalling" : "str"            (string) indicates blocks that signalled with a # and blocks that did not with a -
        }
      }
    }
  }
  ```

Top commit has no ACKs.

Tree-SHA512: 4facfd7af3cfb7b6f5495758c4387602802f5e39d9270b162d17350a7f954eab0b74d895f17f0d8dfbc7814d36db7cff56d08c42728432885ea6f4e37aea4aa8
hebasto pushed a commit to hebasto/bitcoin that referenced this pull request Mar 31, 2022
fanquake added a commit that referenced this pull request Mar 31, 2022
174af33 util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem) (Hennadii Stepanov)
ded10fe build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov)
26c2f23 build: Fix Boost.Process detection on macOS arm64 (Hennadii Stepanov)
85f85c7 util: add linkat to syscall sandbox (AllowFileSystem) (fanquake)
eaa0419 contrib: fix signet miner (sighash mismatch) (Sebastian Falbesoner)
235b042 rpc: Exclude descriptor when address is excluded (MarcoFalke)
b05a59b ci: Temporarily use clang-13 to work around clang-14 TSan bug (MarcoFalke)
65b9667 doc, init: add links to doc/cjdns.md (Jon Atack)
7a553d4 doc: update i2p.md with cjdns, improve local addresses section (Jon Atack)
4148396 doc: update tor.md with cjdns and getnodeaddresses, fix tor grep, (Jon Atack)
4690e8a doc: create initial doc/cjdns.md for cjdns how-to documentation (Jon Atack)
5d24f61 Clarify in -maxtimeadjustment that only outbound peers influence time data (Jon Atack)
b1646f1 test: set segwit height back to 0 on regtest (Martin Zumsande)
ef6a37b rpc: rename getdeploymentinfo status-next to status_next (Jon Atack)
2a6fcf9 init, doc: improve -onlynet help and tor/i2p documentation (Jon Atack)

Pull request description:

  Backport the following to 23.x:

  - #24468
  - #24528
  - #24527
  - #24609
  - #24555
  - #24663
  - #24572
  - #24636
  - #24553
  - #24659
  - #24521
  - #24523
  - #24690
  - #24710

  Possibly also:
  - #24579
  - #24691

ACKs for top commit:
  laanwj:
    List-of-commits ACK 174af33, I think we should merge this and move forward with rc3..
  hebasto:
    ACK 174af33

Tree-SHA512: 5a493e1652b780b527767d6ca9e67012abd2fa5573496e85e0d8aa4bed3eb332bfcd72610b8dfb954ff274d42450623233c96c479de2085b9c8344ba5abf1935
@bitcoin bitcoin locked and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants