MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SigNetParams

Method SigNetParams

src/kernel/chainparams.cpp:447–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445class SigNetParams : public CChainParams {
446public:
447 explicit SigNetParams(const SigNetOptions& options)
448 {
449 std::vector<uint8_t> bin;
450 vFixedSeeds.clear();
451 vSeeds.clear();
452
453 if (!options.challenge) {
454 bin = "512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae"_hex_v_u8;
455 vFixedSeeds = std::vector<uint8_t>(std::begin(chainparams_seed_signet), std::end(chainparams_seed_signet));
456 vSeeds.emplace_back("seed.signet.bitcoin.sprovoost.nl.");
457 vSeeds.emplace_back("seed.signet.achownodes.xyz."); // Ava Chow, only supports x1, x5, x9, x49, x809, x849, xd, x400, x404, x408, x448, xc08, xc48, x40c
458
459 consensus.nMinimumChainWork = uint256{"00000000000000000000000000000000000000000000000000000b463ea0a4b8"};
460 consensus.defaultAssumeValid = uint256{"00000008414aab61092ef93f1aacc54cf9e9f16af29ddad493b908a01ff5c329"}; // 293175
461 m_assumed_blockchain_size = 24;
462 m_assumed_chain_state_size = 4;
463 chainTxData = ChainTxData{
464 // Data from RPC: getchaintxstats 4096 00000008414aab61092ef93f1aacc54cf9e9f16af29ddad493b908a01ff5c329
465 .nTime = 1772055248,
466 .tx_count = 28676833,
467 .dTxRate = 0.06736623436338929,
468 };
469 } else {
470 bin = *options.challenge;
471 consensus.nMinimumChainWork = uint256{};
472 consensus.defaultAssumeValid = uint256{};
473 m_assumed_blockchain_size = 0;
474 m_assumed_chain_state_size = 0;
475 chainTxData = ChainTxData{
476 0,
477 0,
478 0,
479 };
480 LogInfo("Signet with challenge %s", HexStr(bin));
481 }
482
483 if (options.seeds) {
484 vSeeds = *options.seeds;
485 }
486
487 m_chain_type = ChainType::SIGNET;
488 consensus.signet_blocks = true;
489 consensus.signet_challenge.assign(bin.begin(), bin.end());
490 consensus.nSubsidyHalvingInterval = 210000;
491 consensus.BIP34Height = 1;
492 consensus.BIP34Hash = uint256{};
493 consensus.BIP65Height = 1;
494 consensus.BIP66Height = 1;
495 consensus.CSVHeight = 1;
496 consensus.SegwitHeight = 1;
497 consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
498 consensus.nPowTargetSpacing = 10 * 60;
499 consensus.fPowAllowMinDifficultyBlocks = false;
500 consensus.enforce_BIP94 = false;
501 consensus.fPowNoRetargeting = false;
502 consensus.MinBIP9WarningHeight = 0;
503 consensus.powLimit = uint256{"00000377ae000000000000000000000000000000000000000000000000000000"};
504 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;

Callers

nothing calls this directly

Calls 10

beginFunction · 0.85
endFunction · 0.85
CreateGenesisBlockFunction · 0.85
HexStrFunction · 0.50
clearMethod · 0.45
emplace_backMethod · 0.45
assignMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected