GithubHelp home page GithubHelp logo

rohitsethii / private-ethereum-poa Goto Github PK

View Code? Open in Web Editor NEW
11.0 0.0 6.0 55 KB

Step by step guide to setup Ethereum POA private chain

ethereum poa private-ethereum-blockchain ethereum-blockchain ethereum-poa proof-of-authority ethereum-private-network proof-of-authority-network

private-ethereum-poa's Introduction

Private-Ethereum-POA

Step by step guide to setup Ethereum POA private chain

Steps to setup a POA chain

Set up accounts
geth --datadir firstNode/ account new
geth --datadir secondNode/ account new
store the addresses in a file: accounts.txt
echo 'node1: 323ff270ec892875885d0d91495000edb613aaa1' >> accounts.txt
echo 'node2: 4ec8d45d904370865eaf60127576612ae238eab1' >> accounts.txt
save your passwords in a file:
echo 'your password' > firstNode/password.txt
echo 'your password' > secondNode/password.txt
Genesis file

Create Genesis file using puppeth (or use the same as here).It is highly recommended to allocate some ethers to a couple of addresses in the genesis file, otherwise you’ll not be able to pay for your transactions.

Initialize your nodes:
geth --datadir firstNode/ init genesis.json
geth --datadir secondNode/ init genesis.json
Create a bootnode

The purpose of bootnode is to help nodes discover each other. The bootnode is usually ran on a static IP and thus acts like a cluster where nodes know they will find others.

bootnode -genkey boot.key
Script running on boot-node
bootnode -nodekey boot.key -verbosity 9 -addr :43011
open 2nd terminal and run following command with suggested changes:
geth --datadir firstNode/ --syncmode 'full' --port 30311 --rpc --rpcaddr 'localhost' --rpcport 8501 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://3ec4fef2d726c2c01f16f0a0030f15dd5a81e274067af2b2157cafbf76aa79fa9c0be52c6664e80cc5b08162ede53279bd70ee10d024fe86613b0b09e1106c40@127.0.0.1:43011' --networkid 1515 --gasprice '1' -unlock '0x323ff270ec892875885d0d91495000edb613aaa1' --password firstNode/password.txt --mine
  • Replace --bootnode value with yours and enter your IP address.
  • Replace --unlock value by your firstNode account
open 3nd terminal and run following command with suggested changes:
geth --datadir node2/ --syncmode 'full' --port 30312 --rpc --rpcaddr 'localhost' --rpcport 8502 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://3ec4fef2d726c2c01f16f0a0030f15dd5a81e274067af2b2157cafbf76aa79fa9c0be52c6664e80cc5b08162ede53279bd70ee10d024fe86613b0b09e1106c40@127.0.0.1:43011' --networkid 1515 --gasprice '0' --unlock '0x4ec8d45d904370865eaf60127576612ae238eab1' --password secondNode/password.txt --mine
  • Replace --unlock value by your secondNode account.
  • Replace --bootnode value with yours and enter your IP address.

private-ethereum-poa's People

Contributors

rohitsethii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.