Since account has no balance, do some transactions: >() This is because we have pre-funded in puppeth > eth.getBalance(eth.accounts) If we want to do any action regarding this account we need to unlock that account first. Now start creating new account from the current node1: >personal.newAccount(“yourpassword”) You can unlock your account by : >personal.unlockAccount(eth.coinbase,”yourpassword”,9999999) Geth -port 3010 -networkid 5801 -datadir=./node1 -maxpeers=50 -rpc -rpcport 7410 -rpcaddr 127.0.0.1 -rpccorsdomain "*" -rpcapi "eth,net,web3,personal,miner" -allow-insecure-unlock console 2>eth.log Pnet$ geth -datadir node1/ init pnet.json //initialize it with genesis.json we have created. Now we can initialize our node with genesis file we have created. INFO Saved genesis chain spec client=harmony path=pnet-harmony.json INFO Saved native genesis chain spec path=pnet.jsonĮRROR Failed to create Aleth chain spec err="unsupported consensus engine"ĮRROR Failed to create Parity chain spec err="unsupported consensus engine" Will create pnet.json, pnet-aleth.json, pnet-harmony.json, pnet-parity.json Which folder to save the genesis specs into? (default = current) Specify your chain/network ID if you want an explicit one (default = random) 0xff) be pre-funded with 1 wei? (advisable yes) Which accounts should be pre-funded? (advisable at least one) Which accounts are allowed to seal? (mandatory at least one) How many seconds should blocks take? (default = 15) Which consensus engine to use? (default = clique) What would you like to do? (default = create) What would you like to do? (default = stats) WARN No previous configurations found path=/home/pnet/.puppeth/pnet INFO Administering Ethereum network name=pnet Sweet, you can set this via -network=pnet next time! Please specify a network name to administer (no spaces, hyphens or capital letters please) Puppeth helps to create genesis file from scratch. Geth has many executables such as boot node, puppeth and many more. Genesis block is the first block in the blockchain and is crafted based on the parameters in the genesis.json file. Genesis file is the first file to initialize the blockchain. Pnet$ echo 'pwdnode2' > node1/password.txt Pnet$ echo 'pwdnode1' > node1/password.txt
Pnet$ echo 'ae69ea23a63ac199d336c57031308a206d01159c' > accounts.txtĪlso, save the password to txt file in the same directory of each node. Kindly copy and safe this address directory. You need to store this public address safely for future reference. Your new account is locked with a password. INFO Smartcard socket not found, disabling err="stat /run/pcscd/m: no such file or directory" INFO Maximum peer count ETH=50 LES=0 total=50 Each node in the network must be able to sign a transaction using their available private key. This wallet holds the users public and private key which is required for interacting with the blockchain. However, please note that this guide is only meant for testing, not for any industrial purpose.įirst, create a working environment in one system - Peer1Īlso set up another working environment in 2nd system - Peer2 Sudo add-apt-repository -y ppa:ethereum/ethereumĬompleting the above we can start installing the stable version of Go Ethereum: The simplest way for installing geth is via PPAs (Personal Package Archives). Here we use Ubuntu 18.04.3 LTS OS to build this network.
Boot node is used as service discovery node.įor this we need to install Go implementation of Ethereum(Geth) in our system. For this, we are using separate nodes(wallet) in two different systems and also in addition, we will setup a bootnode.
This blog briefs step by step guide to build a private network in ethereum blockchain using Proof-of-Authority (POA) consensus.