## Why do we need a genesis block?

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?

1

The genesis block contains a phrase from a newspaper article "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" in the coinbase transaction, which proves that the genesis block could not have been created before Jan 3 2009. This proves that there was no pre-mining before that date, assuring fairness in distribution.

If there was no genesis block, individual miners would need some way to come to consensus about which news paper article to use and whether they meet the criteria of it being printed on that date and this would be extremely impractical.

But otherwise, I believe it would be possible to have a blockchain without a genesis block. There is nothing that is particularly special about the very first block except for what I mentioned above.

4

I think your misunderstanding is in the assumption that the genesis block must be a block.

There is no need for that.

For all we care the genesis block is just a specific hash that is used as hashPrevBlock to identify block number 1. It doesn't actually need to correspond to an actual block. Modern Bitcoin software doesn't actually treat the genesis as a block at all. It's just a piece of data - and its hash is special.

So, no, there is no need for a genesis block. But there is a need for a genesis something - just to identify what the first real block is.

2

It is necessary for each block to reference the previous block that it is built upon. Without a genesis block, the miners could not follow the consensus rules when they started mining.

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

2

A genesis block is the starting point. It's the only block that can't reference a "previous block", which makes it unique, as if you allow any other block to do that, you would have people forking the blockchain all day long. All blocks in the "blockchain" MUST reference the previous block, which must also reference the previous block, all the way back to the genesis block. By extension, you could say that all blocks, therefor, directly or indirectly, must reference the genesis block. This confirms the consensus between all miners/users and gives a reference point to the programmers for if something went wrong somewhere along the blockchain.

The implementation of the Bitcoin Genesis block with the reference to the news article just makes it awesome, showing the intention(s)/desire(s) of Satoshi Nakamoto.

In the Bitcoin blockchain, there must be consensus. The genesis block is the first point of consensus that all miners can agree upon and then go from there. The subsequent application of the algorithms control the rest of it to keep all subsequent blocks in "sequence" and "aligned" (if you will).

Every physical chain must begin with a single physical ring, the genesis block is that first, single ring. Or you could see it like the foundation of a house; without it what you build will be wobbly and may not even hold up due to not having a solid starting point. You could also view it as the starting point in a race. If every miner/user just started wherever they wanted, you'd have no consensus point and total chaos as to what was happening overall.

I would think that just building upon the longest chain would build sufficient consensus. In fact, after the genesis block the same thing could happen, people could just start new chains starting from the genesis block. The other way around, without an explicit genesis block, we could just introduce an abstract genesis block that is the parent of any block that doesn't have an explicit parent, to obtain an equivalent system, just like how every forest of directed trees can be treated as a connected tree, by introducing an abstract common root of all trees in the forest. – doetoe – 2018-02-15T22:58:41.693

I'm not claiming it "couldn't" be done, I'm just claiming a genesis block of some sort is "ideal". Because we could go so far as to say that we don't even need a programmed wallet because everyone could just make their own, but it does seem to add to the ease of things. – Mine – 2018-02-16T02:58:21.687