mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Undo default signalling behavior for dynafed unless enabled
This commit is contained in:
parent
2665406602
commit
b104f95651
6 changed files with 31 additions and 4 deletions
|
|
@ -50,6 +50,7 @@ void SetupChainParamsBaseOptions()
|
||||||
gArgs.AddArg("-multi_data_permitted", "Allow relay of multiple OP_RETURN outputs. (default: -enforce_pak)", false, OptionsCategory::ELEMENTS);
|
gArgs.AddArg("-multi_data_permitted", "Allow relay of multiple OP_RETURN outputs. (default: -enforce_pak)", false, OptionsCategory::ELEMENTS);
|
||||||
gArgs.AddArg("-con_csv_deploy_start", "Starting height for CSV deployment. (default: -1, which means ACTIVE from genesis)", false, OptionsCategory::ELEMENTS);
|
gArgs.AddArg("-con_csv_deploy_start", "Starting height for CSV deployment. (default: -1, which means ACTIVE from genesis)", false, OptionsCategory::ELEMENTS);
|
||||||
gArgs.AddArg("-con_dyna_deploy_start", "Starting height for Dynamic Federations deployment. Once active, signblockscript becomes a BIP141 WSH scriptPubKey of the original signblockscript. All other dynamic parameters stay constant.(default: -1, which means ACTIVE from genesis)", false, OptionsCategory::ELEMENTS);
|
gArgs.AddArg("-con_dyna_deploy_start", "Starting height for Dynamic Federations deployment. Once active, signblockscript becomes a BIP141 WSH scriptPubKey of the original signblockscript. All other dynamic parameters stay constant.(default: -1, which means ACTIVE from genesis)", false, OptionsCategory::ELEMENTS);
|
||||||
|
gArgs.AddArg("-con_dyna_deploy_signal", "Whether to signal for the Dynamic Federations deployment (default: false).", false, OptionsCategory::ELEMENTS);
|
||||||
gArgs.AddArg("-dynamic_epoch_length", "Per-chain parameter that sets how many blocks dynamic federation voting and enforcement are in effect for.", false, OptionsCategory::ELEMENTS);
|
gArgs.AddArg("-dynamic_epoch_length", "Per-chain parameter that sets how many blocks dynamic federation voting and enforcement are in effect for.", false, OptionsCategory::ELEMENTS);
|
||||||
gArgs.AddArg("-total_valid_epochs", "Per-chain parameter that sets how long a particular fedpegscript is in effect for.", false, OptionsCategory::ELEMENTS);
|
gArgs.AddArg("-total_valid_epochs", "Per-chain parameter that sets how long a particular fedpegscript is in effect for.", false, OptionsCategory::ELEMENTS);
|
||||||
// END ELEMENTS
|
// END ELEMENTS
|
||||||
|
|
|
||||||
|
|
@ -1829,6 +1829,15 @@ int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Para
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Undo default signalling behavior for dynafed unless explicitly enabled.
|
||||||
|
if (!gArgs.GetBoolArg("-con_dyna_deploy_signal", false)) {
|
||||||
|
auto dynafed = Consensus::DeploymentPos::DEPLOYMENT_DYNA_FED;
|
||||||
|
int bit = params.vDeployments[dynafed].bit;
|
||||||
|
if (bit > 0 && bit < VERSIONBITS_NUM_BITS) {
|
||||||
|
nVersion &= ~VersionBitsMask(params, dynafed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nVersion;
|
return nVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ class BlockSignTest(BitcoinTestFramework):
|
||||||
"-con_max_block_sig_size={}".format(self.required_signers*74+self.num_nodes*33),
|
"-con_max_block_sig_size={}".format(self.required_signers*74+self.num_nodes*33),
|
||||||
"-anyonecanspendaremine=1",
|
"-anyonecanspendaremine=1",
|
||||||
"-con_dyna_deploy_start=0",
|
"-con_dyna_deploy_start=0",
|
||||||
|
"-con_dyna_deploy_signal=1",
|
||||||
]] * self.num_nodes
|
]] * self.num_nodes
|
||||||
|
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,15 @@ class DynaFedTest(BitcoinTestFramework):
|
||||||
self.setup_clean_chain = True
|
self.setup_clean_chain = True
|
||||||
self.num_nodes = 2
|
self.num_nodes = 2
|
||||||
# We want to test activation of dynafed
|
# We want to test activation of dynafed
|
||||||
self.extra_args = [["-con_dyna_deploy_start=1000", "-enforce_pak=1", "-con_parent_chain_signblockscript=51", "-peginconfirmationdepth=1", "-parentscriptprefix=75", "-parent_bech32_hrp=ert"] for i in range(self.num_nodes)]
|
self.extra_args = [[
|
||||||
|
"-con_dyna_deploy_start=1000",
|
||||||
|
"-enforce_pak=1",
|
||||||
|
"-con_parent_chain_signblockscript=51",
|
||||||
|
"-peginconfirmationdepth=1",
|
||||||
|
"-parentscriptprefix=75",
|
||||||
|
"-parent_bech32_hrp=ert",
|
||||||
|
"-con_dyna_deploy_signal=1",
|
||||||
|
] for i in range(self.num_nodes)]
|
||||||
# second node will not mine transactions
|
# second node will not mine transactions
|
||||||
self.extra_args[1].append("-blocksonly=1")
|
self.extra_args[1].append("-blocksonly=1")
|
||||||
# Make sure nothing breaks if peers have a different activation.
|
# Make sure nothing breaks if peers have a different activation.
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,15 @@ class SighashRangeproofTest(BitcoinTestFramework):
|
||||||
self.setup_clean_chain = True
|
self.setup_clean_chain = True
|
||||||
self.num_nodes = 3
|
self.num_nodes = 3
|
||||||
# We want to test activation of dynafed
|
# We want to test activation of dynafed
|
||||||
args = ["-con_dyna_deploy_start=1000", "-blindedaddresses=1", "-initialfreecoins=2100000000000000", "-con_blocksubsidy=0", "-con_connect_genesis_outputs=1", "-txindex=1"]
|
self.extra_args = [[
|
||||||
self.extra_args = [args] * self.num_nodes
|
"-con_dyna_deploy_start=1000",
|
||||||
|
"-con_dyna_deploy_signal=1",
|
||||||
|
"-blindedaddresses=1",
|
||||||
|
"-initialfreecoins=2100000000000000",
|
||||||
|
"-con_blocksubsidy=0",
|
||||||
|
"-con_connect_genesis_outputs=1",
|
||||||
|
"-txindex=1",
|
||||||
|
]] * self.num_nodes
|
||||||
self.extra_args[0].append("-anyonecanspendaremine=1") # first node gets the coins
|
self.extra_args[0].append("-anyonecanspendaremine=1") # first node gets the coins
|
||||||
|
|
||||||
def skip_test_if_missing_module(self):
|
def skip_test_if_missing_module(self):
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ class TweakFedpegTest(BitcoinTestFramework):
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"-fedpegscript="+LIQUID_SCRIPT,
|
"-fedpegscript="+LIQUID_SCRIPT,
|
||||||
"-con_dyna_deploy_start=0" # test dynafed derivation
|
"-con_dyna_deploy_signal=1",
|
||||||
|
"-con_dyna_deploy_start=0", # test dynafed derivation
|
||||||
]]
|
]]
|
||||||
|
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue