Exploring Ethereum’s Genesis Block
The Genesis Block of Ethereum: the beginning of a decentralized innovation that has changed the landscape of cryptocurrencies and blockchain.
Versione italiana dell’articolo disponibile Qui; Italian Version available Here.
TL;DR; How did Ethereum get started? What was configured in its genesis block?
The Ethereum mainnet was launched in 2015, several years after Bitcoin, and its genesis block integrates all the previous experience gained on the bitcoin network; This article explores the exciting start of the Ethereum mainnet and sheds light on the key details of its first block.
Introduction
The launch of the Ethereum mainnet occurred on Jul 30, 2015, 3:26:13 AM +UTC, about two years after the publication of Vitalik Buterin’s white paper (November 27, 2013). Ethereum’s network, leveraging the experience gained from Bitcoin in preceding years, had a more linear (or publicly visible) genesis compared to Bitcoin. This also influenced certain characteristics of Ethereum’s Block 0, which we’ll delve into.
The period between the white paper release and the Ethereum mainnet launch witnessed the initiation of an ‘Olympic’ testnet in May 2015, followed by the launch of a ‘barebone implementation of the Ethereum project’ mainnet. Frontier, the initial mainnet, was initiated for technically savvy early adopters. As stated in the Frontier launch blog, it offered a complete set of functionalities with a codebase frozen for two weeks to allow the team to finalize the last steps and users to download and run specific software versions.
It should be underlined that it is reiterated that there is no central launch of the mainnet, but that the mainnet itself emerges from consensus (if we see how many new blockchains are launched at the time of writing this article, these take the form of a much more centralized launch ).
The Ethereum Genesis Block
However, the startup process did not change the need to configure a Genesis block, a block 0 from which to start the chain; block 0 of the Frontier network is what we still find in the Ethereum network today, despite the forks and the transition to proof of stake.
As we see from the summary viewable via the Etherscan.io block explorer, the Ethereum genesis block is produced by a GENESIS miner which has an invalid address, but the most obvious thing is that there are 8893 transactions.
The setup of the Ethereum ICO on the Genesis Block
All these transactions are generated from a genesis address to ETH addresses (0x…) by transferring a certain amount of ETH.
These transactions are the values resulting from the ICO carried out by ethereum.org starting from 22 July 2014 to finance the start of the chain; the public offering lasted 42 days and totaled the collection of 31591 Bitcoin, equal (at the exchange rate of September 2, 2014) to approximately 18.4 million US dollars, or 60102216 ETH.
The entire presale was therefore configured by the team in the genesis block so as to feed the wallets of those who had participated in the ICO with the appropriate amount of eth.
The genesis.json file for configuring the genesis block
In Ethereum, the configuration of block 0 occurs through the use of the genesis.json file; in the image we can therefore see the genesis file used for the ethereum Frontier network; this file is used as a parameter for the chain and block 0 construction functions at startup.
As you can see, the JSON file contains various values that must or can be set; some are optional (nonce, mixHash, timestamp, etc.) as the JSON file is referencing the chain before Block 0, while others will be configured as empty because they are not valid for the first block (parentHash). For details on individual parameters, please refer to the documentation. What concerns us here is how the initial balance is allocated for the addresses that participated in the ICO, which, in this case, uses the ‘alloc’ structure:
- “alloc”: è la parte di struttura che consente di configurare i valori iniziali per gli indirizzi (quelli che in questo caso han partecipato alla ICO); per ogni indirizzo viene alimentato con il valore iniziale (voce “balance”), espresso in WEI (10¹⁸ WEI = 1 ETH)
Similarly to ethereum we can therefore use the json file to initialize a private test chain using the Ethereum GETH client:
geth init genesis.json
The configuration of an Ethereum private network goes beyond the scope of this article and will be explored in depth in a dedicated post.
References:
- https://github.com/ethereum/go-ethereum
- https://geth.ethereum.org/docs/fundamentals/private-network
- https://ethereum.stackexchange.com/questions/2376/what-does-each-genesis-json-parameter-mean
- https://ethereum.stackexchange.com/questions/37720/major-conceptual-misunderstandings-about-genesis-json
- https://medium.com/singapore-blockchain-dapps/explanation-of-genesis-file-583774a5f523
- https://blog.ethereum.org/2015/07/22/frontier-is-coming-what-to-expect-and-how-to-prepare
- https://lightrains.com/blogs/genesis-json-parameter-explained-ethereum
- https://ethereum.org/en/
- https://blog.ethereum.org/2015/07/27/final-steps
- https://github.com/ethereum/ethereumj/blob/develop/ethereumj-core/src/main/resources/genesis/frontier.json
- https://blog.ethereum.org/2015/07/22/frontier-is-coming-what-to-expect-and-how-to-prepare
- https://arvanaghi.com/blog/explaining-the-genesis-block-in-ethereum/
- https://it.wikipedia.org/wiki/Ethereum
- https://consensys.io/blog/hyperledger-besu-how-to-create-an-ethereum-genesis-file
- https://ethereum.org/en/history/#whitepaper