43 txNew.
vin[0].scriptSig =
CScript() << 486604799 <<
CScriptNum(4) << std::vector<unsigned char>((
const unsigned char*)pszTimestamp, (
const unsigned char*)pszTimestamp + strlen(pszTimestamp));
44 txNew.
vout[0].nValue = genesisReward;
45 txNew.
vout[0].scriptPubKey = genesisOutputScript;
48 genesis.
nTime = nTime;
49 genesis.
nBits = nBits;
71 const char* pszTimestamp =
"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
72 const CScript genesisOutputScript =
CScript() <<
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"_hex <<
OP_CHECKSIG;
73 return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
101 consensus.
vDeployments[deployment_pos].min_activation_height = version_bits_params.min_activation_height;
168 vSeeds.emplace_back(
"seed.bitcoin.sipa.be.");
169 vSeeds.emplace_back(
"dnsseed.bluematt.me.");
170 vSeeds.emplace_back(
"seed.bitcoin.jonasschnelli.ch.");
171 vSeeds.emplace_back(
"seed.btc.petertodd.net.");
172 vSeeds.emplace_back(
"seed.bitcoin.sprovoost.nl.");
173 vSeeds.emplace_back(
"dnsseed.emzy.de.");
174 vSeeds.emplace_back(
"seed.bitcoin.wiz.biz.");
175 vSeeds.emplace_back(
"seed.mainnet.achownodes.xyz.");
193 .hash_serialized =
AssumeutxoHash{
uint256{
"a2a5521b1b5ab65f67818e5e8eccabb7171a517f9e2382208f77687310768f96"}},
194 .m_chain_tx_count = 991032194,
195 .blockhash =
uint256{
"0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5"},
199 .hash_serialized =
AssumeutxoHash{
uint256{
"dbd190983eaf433ef7c15f78a278ae42c00ef52e0fd2a54953782175fbadcea9"}},
200 .m_chain_tx_count = 1145604538,
201 .blockhash =
uint256{
"000000000000000000010b17283c3c400507969a9c2afd1dcf2082ec5cca2880"},
205 .hash_serialized =
AssumeutxoHash{
uint256{
"4daf8a17b4902498c5787966a2b51c613acdab5df5db73f196fa59a4da2f1568"}},
206 .m_chain_tx_count = 1226586151,
207 .blockhash =
uint256{
"0000000000000000000108970acb9522ffd516eae17acddcb1bd16469194a821"},
211 .hash_serialized =
AssumeutxoHash{
uint256{
"e4b90ef9eae834f56c4b64d2d50143cee10ad87994c614d7d04125e2a6025050"}},
212 .m_chain_tx_count = 1305397408,
213 .blockhash =
uint256{
"0000000000000000000147034958af1652b2b91bba607beacc5e72a56f0fb5ee"},
220 .tx_count = 1315805869,
221 .dTxRate = 5.40111006496122,
227 .redownload_buffer_size = 15218,
286 vSeeds.emplace_back(
"testnet-seed.bitcoin.jonasschnelli.ch.");
287 vSeeds.emplace_back(
"seed.tbtc.petertodd.net.");
288 vSeeds.emplace_back(
"seed.testnet.bitcoin.sprovoost.nl.");
289 vSeeds.emplace_back(
"testnet-seed.bluematt.me.");
290 vSeeds.emplace_back(
"seed.testnet.achownodes.xyz.");
308 .hash_serialized =
AssumeutxoHash{
uint256{
"f841584909f68e47897952345234e37fcd9128cd818f41ee6c3ca68db8071be7"}},
309 .m_chain_tx_count = 66484552,
310 .blockhash =
uint256{
"0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"},
314 .hash_serialized =
AssumeutxoHash{
uint256{
"ce6bb677bb2ee9789c4a1c9d73e6683c53fc20e8fdbedbdaaf468982a0c8db2a"}},
315 .m_chain_tx_count = 536078574,
316 .blockhash =
uint256{
"00000000000000f4971a7fb37fbdff89315b69a2e1920c467654a382f0d64786"},
323 .tx_count = 536108416,
324 .dTxRate = 0.02691479016257117,
330 .redownload_buffer_size = 14460,
380 const char* testnet4_genesis_msg =
"03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e";
381 const CScript testnet4_genesis_script =
CScript() <<
"000000000000000000000000000000000000000000000000000000000000000000"_hex <<
OP_CHECKSIG;
383 testnet4_genesis_script,
396 vSeeds.emplace_back(
"seed.testnet4.bitcoin.sprovoost.nl.");
397 vSeeds.emplace_back(
"seed.testnet4.wiz.biz.");
415 .hash_serialized =
AssumeutxoHash{
uint256{
"784fb5e98241de66fdd429f4392155c9e7db5c017148e66e8fdbc95746f8b9b5"}},
416 .m_chain_tx_count = 11347043,
417 .blockhash =
uint256{
"0000000002ebe8bcda020e0dd6ccfbdfac531d2f6a81457191b99fc2df2dbe3b"},
421 .hash_serialized =
AssumeutxoHash{
uint256{
"10b05d05ad468d0971162e1b222a4aa66caca89da2bb2a93f8f37fb29c4794b0"}},
422 .m_chain_tx_count = 14141057,
423 .blockhash =
uint256{
"000000000bd2317e51b3c5794981c35ba894ce27d3e772d5c39ecd9cbce01dc8"},
430 .tx_count = 14191421,
431 .dTxRate = 0.01848579579528412,
437 .redownload_buffer_size = 16092,
449 std::vector<uint8_t> bin;
454 bin =
"512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae"_hex_v_u8;
456 vSeeds.emplace_back(
"seed.signet.bitcoin.sprovoost.nl.");
457 vSeeds.emplace_back(
"seed.signet.achownodes.xyz.");
466 .tx_count = 28676833,
467 .dTxRate = 0.06736623436338929,
530 .hash_serialized =
AssumeutxoHash{
uint256{
"fe0a44309b74d6b5883d246cb419c6221bcccf0b308c9b59b7d70783dbdf928a"}},
531 .m_chain_tx_count = 2289496,
532 .blockhash =
uint256{
"0000003ca3c99aff040f2563c2ad8f8ec88bd0fd6b8f0895cfaf1ef90353a62c"},
536 .hash_serialized =
AssumeutxoHash{
uint256{
"97267e000b4b876800167e71b9123f1529d13b14308abec2888bbd2160d14545"}},
537 .m_chain_tx_count = 28547497,
538 .blockhash =
uint256{
"0000000577f2741bb30cd9d39d6d71b023afbeb9764f6260786a97969d5c9ac0"},
556 .redownload_buffer_size = 15724,
616 vSeeds.emplace_back(
"dummySeed.invalid.");
624 .hash_serialized =
AssumeutxoHash{
uint256{
"86e9a1205b418b16dde3a18a78c730e30137e28466bda5dbf6b33ab8fc05447c"}},
625 .m_chain_tx_count = 111,
626 .blockhash =
uint256{
"135eec25a6fb277884e5824e7aa7d052c4868161c99a5122170b5266f86c273d"},
631 .hash_serialized =
AssumeutxoHash{
uint256{
"17dcc016d188d16068907cdeb38b75691a118d43053b8cd6a25969419381d13a"}},
632 .m_chain_tx_count = 201,
633 .blockhash =
uint256{
"385901ccbd69dff6bbd00065d01fb8a9e464dede7cfe0372443884f9b1dcf6b9"},
638 .hash_serialized =
AssumeutxoHash{
uint256{
"106b2c56233e378a824cf0d5ff2be42ed32c72f1605c9be288d00942908a40ac"}},
639 .m_chain_tx_count = 334,
640 .blockhash =
uint256{
"0c552ced4721c249a389eb9b08cb8da261cd46f0e7b5f9d064d48f3113406853"},
661 .redownload_buffer_size = 7017,
668 return std::make_unique<const SigNetParams>(options);
673 return std::make_unique<const CRegTestParams>(options);
678 return std::make_unique<const CMainParams>(options);
683 return std::make_unique<const CTestNetParams>(options);
688 return std::make_unique<const CTestNet4Params>(options);
693 std::vector<int> heights;
697 heights.emplace_back(
data.height);
710 if (std::ranges::equal(message, mainnet_msg)) {
712 }
else if (std::ranges::equal(message, testnet_msg)) {
714 }
else if (std::ranges::equal(message, testnet4_msg)) {
716 }
else if (std::ranges::equal(message, regtest_msg)) {
718 }
else if (std::ranges::equal(message, signet_msg)) {
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
static const uint8_t chainparams_seed_test[]
static const uint8_t chainparams_seed_signet[]
static const uint8_t chainparams_seed_main[]
List of fixed seed nodes for the bitcoin network AUTOGENERATED by contrib/seeds/generate-seeds....
static const uint8_t chainparams_seed_testnet4[]
std::vector< CTransactionRef > vtx
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
static std::unique_ptr< const CChainParams > TestNet4()
uint64_t m_assumed_chain_state_size
MessageStartChars pchMessageStart
static std::unique_ptr< const CChainParams > Main()
std::vector< int > GetAvailableSnapshotHeights() const
void ApplyDeploymentOptions(const DeploymentOptions &opts)
uint64_t m_assumed_blockchain_size
std::vector< uint8_t > vFixedSeeds
bool fDefaultConsistencyChecks
HeadersSyncParams m_headers_sync_params
std::vector< unsigned char > base58Prefixes[MAX_BASE58_TYPES]
Consensus::Params consensus
static std::unique_ptr< const CChainParams > TestNet()
std::vector< AssumeutxoData > m_assumeutxo_data
static std::unique_ptr< const CChainParams > SigNet()
std::vector< std::string > vSeeds
static std::unique_ptr< const CChainParams > RegTest()
uint64_t nPruneAfterHeight
Main network on which people trade goods and services.
CMainParams(const MainNetOptions &opts)
Regression test: intended for private networks only.
CRegTestParams(const RegTestOptions &opts)
Serialized script, used inside transaction inputs and outputs.
Testnet (v4): public test network which is reset from time to time.
CTestNet4Params(const TestNetOptions &opts)
Testnet (v3): public test network which is reset from time to time.
CTestNetParams(const TestNetOptions &opts)
A writer stream (for serialization) that computes a 256-bit hash.
Signet: test network with an additional consensus parameter (see BIP325).
SigNetParams(const SigNetOptions &options)
constexpr unsigned char * begin()
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
std::string HexStr(const std::span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
static constexpr script_verify_flags SCRIPT_VERIFY_NONE
Script verification flags.
static CBlock CreateGenesisBlock(const char *pszTimestamp, const CScript &genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount &genesisReward)
std::optional< ChainType > GetNetworkForMagic(const MessageStartChars &message)
std::array< uint8_t, 4 > MessageStartChars
""_hex is a compile-time user-defined literal returning a std::array<std::byte>, equivalent to ParseH...
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::unordered_map< Consensus::BuriedDeployment, int > activation_heights
std::unordered_map< Consensus::DeploymentPos, VersionBitsParameters > version_bits_parameters
DeploymentOptions dep_opts
RegTestOptions holds configurations for creating a regtest CChainParams.
DeploymentOptions dep_opts
SigNetOptions holds configurations for creating a signet CChainParams.
DeploymentOptions dep_opts
std::optional< std::vector< uint8_t > > challenge
std::optional< std::vector< std::string > > seeds
DeploymentOptions dep_opts
A mutable version of CTransaction.
std::vector< CTxOut > vout
Holds various statistics on transactions within a chain.
int64_t nTime
UNIX timestamp of last known number of transactions.
static constexpr int64_t NEVER_ACTIVE
Special value for nStartTime indicating that the deployment is never active.
static constexpr int64_t NO_TIMEOUT
Constant for nTimeout very far in the future.
bool enforce_BIP94
Enforce BIP94 timewarp attack mitigation.
int BIP65Height
Block height at which BIP65 becomes active.
int CSVHeight
Block height at which CSV (BIP68, BIP112 and BIP113) becomes active.
uint256 defaultAssumeValid
By default assume that the signatures in ancestors of this block are valid.
std::vector< uint8_t > signet_challenge
bool signet_blocks
If true, witness commitments contain a payload equal to a Bitcoin Script solution to the signet chall...
int SegwitHeight
Block height at which Segwit (BIP141, BIP143 and BIP147) becomes active.
int BIP34Height
Block height and hash at which BIP34 becomes active.
int nSubsidyHalvingInterval
std::map< uint256, script_verify_flags > script_flag_exceptions
Hashes of blocks that.
int MinBIP9WarningHeight
Don't warn about unknown BIP 9 activations below this height.
uint256 nMinimumChainWork
The best chain should have at least this much work.
int64_t nPowTargetTimespan
int BIP66Height
Block height at which BIP66 becomes active.
uint256 powLimit
Proof of work parameters.
std::array< BIP9Deployment, MAX_VERSION_BITS_DEPLOYMENTS > vDeployments
int64_t nPowTargetSpacing
bool fPowAllowMinDifficultyBlocks