Skip to content

A Docker Image to create a set of mining, local dev nodes

License

Notifications You must be signed in to change notification settings

webmalex/geth-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Ethereum Network

A set of Docker images to create a local Ethereum network with three nodes and a monitor. This was built to understand how local Ethereum networks have to be set up and to provide a local test environment. Never use this in a productive environment, as the docker-compose.yml contains hardcoded passwords and private keys for convenience

Usage

Setting up this networks requires you to install Docker. Clone the repository, and run docker-compose up from the repository root. The network should start and synchronize without any further configuration. It is using the Clique protocol (Proof-of-Authority), so the network runs very efficiently and does not use a lot of energy.

The bootnode

The nodes in the network are connecting with the bootnode. This is a special ethereum node, designed to provide a register of the existing nodes in the network. The parameter nodekeyhexin the docker-compose.yml is needed to derive the enodeID which is later passed to the other nodes. The IP needs to be fixed, as the other nodes need to know where to find the bootnode, and DNS is not supported. The bootnode does not participate in synchronization of state or mining.

Miners / Geth Nodes

There are three nodes that participate in the network. The state is synchronized between them and they are trying to create blocks with mining. Initially they connect to the bootnode with the information derived from the fixed IP and the nodekeyhex. If you want to interact with the network, you need to connect via RPC. You can attach a geth instance, connect Remix IDE or connect your browser with web3 and build a ÐApp.

The RPC Ports of the nodes are mapped to your localhost, the addresses are:

Monitoring

The monitoring is being provided by two nodes, the monitoring-backend and the monitoring-frontend. The backend connects to the ethereum nodes and retrieves metrics from them. It communicates with the monitoring-frontend with websockets. The frontend can be found under http://localhost:3000

About

A Docker Image to create a set of mining, local dev nodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published