Setting up a local private network
In addition to the enterprise needs of a private blockchain, there are other reasons for setting up a local private Ethereum blockchain.
As we discussed in Chapter 6, Fundamentals of Solidity, smart contracts are immutable and can be very costly once deployed to Ethereum Mainnet. It is always recommended to follow the best practices in coding, security, and economics, and have the code thoroughly tested before it is deployed on the Ethereum network. A local private blockchain makes it easy and convenient for the developers to test smart contracts and simulate the contract’s behaviors. You can even deploy smart contracts to the single instance of a local Ethereum blockchain without running a full node.
In this section, we will show you how to create multiple local nodes and configure and establish the private blockchain, as well as set up mining on the private chain. We will use the Java client Besu in this section. In the last section...