I'm creating this topic because I would rather gathering my queries at once, instead of multiposting. The purpose of the thread is on making questions (mostly mine) about the way bitcoin core is written. Scripts, variables etc included.
1) On
validation.cpp#L144, there is a variable called
nMaxTipAge. Why does it exist? As far as I've understood it has to do with the genesis block. If I create an altcoin using satoshi's genesis block, the
nMaxTipAge won't be recent enough so it won't let me mine. Am I getting it right?
2) On
chainparams.cpp#L102, there is some kind of array (?).
pchMessageStart[0] = 0xf9;
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xb4;
pchMessageStart[3] = 0xd9;
What is its purpose? Do they have to do with sharing the longest chain of blocks? On
this guide of how to create an altcoin it says that I'll have to change them, otherwise I may download the original bitcoin's blocks instead of my altcoin's. How is that possible? They're just 4 hex values.
3) I realized that except MainNet, TestNet3 and RegTest, there is an additional network called Signet. What does it do? According to
our wiki, it is a centralized network (?) that helps developers to do their tests. Still don't get why they can't on regtest.