5
In bitcoin, a blockchain always starts at the unique genesis block. Beyond that point there can be forks, and only when it is clear which branch will grow fastest (or if it has grown enough), we can know for sure (or almost) if a block will end up in the actual blockchain.
Is it necessary to have a genesis block? I could imagine that without, when bitcoin was launched, miners would just have started mining blocks, and as soon as one was mined, the chain would grow from there. If another miner found another block 0, the blockchain could be extended from there as well just as with any other fork (note that this would be equivalent to having an abstract genesis block that doesn't need to have any properties that can be treated as the parent of any block 0).
Is this just an accidental feature of the initial design of bitcoin, or is there a deep reason for the existence of an eternal genesis block?
Yes, the code (i.e. other miners) would need to make an exception for any block 0 (essentially to allow an empty previous hash). But other than that? – doetoe – 2018-02-12T18:45:26.190
@doetoe The consensus decides the whole blockchain, which blocks are accepted to be a part of the blockchain and which are not. So, the entire height of the blockchain agrees that the genesis block is the first block. There always had to be a first block, whether it was particularly the genesis block that is or another, one block had to be first. – Willtech – 2018-02-13T10:57:43.370
Thanks for your reply. From what I understand, it is the longest chain that determines what blocks are accepted, so it could be this chain that decides what is the genesis block. Of course it is virtually impossible that this changes after a certain chain length, but I fail to see what would go wrong if you would not start out without a hardcoded or pre-existing genesis block, and would simply allow all miners to start a chain with its own block 0 (containing transactions and satisfying the proof-of-work, but without a reference to an earlier block). – doetoe – 2018-02-13T11:16:45.403
Rereading your comment, maybe that is exactly what you are saying. – doetoe – 2018-02-13T11:17:55.300
@doetoe In theory at least, that would work. Many have started altcoins by simply forking the code for Bitcoin Core and creating their own genesis block and coding it into their fork. How successful they are by this approach is yet speculation. The genesis lock is hardcoded into Bitcoin Core. – Willtech – 2018-02-13T11:19:15.993