This repo sets up a private local quorum network with IBFT consensus. Default number of nodes are 5, but they can be customized as per the requirements.
- https://docs.goquorum.consensys.net/tutorials/private-network/create-ibft-network#prerequisites
- https://docs.goquorum.consensys.net/deploy/install/binaries
- https://www.tutorialspoint.com/how-to-set-the-gopath-environment-variable-on-ubuntu
- https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04#option-3-installing-node-using-the
- Start the basic quorum network of 5 nodes:
./byfn-ibft.sh 5
- Verify that the network has started:
ps aux|grep geth
- Copy files to the IBFT-NETWORK directory:
cp -r output/ runscript.sh start-permission.sh IBFT-Network
- Navigate to the IBFT-NETWORK directory & update the existing guardian accounts in the start-permission.sh script:
echo -e "\t\"accounts\": [\"$guardianAccount\", \"0x999069dD75094B5C4AEE6D40E11f1D6076b4134b\", \"0x973448aa9C1bdA2F896854e273AAe01b9368332D\"]," >> ./permission-config.json
- Start enhanced permissioned network: (Make sure the existing n/w is running)
./start-permission.sh --numNodes 5
- Stop the running network:
sudo kill -9 $(ps aux|grep geth |awk {'print$2'})
- Copy permissioned-nodes.json in each nodes data directory:
niket@niket-X555LAB:~/blockchain/quorum-deployer-files/IBFT-Network/Node-0/data$ cp static-nodes.json permissioned-nodes.json
niket@niket-X555LAB:~/blockchain/quorum-deployer-files/IBFT-Network/Node-0/data$ cp permissioned-nodes.json ../../Node-1/data/
niket@niket-X555LAB:~/blockchain/quorum-deployer-files/IBFT-Network/Node-0/data$ cp permissioned-nodes.json ../../Node-2/data/
niket@niket-X555LAB:~/blockchain/quorum-deployer-files/IBFT-Network/Node-0/data$ cp permissioned-nodes.json ../../Node-3/data/
niket@niket-X555LAB:~/blockchain/quorum-deployer-files/IBFT-Network/Node-0/data$ cp permissioned-nodes.json ../../Node-4/data/
- Init & restart all the geth nodes: (Run these commands from all the Node-[id] folders)
# Below 3 lines are common for all the nodes
geth --datadir data init data/genesis.json
export ADDRESS=$(grep -o '"address": *"[^"]*"' ./data/keystore/accountKeystore | grep -o '"[^"]*"$' | sed 's/"//g')
export PRIVATE_CONFIG=ignore
# Node-0
nohup geth --datadir data \
--networkid 1337 --nodiscover --verbosity 5 \
--syncmode full \
--istanbul.blockperiod 5 --mine --miner.threads 1 --miner.gasprice 0 --emitcheckpoints \
--http --http.addr 0.0.0.0 --http.port 22000 --http.corsdomain "*" --http.vhosts "*" \
--ws --ws.addr 0.0.0.0 --ws.port 32000 --ws.origins "*" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--ws.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--unlock ${ADDRESS} --allow-insecure-unlock --password ./data/keystore/accountPassword --permissioned \
--port 30300 2>>0.log &
# Node-1
nohup geth --datadir data \
--networkid 1337 --nodiscover --verbosity 5 \
--syncmode full \
--istanbul.blockperiod 5 --mine --miner.threads 1 --miner.gasprice 0 --emitcheckpoints \
--http --http.addr 0.0.0.0 --http.port 22001 --http.corsdomain "*" --http.vhosts "*" \
--ws --ws.addr 0.0.0.0 --ws.port 32001 --ws.origins "*" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--ws.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--unlock ${ADDRESS} --allow-insecure-unlock --password ./data/keystore/accountPassword --permissioned \
--port 30301 2>>1.log &
# Node-2
nohup geth --datadir data \
--networkid 1337 --nodiscover --verbosity 5 \
--syncmode full \
--istanbul.blockperiod 5 --mine --miner.threads 1 --miner.gasprice 0 --emitcheckpoints \
--http --http.addr 0.0.0.0 --http.port 22002 --http.corsdomain "*" --http.vhosts "*" \
--ws --ws.addr 0.0.0.0 --ws.port 32002 --ws.origins "*" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--ws.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--unlock ${ADDRESS} --allow-insecure-unlock --password ./data/keystore/accountPassword --permissioned \
--port 30302 2>>2.log &
# Node-3
nohup geth --datadir data \
--networkid 1337 --nodiscover --verbosity 5 \
--syncmode full \
--istanbul.blockperiod 5 --mine --miner.threads 1 --miner.gasprice 0 --emitcheckpoints \
--http --http.addr 0.0.0.0 --http.port 22003 --http.corsdomain "*" --http.vhosts "*" \
--ws --ws.addr 0.0.0.0 --ws.port 32003 --ws.origins "*" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--ws.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--unlock ${ADDRESS} --allow-insecure-unlock --password ./data/keystore/accountPassword --permissioned \
--port 30303 2>>3.log &
# Node-4
nohup geth --datadir data \
--networkid 1337 --nodiscover --verbosity 5 \
--syncmode full \
--istanbul.blockperiod 5 --mine --miner.threads 1 --miner.gasprice 0 --emitcheckpoints \
--http --http.addr 0.0.0.0 --http.port 22004 --http.corsdomain "*" --http.vhosts "*" \
--ws --ws.addr 0.0.0.0 --ws.port 32004 --ws.origins "*" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--ws.api admin,eth,debug,miner,net,txpool,personal,web3,istanbul \
--unlock ${ADDRESS} --allow-insecure-unlock --password ./data/keystore/accountPassword --permissioned \
--port 30304 2>>4.log &
niket@niket-X555LAB:~$ geth version
Geth
Version: 1.10.3-stable
Quorum Version: 23.4.0
Architecture: amd64
Network Id: 1337
Go Version: go1.16.7
Operating System: linux
GOPATH=/home/niket/blockchain/go_projects
GOROOT=/usr/local/go
- gcc issue:
apt-get install build-essential
- gopath issue:
export GOROOT=/usr/local/go
export GOPATH=/home/niket/blockchain/go_projects
- Issue of missing requirement while running make test:
go get google.golang.org/protobuf/types/known/[email protected]