Components of a private network
A private net allows the creation of an entirely new blockchain usually on a local network. This is different from testnet or mainnet in the sense that it uses its own genesis block and network ID. In order to create a private net, three components are needed:
- Network ID
- The genesis file
- Data directory to store blockchain data
Even though the data directory does not strictly need to be mentioned, if there is more than one blockchain already active on the system, then the data directory should be specified so that a separate directory is used for the new blockchain.
On the mainnet, the Geth Ethereum client is capable of discovering boot nodes by default as they are hardcoded in the Geth client, and connects automatically, but on a private network, Geth needs to be configured by specifying appropriate flags and configurations in order for it to discover, or be discoverable by, other peers. We will see how this is achieved...