mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 20:49:50 +01:00
Merge #21377: Speedy trial support for versionbits
ffe33dfbd4chainparams: drop versionbits threshold to 90% for mainnnet and signet (Anthony Towns)f054f6bcd2versionbits: simplify state transitions (Anthony Towns)55ac5f568aversionbits: Add explicit NEVER_ACTIVE deployments (Anthony Towns)dd07e6da48fuzz: test versionbits delayed activation (Anthony Towns)dd85d5411ctests: test versionbits delayed activation (Anthony Towns)73d4a70639versionbits: Add support for delayed activation (Anthony Towns)9e6b65f6fatests: clean up versionbits test (Anthony Towns)5932744450tests: test ComputeBlockVersion for all deployments (Anthony Towns)63879f0a47tests: pull ComputeBlockVersion test into its own function (Anthony Towns) Pull request description: BIP9-based implementation of "speedy trial" activation specification, see https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-March/018583.html Edge cases are tested by fuzzing added in #21380. ACKs for top commit: instagibbs: tACKffe33dfbd4jnewbery: utACKffe33dfbd4MarcoFalke: review ACKffe33dfbd4💈 achow101: re-ACKffe33dfbd4gmaxwell: ACKffe33dfbd4benthecarman: ACKffe33dfbd4Sjors: ACKffe33dfbd4jonatack: Initial approach ACKffe33dfbd4after a first pass of review, building and testing each commit, mostly looking at the changes and diffs. Will do a more high-level review iteration. A few minor comments follow to pick/choose/ignore. ariard: Code Review ACKffe33dfTree-SHA512: f79a7146b2450057ee92155cbbbcec12cd64334236d9239c6bd7d31b32eec145a9781c320f178da7b44ababdb8808b84d9d22a40e0851e229ba6d224e3be747c
This commit is contained in:
@@ -1228,10 +1228,8 @@ static void BuriedForkDescPushBack(UniValue& softforks, const std::string &name,
|
||||
static void BIP9SoftForkDescPushBack(UniValue& softforks, const std::string &name, const Consensus::Params& consensusParams, Consensus::DeploymentPos id) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||
{
|
||||
// For BIP9 deployments.
|
||||
// Deployments (e.g. testdummy) with timeout value before Jan 1, 2009 are hidden.
|
||||
// A timeout value of 0 guarantees a softfork will never be activated.
|
||||
// This is used when merging logic to implement a proposed softfork without a specified deployment schedule.
|
||||
if (consensusParams.vDeployments[id].nTimeout <= 1230768000) return;
|
||||
// Deployments that are never active are hidden.
|
||||
if (consensusParams.vDeployments[id].nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE) return;
|
||||
|
||||
UniValue bip9(UniValue::VOBJ);
|
||||
const ThresholdState thresholdState = VersionBitsState(::ChainActive().Tip(), consensusParams, id, versionbitscache);
|
||||
@@ -1261,6 +1259,7 @@ static void BIP9SoftForkDescPushBack(UniValue& softforks, const std::string &nam
|
||||
statsUV.pushKV("possible", statsStruct.possible);
|
||||
bip9.pushKV("statistics", statsUV);
|
||||
}
|
||||
bip9.pushKV("min_activation_height", consensusParams.vDeployments[id].min_activation_height);
|
||||
|
||||
UniValue rv(UniValue::VOBJ);
|
||||
rv.pushKV("type", "bip9");
|
||||
@@ -1307,6 +1306,7 @@ RPCHelpMan getblockchaininfo()
|
||||
{RPCResult::Type::NUM_TIME, "start_time", "the minimum median time past of a block at which the bit gains its meaning"},
|
||||
{RPCResult::Type::NUM_TIME, "timeout", "the median time past of a block at which the deployment is considered failed if not yet locked in"},
|
||||
{RPCResult::Type::NUM, "since", "height of the first block to which the status applies"},
|
||||
{RPCResult::Type::NUM, "min_activation_height", "minimum height of blocks for which the rules may be enforced"},
|
||||
{RPCResult::Type::OBJ, "statistics", "numeric statistics about BIP9 signalling for a softfork (only for \"started\" status)",
|
||||
{
|
||||
{RPCResult::Type::NUM, "period", "the length in blocks of the BIP9 signalling period"},
|
||||
|
||||
Reference in New Issue
Block a user