• This repository has been archived on 17/Feb/2021
  • Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Dockerfile
  • License
    Eclipse Public Li...
  • Created almost 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Docker Image to create a set of mining, local Ethereum nodes for development

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

The testnet consists out of multiple parts :

  • 1 Bootnode - registers existing nodes on the network, discovery service.
  • 2 Miners - Also called sealers with proof-of-authority. They validate the blocks. No RPC is exposed as they are required to be unlocked.
  • 1 Node - This serves as transaction relay and is a fullnode that does not mine, is locked but has RPC exposed
  • 2 Swarm nodes - These nodes make up the peer-to-peer CDN
  • 1 Blockchain explorer - Lightweight web application to explore the blockchain through web application.

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. The networks always uses the latest available versions of Ethereum and Swarm, the network is set up for clique proof-of-authority similar to the Ethereum Rinkeby testnet. For more information on clique POA see ethereum/EIPs#225 .

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:

  • geth-dev-miner-1 : No RPC exposed
  • geth-dev-miner-2: No RPC exposed
  • geth-dev-node: http://localhost:8545

Swarm (/BZZ:/)

Swarm is a distributed storage platform and content distribution service, a native base layer service of the ethereum web3 stack. The primary objective of Swarm is to provide a sufficiently decentralized and redundant store of Ethereum’s public record, in particular to store and distribute dapp code and data as well as blockchain data. From an economic point of view, it allows participants to efficiently pool their storage and bandwidth resources in order to provide these services to all participants of the network, all while being incentivised by Ethereum. Files on Swarm are represented by their KECCAK256 Checksum.

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

Whisper (/SHH:/)

Coming soon ...

Blockchain Explorer

The blockchain explorer is a simple node.js web application being provided by a seperate container: geth-explorer. The application uses the web3 javascript API to fetch the data from geth-dev-node through RPC calls. The blockchain explorer can be found at http://localhost:8080.

More Repositories

1

jukebox

Jukeboxes process records. This Java Annotation Processor automatically creates Builders for JEP 359 Records (Preview). Needs Java 14.
Java
16
star
2

sql-mapping

Example Repository for my Talk "Thoughts on layered architecture - Mapping efficiently with SQL"
Java
11
star
3

slack-the-music

A babashka script to update your slack status with your current Apple Music track
Clojure
6
star
4

javahippie.net

My blog
HTML
3
star
5

farbton

A clojure library which wraps the Philips Hue API
Clojure
3
star
6

camundacon-2020.2

Code and JMeter Suite for my CamundaCon 2020.2 presentation
Java
3
star
7

camunda-native-image

This is a test to run Camunda on GraalVM native image. Note, that this example is work in progress, and not yet working!
Java
2
star
8

camunda-elasticsearch-task-list-plugin

A Process Engine Plugin for Camunda which forwards Tasks with Process Variables into a Lucene Instance
Java
2
star
9

camunda-external-task-client-clojure

Clojure Wrapper for the Java Camunda External Task Client (Work in Progress)
Clojure
2
star
10

cloudready-clojure

Sources for the Blog Series "Cloudready Clojure" https://javahippie.net/clojure/cloud/2020/04/20/clojurenative01.html
Clojure
2
star
11

clj-groups

Attempt in wrapping the JGroups Java library for more idiomatic use in Clojure
Clojure
1
star
12

camunda-example-code

Example Code for Training sessions & myself
Java
1
star
13

Web3-Transaction-Form

A simple form to start Ethereum Transactions with the web3 JS API
JavaScript
1
star
14

clojure-livecoding-jax

Code for my LiveCodeing session @ JAX 2022
Clojure
1
star
15

website

My private website
Clojure
1
star