18 #define equihash_parameters_acceptable(N, K) \ 19 ((CBlockHeader::HEADER_SIZE + equihash_solution_size(N, K))*MAX_HEADERS_RESULTS < \ 20 MAX_PROTOCOL_MESSAGE_LENGTH-1000) 25 static CBlock CreateGenesisBlock(
const char* pszTimestamp,
const CScript& genesisOutputScript, uint32_t nTime,
const uint256& nNonce,
const std::vector<unsigned char>& nSolution, uint32_t nBits, int32_t nVersion,
const CAmount& genesisReward)
31 txNew.
vin[0].scriptSig =
CScript() << 00 << 520617983 <<
CScriptNum(4) << std::vector<unsigned char>((
const unsigned char*)pszTimestamp, (
const unsigned char*)pszTimestamp + strlen(pszTimestamp));
32 txNew.
vout[0].nValue = genesisReward;
33 txNew.
vout[0].scriptPubKey = genesisOutputScript;
36 genesis.
nTime = nTime;
37 genesis.
nBits = nBits;
41 genesis.
vtx.push_back(MakeTransactionRef(std::move(txNew)));
65 static CBlock CreateGenesisBlock(uint32_t nTime,
const uint256& nNonce,
const std::vector<unsigned char>& nSolution, uint32_t nBits, int32_t nVersion,
const CAmount& genesisReward)
67 const char* pszTimestamp =
"Facebook data scandal opens new era in global privacy enforcement";
69 return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nSolution, nBits, nVersion, genesisReward);
73 static CBlock CreateGenesisBlockTestnet(uint32_t nTime,
const uint256& nNonce,
const std::vector<unsigned char>& nSolution, uint32_t nBits, int32_t nVersion,
const CAmount& genesisReward)
75 const char* pszTimestamp =
"Trump fires Rex Tillerson, selects Mike Pompeo as new Secretary of State";
76 const CScript genesisOutputScript =
CScript() <<
ParseHex(
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") <<
OP_CHECKSIG;
77 return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nSolution, nBits, nVersion, genesisReward);
80 static CBlock CreateGenesisBlock_legacy(
const char* pszTimestamp,
const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion,
const CAmount& genesisReward)
89 txNew.
vin[0].scriptSig =
CScript() << 00 << 488804799 <<
CScriptNum(4) << std::vector<unsigned char>((
const unsigned char*)pszTimestamp, (
const unsigned char*)pszTimestamp + strlen(pszTimestamp));
91 txNew.
vout[0].nValue = genesisReward;
92 txNew.
vout[0].scriptPubKey = genesisOutputScript;
95 genesis.
nTime = nTime;
96 genesis.
nBits = nBits;
99 genesis.
vtx.push_back(MakeTransactionRef(std::move(txNew)));
109 static CBlock CreateGenesisBlock_legacy(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion,
const CAmount& genesisReward)
111 const char* pszTimestamp =
"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
112 const CScript genesisOutputScript =
CScript() <<
ParseHex(
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") <<
OP_CHECKSIG;
113 return CreateGenesisBlock_legacy(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
203 const size_t N = 200, K = 9;
211 uint256S(
"0x000000000000000000000000000000000000000000000000000000000000007f"),
212 ParseHex(
"001895e4c29529f904cf86613cdbddc709a5deb8122360c532ab93dd776a4ad816af47c4cb62ab3ba8840dc4a99373a991f1a56bb25983cab978f4bd3518671872b44ed606b884e8fa94c439f7a9a9be273c929d0116f7dd750b18474139c1d3eb2bb0d1ea467c95120d5ecf91b223f9c9d02f7306076851be1ab0bb4dd40d7a44aa45180cc2caba1302a725fc8e332df520d35f61e429bba2373398448695d43c40dad5459bbae8016aaa0a7259a4f7cd5d938a6bf3d52166c8945a3620775e1ca7cbceab00265791e6eb55db14cadb28f104113f346b8f8a53897d15a73678d8fa94421da59831a0ea3c331ed1150d3c891ed67b0a2287e0fde72d09a1dc008989428f954918932162245ad49d17a52b4c02db629d582b3ef66f77963de0780a57af3b661a0a158b1790e25395bb7a2116405564c1216eac80e7296f364edd574551ddff52e8bb198b4f3fe61c144b034a8ecd959856f3e9ad223c371655e95a08bc56be121eb9e4ab88c8598c71b2214394d02a127f14806119129eff36d2d206b199744d90ad7b966a6a7c0fdc319ca381f5964061c5b6a64ba5d6d3af09fc1871ea0fbe753e34147f32f0a0e1f9acbb5d4e8713f82c8a15432b76039a7d2fb3b511df46bfb65aa1acb63b911b5da25878e8e20d5b2ad23fcc7f04b349175ad1ff1cd46725116d2f2ded4f23dd02ba5e31258ba9868104c657133058db5ccf53f1dfdfd40d48cc6847891c070d8beb06a0835fdf161962837263eaf83e79a2c405cd4233cc964d159e0fc2aad4ed62111dfc2bd5252763d3a719b4237fcb865a56ecd2cc836cb45deb76072dafa5bfc2f6c32837251e90d34e35624258705d2fc1eede3017b3bf7f34c3597021cf69ee3ddfe70509df35aff0207bf7a9aff44d6ea3574e61ce37c3c02ff992db7f904ffb2424f43d18528f1e169875baf001e78645d1e93549fca822cce874b9bd72de14bcc908b83be8436307b56bcc37766051672f0a465fb6fd0b01cab3a3149ad19b7ab11d1968111db04c78124e57e33c73305796ccce1376b697cb9b55cd455a07cd01f5da47bf41a8e23ef8c026da68b308f5054df66a2efce3f12f4ed1354c72e6954ef09addb7b953eec90e91ce6ee4ced42339741357e859ed667bb01de632229ef738bed0434d946ba2745551cc6ca824fbd4b906843ff45be9c2a9ee8e1127405d0665c6090ee5092a46d42429e7b6696dd6937d65697edea8c9b82a9617edc717abcf5bdfb047f45a7b4ab509b06155215926855fcf825b14b51a63a322aa7556691799b672ff150f1fda6d280f35d657b257a6c04eb674779937606e24c64294a2c35d8b9738bc2d753b0b3f595f1455196c2c8ca11bd7bd86d523d5f4441656acc79a31b02db3e3936e58aa84cfe3463baf32cf09dc8839fee402f11c46091accc1786340f67d4e49c480eb99c5f218a5d31cf395f4312aaef38a26ed219df655d088200c5a51be2e55603dc04d54b68de3d2f26ac0742f6553578db6e3e4982d37297564e97af665fdd638bf0d05f4c17a4fc8d3abcf7ab329a7a553a92daf38a522383c77a2b2cfd56d6d06a89a6a575fc73ba67d342e1149dcea061564b92295c4080fe525b60a1b19ba8d442815321817a7c57cdb47767ebe3a425054d492a005d7ac6922cd615678c9c4a05b2698a61dd0fb17c1775a4e2675ac5011b762b8c3175cab6a8e8679cffb0a5a466e679126c3ce54d259d94a9cf6d2b73b99031aef95081ed2a602c008f499c3d95a1de1dd3f4aba0b5dbb6dac950f75a455b1e68d237569965a8cdd380ceaa32e8b9792f3c0df736c25382be58360f511f517ca90fbbce898a198c964b4cace26ead3d6bce7f427ddd73f6fa84c05674426404ce13daa228a563d50"),
213 0x2007ffff, 1, 25 * COIN );
219 vSeeds.emplace_back(
"dnsseed.fabnetwork.info",
true);
220 vSeeds.emplace_back(
"dnsseed.fabcoin.club",
true);
221 vSeeds.emplace_back(
"dnsseed1.fabcoin.club",
true);
222 vSeeds.emplace_back(
"dnsseed.fabcoin.biz",
true);
228 base58Prefixes[
SECRET_KEY] = std::vector<unsigned char>(1,128);
239 { 0,
uint256S(
"0x03292eeaf1835cffc791e15b05f558adc080f85b3c54e351c1010a2699d2fc48")},
240 { 1388,
uint256S(
"0x000048a31f2269d3dbc2a9c70d39eeeb155f435f00f65a0681cedc558f05ecd2")},
241 { 1398,
uint256S(
"0x00017f30bd3c67005fb37d7c9c3d31df571699710126ae23137bddaee9d4ae70")},
329 const size_t N = 200, K = 9;
335 genesis = CreateGenesisBlockTestnet(
337 uint256S(
"0x0000000000000000000000000000000000000000000000000000000000000060"),
338 ParseHex(
"009251b3fd34dca9ffe4c81443cd04fe0f0ad2560e258fd3c26174f5afd75c5320d5a47789cbdc141c820aabed9e8ba58a0d61935596edf756b6e15bb98f40269811c6859070075c08f3e15fcbb732ef27fe1c08060a0e584aaa94b35fc3c06e732ebe88e37e913a171278bd615f1ad084dc9e37ed825dd8d7c2539e4dbc06fb37d58686855edd1a71adbcf2c1e1b64015fd02313d46a18df05b7dcface3218c1fd70cf06f73dbf104f1c3da795fc099ab50822d5f680a03cf3a1f41ac09f8cb21de2230256abcf498394ccf3e37b516ccdc0dbbaeb383a6334f417e91a426e818d8c4063ac67b1c972c65bbd6f067e11e01ceff65e2d9c4359de5480f1ac0ce5ccc8acbb6ad93b140443ffd95b7960aca2e12b60d998f53bd405484c815b5beb946704dad001de4436136142b4bd2c5223be9c46741a6b41178301e93239a8b206d37a569c3970f3bf83e38103822f500fbacceda20b3a7920860c6fba7cf4de457f77bc320837eef38257b938d52c71af0639ef65ac77b614c198b3c2886ebc13d7b45f26064fd6738ceb5fd66173a423c5c118f7b3d5fe635f5e2fcc1727a1cdda4e2052af2cf82c8979b40e0c330f26939cde6fd7ce30a1a6ceaa47d1fb86fef604827c74e2542db203eee842d832a68afe7fd93e02223a2dbcc39aa1cfb1ad14e6476f65c0ff6947fe48e873bbce66a7e996a5d96d001311995b151895d269027026cec61dbe3527fcfaa47d2f50924531ca975e59a0e0b66bbef43039fe8c30897fa11d68f0103ab7af49f287b38e2c487fa65580d0875e82ee10489a52e79eb4a60033e8c6c58c1b003570da4a2ccdca4f95a53f9cf5051b59963134bc12220e1804251eff3fcdf83a058fab0d9df72d1d80307d59940b804f7afbde2a0e657a9b886e79b7e45da157085f5335684a70a6265dcd1d55bafa2361e430a03168b8ddf91714341c3023ebd4c241d75af6ef9be0544a3d2879e2ced8ddfc25c94ca8734f6d914f18e1bbc145494913e5105efc2f908df66fd404f3dda0c1cc7ee21fa1088437ba201e32934b296236cb9d476094540d0ba6bb493693d10a110cc04a79c42dfb5e9177307f9061b0fc3e6fcc8c8b0c82e0a7e12f5683d215ed70c7b5c0755baf5658615c64615bde033f8343173af54ee2255a39f2be85716e086bf64ce9f25d403b729336450b7553b3076fbdd434cfded797d429e042c3d913ec5e95582de70c5eb5483850e594ba4462c8de198ef551a6753c503f67d21dc391032118547307b4ee6b158e244ef84b39e2ddd2fbd2d0f0d7ee51536cff189d817ab07d7b34396e5dbe4f4cd0eca6c24bf1f16aacd9338bf6b42ac0d7f7969d97f9184382daab32450b3dda9c2a8653114e2423687753ea7702e866775f2a00db9422bf7552f4c515f3456ff8de30451110943c74f9f482c66278ed9c019a7d7cfa66c2b2eb5cd1f78664bdc8433b1dc378dfd51762dbc76144fcc92e096f26abefa01f267fc9f46c0691af32e18ba10cc49ad6ec39e1f6451a5b47755a226ee05450fe3b898728c2282ee6581c0f0f041da976097e0df1511ac376fdebdefa75c5271216d80317c8431738114ad59324b5e6101e77a1203ea2b5364eebcecd998213dbb6baa1b6dc9bd8f035717e54a91c9e9f512f2079834f471adfca5c8e903a296b4968e7523dbcafa671fe42e7eaab9477f43f8d0b67ef93abd461966061cc2b32c0e0a352f030d15004c31ce6dd2ebb0e0f6273d093d39a6d199fbcdb41647a536662b1376bedc1018bad9be86f72ed461c1b952765055378b69d22132c36ab3e6a75e5f697483faa47a10357f5a4dee561033b740b0c5d0a26653b596c7d094c6db5ed742861458c4ce6acb32ec8167b58460dd52e6abfbdcbcd2"),
339 0x2007ffff, 1, 25 * COIN );
346 vSeeds.emplace_back(
"testnet-seed.fabnetwork.info",
true);
351 base58Prefixes[
SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
352 base58Prefixes[
SECRET_KEY] = std::vector<unsigned char>(1,239);
364 {0,
uint256S(
"0x0500238931fa06c38381611e9244d9523926d6dc501664de27d1bff4e22b9afa")},
443 const size_t N = 48, K = 5;
456 genesis = CreateGenesisBlock_legacy(1296688602, 12, 0x207fffff, 5, 50 * COIN);
466 base58Prefixes[
SECRET_KEY] = std::vector<unsigned char>(1,239);
477 {0,
uint256S(
"0e28ba5df35c1ac0893b7d37db241a6f4afac5498da89369067427dc369f9df3")},
518 static std::unique_ptr<CChainParams> globalChainParams;
521 assert(globalChainParams);
522 return *globalChainParams;
526 assert(globalChainParams);
527 return *globalChainParams;
533 return std::unique_ptr<CChainParams>(
new CMainParams());
541 throw std::runtime_error(
strprintf(
"%s: Unknown chain %s.", __func__, chain));
552 globalChainParams->UpdateVersionBitsParameters(d, nStartTime, nTimeout);
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
int64_t nPowTargetTimespan
static const std::string REGTEST
bytes rlp(_T _t)
Export a single item in RLP format, returning a byte array.
bool ForceSegwit
whether segwit is active
std::vector< unsigned char > base58Prefixes[MAX_BASE58_TYPES]
static const std::string UNITTEST
bool bZawyLwmaSolvetimeLimitation
bool fPowAllowMinDifficultyBlocks
int BIP66Height
Block height at which BIP66 becomes active.
assert(len-trim+(2 *lenIndices)<=WIDTH)
CChainParams defines various tweakable parameters of a given instance of the Fabcoin system...
int64_t nDigishieldPowMaxAdjustDown
uint32_t FABHeight
Block height at which Fabcoin Equihash hard fork becomes active.
CMessageHeader::MessageStartChars pchMessageStart
arith_uint256 UintToArith256(const uint256 &a)
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
int nSubsidyHalvingInterval
int64_t CAmount
Amount in lius (Can be negative)
const CChainParams & GetParams()
uint256 powLimit
Proof of work parameters.
std::unique_ptr< CChainParams > CreateChainParams(const std::string &chain)
Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
int BIP34Height
Block height and hash at which BIP34 becomes active.
int CoinbaseLock
Block height before which the coinbase subsidy will be locked for the same period.
uint256 uint256S(const char *str)
int64_t nStartTime
Start MedianTime for version bits miner confirmation.
int64_t nPowTargetSpacing
uint32_t ContractHeight
Block height at which Fabcoin Smart Contract hard fork becomes active.
int64_t nDigishieldPowAveragingWindow
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
uint32_t nMinerConfirmationWindow
std::vector< CTxOut > vout
256-bit unsigned big integer.
std::vector< CDNSSeedData > vSeeds
const arith_uint256 maxUint
Main network.
int BIP65Height
Block height at which BIP65 becomes active.
int64_t nTimeout
Timeout/expiry MedianTime for the deployment attempt.
uint256 nMinimumChainWork
uint256 ArithToUint256(const arith_uint256 &a)
std::vector< CTransactionRef > vtx
std::vector< SeedSpec6 > vFixedSeeds
Regression network parameters overwrites for unit testing.
uint256 defaultAssumeValid
const CChainParams & Params()
Return the currently selected parameters.
Serialized script, used inside transaction inputs and outputs.
int64_t MaxFutureBlockTime
Limit BITCOIN_MAX_FUTURE_BLOCK_TIME.
#define equihash_parameters_acceptable(N, K)
Consensus::Params consensus
bool sha3(bytesConstRef _input, bytesRef o_output)
Calculate SHA3-256 hash of the given input and load it into the given output.
bool fMiningRequiresPeers
uint32_t EquihashFABHeight
Block height at which EquihashFAB (184,7) becomes active.
static const std::string TESTNET
A mutable version of CTransaction.
uint32_t nRuleChangeActivationThreshold
Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period...
uint64_t nPruneAfterHeight
int64_t nDigishieldPowMaxAdjustUp
int bit
Bit position to select the particular bit in nVersion.
CCheckpointData checkpointData
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
bool fDefaultConsistencyChecks
uint256 h256Touint(const dev::h256 &in)
BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS]
uint32_t LWMAHeight
Block height at which LWMA becomes active.
std::vector< unsigned char > ParseHex(const char *psz)
int64_t nZawyLwmaAveragingWindow