-
Notifications
You must be signed in to change notification settings - Fork 37.7k
RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN #21934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN #21934
Conversation
…ails during LOCKED_IN
Concept ACK According to BIP 9 (as well as BIP 8):
I'm probably going to be lazy and test this if taproot locks in :-) |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2b19f34
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
}
}
}
@@ -1377,23 +1377,24 @@ static void BIP9SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniVal | |||
case ThresholdState::ACTIVE: bip9.pushKV("status", "active"); break; | |||
case ThresholdState::FAILED: bip9.pushKV("status", "failed"); break; | |||
} | |||
if (ThresholdState::STARTED == thresholdState) | |||
{ | |||
const bool has_signal = (ThresholdState::STARTED == thresholdState || ThresholdState::LOCKED_IN == thresholdState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may_signal
?
…ails during LOCKED_IN Github-Pull: bitcoin#21934 Rebased-From: 2b19f34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK 2b19f34
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
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review-only ACK 2b19f34
Didn't think whether this makes sense, as I likely won't use it.
…onbits signalling details during LOCKED_IN 2b19f34 RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN (Luke Dashjr) Pull request description: 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. ACKs for top commit: prayank23: ACK bitcoin@2b19f34 Sjors: tACK 2b19f34 theStack: Tested ACK 2b19f34 MarcoFalke: review-only ACK 2b19f34 Tree-SHA512: a9bb5adb21992586119cbb5f87e5348eabcab11d5a3bf769b00b69e466589a669846e503f8384fa8927fd77da0c2d64a54f13a7a55a62980046d70f8255ddf47
6538851 Make 'threshold' and 'possible' BIP9 statistics optional (Roman Zeyde) Pull request description: Following bitcoin/bitcoin#21934, latest Bitcoin Core `getblockchaininfo` RPC does not return the `threshold` and `possible` keys after a softwork is locked in: ``` $ bitcoin-cli getblockchaininfo | jq .softforks.taproot { "type": "bip9", "bip9": { "status": "locked_in", "bit": 2, "start_time": 1619222400, "timeout": 1628640000, "since": 687456, "statistics": { "period": 2016, "elapsed": 1721, "count": 1718 }, "min_activation_height": 709632 }, "active": false } ``` ACKs for top commit: RCasatta: ACK 6538851 Tree-SHA512: bc8038c60c5814f2579b9c8860bccd84419e3a58121ee4ab356d9412a15e073efbe91029541b27ccb0a9430e1e6d579d33ffcf07c5b32a133345df35bbfba958
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.