Skip to content

Commit

Permalink
Sugarchain: Settings Part 4
Browse files Browse the repository at this point in the history
- Changes:
  * DEFAULT_FALLBACK_FEE
  * BIP16Exception
  * BIP34Height, BIP34Hash
  * BIP65Height
  * BIP66Height
  * CSVHeight
  * SegwitHeight
  * MinBIP9WarningHeight
  * nPowTargetTimespan
  * nRuleChangeActivationThreshold
  * nMinerConfirmationWindow

- Fixed Tests:
  * src/test/versionbits_tests.cpp (however not even broken)
  • Loading branch information
decryp2kanon committed Nov 20, 2020
1 parent 365d7f4 commit 0b40a90
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
62 changes: 31 additions & 31 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ class CMainParams : public CChainParams {
consensus.signet_blocks = false;
consensus.signet_challenge.clear();
consensus.nSubsidyHalvingInterval = 12500000;
consensus.BIP16Exception = uint256S("");
consensus.BIP34Height = 227931;
consensus.BIP34Hash = uint256S("");
consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0
consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
consensus.CSVHeight = 419328; // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5
consensus.SegwitHeight = 481824; // 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
consensus.MinBIP9WarningHeight = 483840; // segwit activation height + miner confirmation window
consensus.BIP16Exception = uint256{};
consensus.BIP34Height = 17;
consensus.BIP34Hash = uint256S("0x72e36f3fcdf98d3625dfe03f28a914c513b913231e479d53fc22e5e46cf5b585"); // getblockhash 17
consensus.BIP65Height = 0; // Always on
consensus.BIP66Height = 0; // Always on
consensus.CSVHeight = 0; // Always on
consensus.SegwitHeight = 0; // Always on
consensus.MinBIP9WarningHeight = 12240; // segwit activation height + miner confirmation window
consensus.powLimit = uint256S("003fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetTimespan = 61200; // 17 hours = 17*60*60 = 61200
consensus.nPowTargetSpacing = 5;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.fPowNoRetargeting = false;
consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
consensus.nRuleChangeActivationThreshold = 9180; // 75% of nMinerConfirmationWindow = 61200/5*0.75 = 9180 (was 1916 = 1209600/600*0.95+0.8) // 9180/510 = 18 cycles of DigiShieldZEC
consensus.nMinerConfirmationWindow = 12240; // nPowTargetTimespan / nPowTargetSpacing
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
Expand Down Expand Up @@ -181,21 +181,21 @@ class CTestNetParams : public CChainParams {
consensus.signet_blocks = false;
consensus.signet_challenge.clear();
consensus.nSubsidyHalvingInterval = 12500000;
consensus.BIP16Exception = uint256S("");
consensus.BIP34Height = 21111;
consensus.BIP34Hash = uint256S("");
consensus.BIP65Height = 581885; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6
consensus.BIP66Height = 330776; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
consensus.CSVHeight = 770112; // 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb
consensus.SegwitHeight = 834624; // 00000000002b980fcd729daaa248fd9316a5200e9b367f4ff2c42453e84201ca
consensus.MinBIP9WarningHeight = 836640; // segwit activation height + miner confirmation window
consensus.BIP16Exception = uint256{};
consensus.BIP34Height = 17;
consensus.BIP34Hash = uint256S("0xc7c210c9267ebc195100c71691336c7048cbdd37761b4bd20c9b1f32caf4fb9c"); // getblockhash 17
consensus.BIP65Height = 0; // Always on
consensus.BIP66Height = 0; // Always on
consensus.CSVHeight = 0; // Always on
consensus.SegwitHeight = 0; // Always on
consensus.MinBIP9WarningHeight = 12240; // segwit activation height + miner confirmation window
consensus.powLimit = uint256S("003fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetTimespan = 61200; // 17 hours = 17*60*60 = 61200
consensus.nPowTargetSpacing = 5;
consensus.fPowAllowMinDifficultyBlocks = false; // Sugarchain: DAA SugarShield-N510
consensus.fPowNoRetargeting = false;
consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
consensus.nRuleChangeActivationThreshold = 9180; // 75% of nMinerConfirmationWindow = 61200/5*0.75 = 9180 (was 1916 = 1209600/600*0.95+0.8) // 9180/510 = 18 cycles of DigiShieldZEC
consensus.nMinerConfirmationWindow = 12240; // nPowTargetTimespan / nPowTargetSpacing
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
Expand Down Expand Up @@ -327,18 +327,18 @@ class SigNetParams : public CChainParams {
consensus.signet_challenge.assign(bin.begin(), bin.end());
consensus.nSubsidyHalvingInterval = 12500000;
consensus.BIP16Exception = uint256{};
consensus.BIP34Height = 1;
consensus.BIP34Height = 1; // TODO: signet not launched yet
consensus.BIP34Hash = uint256{};
consensus.BIP65Height = 1;
consensus.BIP66Height = 1;
consensus.CSVHeight = 1;
consensus.SegwitHeight = 1;
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.BIP65Height = 1; // TODO: signet not launched yet
consensus.BIP66Height = 1; // TODO: signet not launched yet
consensus.CSVHeight = 1; // TODO: signet not launched yet
consensus.SegwitHeight = 1; // TODO: signet not launched yet
consensus.nPowTargetTimespan = 61200; // 17 hours = 17*60*60 = 61200
consensus.nPowTargetSpacing = 5;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.fPowNoRetargeting = false;
consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
consensus.nRuleChangeActivationThreshold = 9180; // 75% of nMinerConfirmationWindow = 61200/5*0.75 = 9180 (was 1916 = 1209600/600*0.95+0.8) // 9180/510 = 18 cycles of DigiShieldZEC
consensus.nMinerConfirmationWindow = 12240; // nPowTargetTimespan / nPowTargetSpacing
consensus.MinBIP9WarningHeight = 0;
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
Expand Down Expand Up @@ -414,7 +414,7 @@ class CRegTestParams : public CChainParams {
consensus.SegwitHeight = 0; // SEGWIT is always activated on regtest unless overridden
consensus.MinBIP9WarningHeight = 0;
consensus.powLimit = uint256S("0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowTargetTimespan = 61200; // 17 hours = 17*60*60 = 61200
consensus.nPowTargetSpacing = 5;
consensus.fPowAllowMinDifficultyBlocks = true;
consensus.fPowNoRetargeting = true;
Expand Down
4 changes: 2 additions & 2 deletions src/test/versionbits_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include <boost/test/unit_test.hpp>

/* Define a virtual block time, one block per 10 minutes after Nov 14 2014, 0:55:36am */
static int32_t TestTime(int nHeight) { return 1415926536 + 600 * nHeight; }
/* Define a virtual block time, one block per 5 seconds after Nov 14 2014, 0:55:36am */
static int32_t TestTime(int nHeight) { return 1415926536 + 5 * nHeight; }

static const Consensus::Params paramsDummy = Consensus::Params();

Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::unique_ptr<WalletDatabase> MakeWalletDatabase(const std::string& name, cons
//! -paytxfee default
constexpr CAmount DEFAULT_PAY_TX_FEE = 0;
//! -fallbackfee default
static const CAmount DEFAULT_FALLBACK_FEE = 0;
static const CAmount DEFAULT_FALLBACK_FEE = 20000; // Sugarchain Settings // See https://github.com/bitcoin/bitcoin/pull/16524
//! -discardfee default
static const CAmount DEFAULT_DISCARD_FEE = 10000;
//! -mintxfee default
Expand Down

0 comments on commit 0b40a90

Please sign in to comment.