Adding additional config to raft-start.sh.

Added networkid to `raft-start.sh` (same as chainid).

Setting verbosity to 5 (helpful for debugging and can be configured)
by the deployer.

Add check to make sure that the chainid is not set to 1 (mainnet).
This commit is contained in:
Libby Kent
2018-07-24 12:49:34 -04:00
parent 32e7c8d98a
commit 3d8e100273

View File

@@ -2,13 +2,22 @@
set -u
set -e
NETWORK_ID=$(cat genesis.json | grep chainId | awk -F " " '{print $2}' | awk -F "," '{print $1}')
if [ $NETWORK_ID -eq 1 ]
then
echo " Quorum should not be run with a chainId of 1 (Ethereum mainnet)"
echo " please set the chainId in the genensis.json to another value "
echo " 1337 is the recommend ChainId for Geth private clients."
fi
mkdir -p qdata/logs
echo "[*] Starting Constellation nodes"
./constellation-start.sh
echo "[*] Starting Ethereum nodes"
echo "[*] Starting Ethereum nodes with ChainID and NetworkId of $NETWORK_ID"
set -v
ARGS="--nodiscover --raft --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --emitcheckpoints"
ARGS="--nodiscover --verbosity 5 --networkid $NETWORK_ID --raft --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --emitcheckpoints"
PRIVATE_CONFIG=qdata/c1/tm.ipc nohup geth --datadir qdata/dd1 $ARGS --permissioned --raftport 50401 --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
PRIVATE_CONFIG=qdata/c2/tm.ipc nohup geth --datadir qdata/dd2 $ARGS --permissioned --raftport 50402 --rpcport 22001 --port 21001 --unlock 0 --password passwords.txt 2>>qdata/logs/2.log &
PRIVATE_CONFIG=qdata/c3/tm.ipc nohup geth --datadir qdata/dd3 $ARGS --permissioned --raftport 50403 --rpcport 22002 --port 21002 --unlock 0 --password passwords.txt 2>>qdata/logs/3.log &