GithubHelp home page GithubHelp logo

private-eth-poa-net's Introduction

Local Ethereum Network

A set of Docker images to create a local Ethereum network with two mining nodes, bootnode and a monitor. They use Clique protocol (Proof of Authority) consensus mechanism and don't require any computation power for it. Computation power is only needed for the transactions, therefor it runs very efficiently.

Block time is set to 8s, and gasPrice is set to 1 on the mining nodes.

Usage

Setting up this networks requires you to install Docker. Clone the repository, and run docker-compose up -d --build from the repository root. The network should start and synchronize without any further configuration.

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 two 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 DApp.

You can connect additional nodes to the network, which can serve as a RPC point and are synchronizing with other nodes. But they can't participate in the mining, since you need to be authorised in the genesis block to do that.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.