38#define consteval_ctor(input) (input)
47 txNew.
vin[0].scriptSig =
CScript() << 486604799 <<
CScriptNum(4) << std::vector<unsigned char>((
const unsigned char*)pszTimestamp, (
const unsigned char*)pszTimestamp + strlen(pszTimestamp));
48 txNew.
vout[0].nValue = genesisReward;
49 txNew.
vout[0].scriptPubKey = genesisOutputScript;
52 genesis.
nTime = nTime;
53 genesis.
nBits = nBits;
75 const char* pszTimestamp =
"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
76 const CScript genesisOutputScript =
CScript() <<
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"_hex <<
OP_CHECKSIG;
77 return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
147 vSeeds.emplace_back(
"seed.bitcoin.sipa.be.");
148 vSeeds.emplace_back(
"dnsseed.bluematt.me.");
149 vSeeds.emplace_back(
"dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us.");
150 vSeeds.emplace_back(
"seed.bitcoin.jonasschnelli.ch.");
151 vSeeds.emplace_back(
"seed.btc.petertodd.net.");
152 vSeeds.emplace_back(
"seed.bitcoin.sprovoost.nl.");
153 vSeeds.emplace_back(
"dnsseed.emzy.de.");
154 vSeeds.emplace_back(
"seed.bitcoin.wiz.biz.");
155 vSeeds.emplace_back(
"seed.mainnet.achownodes.xyz.");
172 { 11111,
uint256{
"0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"}},
173 { 33333,
uint256{
"000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"}},
174 { 74000,
uint256{
"0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"}},
175 {105000,
uint256{
"00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"}},
176 {134444,
uint256{
"00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"}},
177 {168000,
uint256{
"000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"}},
178 {193000,
uint256{
"000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"}},
179 {210000,
uint256{
"000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"}},
180 {216116,
uint256{
"00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"}},
181 {225430,
uint256{
"00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"}},
182 {250000,
uint256{
"000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"}},
183 {279000,
uint256{
"0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"}},
184 {295000,
uint256{
"00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"}},
191 .hash_serialized =
AssumeutxoHash{
uint256{
"a2a5521b1b5ab65f67818e5e8eccabb7171a517f9e2382208f77687310768f96"}},
192 .m_chain_tx_count = 991032194,
193 .blockhash =
consteval_ctor(
uint256{
"0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5"}),
200 .tx_count = 1059312821,
201 .dTxRate = 6.721086701157182,
264 vSeeds.emplace_back(
"testnet-seed.bitcoin.jonasschnelli.ch.");
265 vSeeds.emplace_back(
"seed.tbtc.petertodd.net.");
266 vSeeds.emplace_back(
"seed.testnet.bitcoin.sprovoost.nl.");
267 vSeeds.emplace_back(
"testnet-seed.bluematt.me.");
268 vSeeds.emplace_back(
"seed.testnet.achownodes.xyz.");
285 {546,
uint256{
"000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"}},
292 .hash_serialized =
AssumeutxoHash{
uint256{
"f841584909f68e47897952345234e37fcd9128cd818f41ee6c3ca68db8071be7"}},
293 .m_chain_tx_count = 66484552,
294 .blockhash =
consteval_ctor(
uint256{
"0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"}),
301 .tx_count = 187917082,
302 .dTxRate = 3.265051477698455,
355 const char* testnet4_genesis_msg =
"03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e";
356 const CScript testnet4_genesis_script =
CScript() <<
"000000000000000000000000000000000000000000000000000000000000000000"_hex <<
OP_CHECKSIG;
358 testnet4_genesis_script,
371 vSeeds.emplace_back(
"seed.testnet4.bitcoin.sprovoost.nl.");
372 vSeeds.emplace_back(
"seed.testnet4.wiz.biz.");
401 .dTxRate = 0.01570402633472492,
413 std::vector<uint8_t> bin;
417 bin =
"512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae"_hex_v_u8;
418 vSeeds.emplace_back(
"seed.signet.bitcoin.sprovoost.nl.");
419 vSeeds.emplace_back(
"seed.signet.achownodes.xyz.");
422 vSeeds.emplace_back(
"178.128.221.177");
423 vSeeds.emplace_back(
"v7ajjeirttkbnt32wpy3c6w3emwnfr3fkla7hpxcfokr3ysd3kqtzmqd.onion:38333");
433 .dTxRate = 0.06271073277261494,
502 .hash_serialized =
AssumeutxoHash{
uint256{
"fe0a44309b74d6b5883d246cb419c6221bcccf0b308c9b59b7d70783dbdf928a"}},
503 .m_chain_tx_count = 2289496,
504 .blockhash =
consteval_ctor(
uint256{
"0000003ca3c99aff040f2563c2ad8f8ec88bd0fd6b8f0895cfaf1ef90353a62c"}),
605 vSeeds.emplace_back(
"dummySeed.invalid.");
612 {0,
uint256{
"0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"}},
619 .hash_serialized =
AssumeutxoHash{
uint256{
"6657b736d4fe4db0cbc796789e812d5dba7f5c143764b1b6905612f1830609d1"}},
620 .m_chain_tx_count = 111,
621 .blockhash =
consteval_ctor(
uint256{
"696e92821f65549c7ee134edceeeeaaa4105647a3c4fd9f298c0aec0ab50425c"}),
626 .hash_serialized =
AssumeutxoHash{
uint256{
"4f34d431c3e482f6b0d67b64609ece3964dc8d7976d02ac68dd7c9c1421738f2"}},
627 .m_chain_tx_count = 201,
628 .blockhash =
consteval_ctor(
uint256{
"5e93653318f294fb5aa339d00bbf8cf1c3515488ad99412c37608b139ea63b27"}),
633 .hash_serialized =
AssumeutxoHash{
uint256{
"a4bf3407ccb2cc0145c49ebba8fa91199f8a3903daf0883875941497d2493c27"}},
634 .m_chain_tx_count = 334,
635 .blockhash =
consteval_ctor(
uint256{
"3bb7ce5eba0be48939b7a521ac1ba9316afee2c7bada3a0cca24188e6d7d96c0"}),
657 return std::make_unique<const SigNetParams>(options);
662 return std::make_unique<const CRegTestParams>(options);
667 return std::make_unique<const CMainParams>();
672 return std::make_unique<const CTestNetParams>();
677 return std::make_unique<const CTestNet4Params>();
682 std::vector<int> heights;
686 heights.emplace_back(
data.height);
699 if (std::ranges::equal(message, mainnet_msg)) {
701 }
else if (std::ranges::equal(message, testnet_msg)) {
703 }
else if (std::ranges::equal(message, testnet4_msg)) {
705 }
else if (std::ranges::equal(message, regtest_msg)) {
707 }
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_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.
uint64_t m_assumed_chain_state_size
MessageStartChars pchMessageStart
static std::unique_ptr< const CChainParams > Main()
std::vector< int > GetAvailableSnapshotHeights() const
static std::unique_ptr< const CChainParams > RegTest(const RegTestOptions &options)
uint64_t m_assumed_blockchain_size
std::vector< uint8_t > vFixedSeeds
bool fDefaultConsistencyChecks
static std::unique_ptr< const CChainParams > TestNet()
std::vector< unsigned char > base58Prefixes[MAX_BASE58_TYPES]
Consensus::Params consensus
std::vector< AssumeutxoData > m_assumeutxo_data
std::vector< std::string > vSeeds
static std::unique_ptr< const CChainParams > TestNet4()
CCheckpointData checkpointData
static std::unique_ptr< const CChainParams > SigNet(const SigNetOptions &options)
uint64_t nPruneAfterHeight
Main network on which people trade goods and services.
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.
Testnet (v3): public test network which is reset from time to time.
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()
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
#define consteval_ctor(input)
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)
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
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)
RegTestOptions holds configurations for creating a regtest CChainParams.
std::unordered_map< Consensus::DeploymentPos, VersionBitsParameters > version_bits_parameters
std::unordered_map< Consensus::BuriedDeployment, int > activation_heights
SigNetOptions holds configurations for creating a signet CChainParams.
std::optional< std::vector< uint8_t > > challenge
std::optional< std::vector< std::string > > seeds
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.
int min_activation_height
If lock in occurs, delay activation until at least this block height.
int bit
Bit position to select the particular bit in nVersion.
static constexpr int64_t ALWAYS_ACTIVE
Special value for nStartTime indicating that the deployment is always active.
static constexpr int64_t NEVER_ACTIVE
Special value for nStartTime indicating that the deployment is never active.
int64_t nTimeout
Timeout/expiry MedianTime for the deployment attempt.
static constexpr int64_t NO_TIMEOUT
Constant for nTimeout very far in the future.
int64_t nStartTime
Start MedianTime for version bits miner confirmation.
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.
uint32_t nMinerConfirmationWindow
uint256 defaultAssumeValid
By default assume that the signatures in ancestors of this block are valid.
std::map< uint256, uint32_t > script_flag_exceptions
Hashes of blocks that.
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
BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS]
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.
uint32_t nRuleChangeActivationThreshold
Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period,...
int64_t nPowTargetTimespan
int BIP66Height
Block height at which BIP66 becomes active.
uint256 powLimit
Proof of work parameters.
int64_t nPowTargetSpacing
bool fPowAllowMinDifficultyBlocks