mirror of
https://github.com/tappollo/quorum-examples.git
synced 2026-01-12 17:03:08 +08:00
7nodes/README.md: Update to reflect raft/istanbul
This commit is contained in:
@@ -2,16 +2,11 @@
|
||||
|
||||
This example configures 7 nodes, each with their own PrivateTransactionManager. Usage:
|
||||
|
||||
- `init.sh`: Initialize accounts and keystores
|
||||
- `start.sh`: Launch `constellation` and `geth` nodes, then send a private transaction
|
||||
- `raft-init.sh`: Initialize accounts and keystores
|
||||
- `raft-start.sh`: Launch `constellation` and `geth` nodes, then send a private transaction
|
||||
- `stop.sh`: Stop all `constellation` and `geth` nodes
|
||||
|
||||
There are corresponding commands for running in Raft mode (`stop.sh` stays the same).
|
||||
|
||||
- `raft-init.sh`
|
||||
- `raft-start.sh`
|
||||
|
||||
There are corresponding commands for running in Istanbul mode (`stop.sh` stays the same).
|
||||
There are corresponding commands for running in Istanbul BFT mode (`stop.sh` stays the same).
|
||||
|
||||
- `istanbul-init.sh`
|
||||
- `istanbul-start.sh`
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
set -e
|
||||
|
||||
echo "[*] Cleaning up temporary data directories"
|
||||
rm -rf qdata
|
||||
mkdir -p qdata/logs
|
||||
|
||||
echo "[*] Configuring node 1"
|
||||
mkdir -p qdata/dd1/keystore
|
||||
cp keys/key1 qdata/dd1/keystore
|
||||
geth --datadir qdata/dd1 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 2 as block maker and voter"
|
||||
mkdir -p qdata/dd2/keystore
|
||||
cp keys/key2 qdata/dd2/keystore
|
||||
cp keys/key3 qdata/dd2/keystore
|
||||
geth --datadir qdata/dd2 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 3"
|
||||
mkdir -p qdata/dd3/keystore
|
||||
geth --datadir qdata/dd3 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 4 as voter"
|
||||
mkdir -p qdata/dd4/keystore
|
||||
cp keys/key4 qdata/dd4/keystore
|
||||
geth --datadir qdata/dd4 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 5 as voter"
|
||||
mkdir -p qdata/dd5/keystore
|
||||
cp keys/key5 qdata/dd5/keystore
|
||||
geth --datadir qdata/dd5 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 6"
|
||||
mkdir -p qdata/dd6/keystore
|
||||
geth --datadir qdata/dd6 init genesis.json
|
||||
|
||||
echo "[*] Configuring node 7"
|
||||
mkdir -p qdata/dd7/keystore
|
||||
geth --datadir qdata/dd7 init genesis.json
|
||||
0
examples/7nodes/istanbul-genesis.json
Executable file → Normal file
0
examples/7nodes/istanbul-genesis.json
Executable file → Normal file
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
set -e
|
||||
NETID=87234
|
||||
BOOTNODE_KEYHEX=77bd02ffa26e3fb8f324bda24ae588066f1873d95680104de5bc2db9e7b2e510
|
||||
BOOTNODE_ENODE=enode://61077a284f5ba7607ab04f33cfde2750d659ad9af962516e159cf6ce708646066cd927a900944ce393b98b95c914e4d6c54b099f568342647a1cd4a262cc0423@[127.0.0.1]:33445
|
||||
|
||||
GLOBAL_ARGS="--bootnodes $BOOTNODE_ENODE --networkid $NETID --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum"
|
||||
|
||||
echo "[*] Starting Constellation nodes"
|
||||
nohup constellation-node tm1.conf 2>> qdata/logs/constellation1.log &
|
||||
sleep 1
|
||||
nohup constellation-node tm2.conf 2>> qdata/logs/constellation2.log &
|
||||
nohup constellation-node tm3.conf 2>> qdata/logs/constellation3.log &
|
||||
nohup constellation-node tm4.conf 2>> qdata/logs/constellation4.log &
|
||||
nohup constellation-node tm5.conf 2>> qdata/logs/constellation5.log &
|
||||
nohup constellation-node tm6.conf 2>> qdata/logs/constellation6.log &
|
||||
nohup constellation-node tm7.conf 2>> qdata/logs/constellation7.log &
|
||||
|
||||
echo "[*] Starting bootnode"
|
||||
nohup bootnode --nodekeyhex "$BOOTNODE_KEYHEX" --addr="127.0.0.1:33445" 2>>qdata/logs/bootnode.log &
|
||||
echo "wait for bootnode to start..."
|
||||
sleep 6
|
||||
|
||||
echo "[*] Starting node 1"
|
||||
PRIVATE_CONFIG=tm1.conf nohup geth --datadir qdata/dd1 $GLOBAL_ARGS --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
|
||||
|
||||
echo "[*] Starting node 2"
|
||||
PRIVATE_CONFIG=tm2.conf nohup geth --datadir qdata/dd2 $GLOBAL_ARGS --rpcport 22001 --port 21001 --voteaccount "0x0fbdc686b912d7722dc86510934589e0aaf3b55a" --votepassword "" --blockmakeraccount "0xca843569e3427144cead5e4d5999a3d0ccf92b8e" --blockmakerpassword "" --singleblockmaker --minblocktime 2 --maxblocktime 5 2>>qdata/logs/2.log &
|
||||
|
||||
echo "[*] Starting node 3"
|
||||
PRIVATE_CONFIG=tm3.conf nohup geth --datadir qdata/dd3 $GLOBAL_ARGS --rpcport 22002 --port 21002 2>>qdata/logs/3.log &
|
||||
|
||||
echo "[*] Starting node 4"
|
||||
PRIVATE_CONFIG=tm4.conf nohup geth --datadir qdata/dd4 $GLOBAL_ARGS --rpcport 22003 --port 21003 --voteaccount "0x9186eb3d20cbd1f5f992a950d808c4495153abd5" --votepassword "" 2>>qdata/logs/4.log &
|
||||
|
||||
echo "[*] Starting node 5"
|
||||
PRIVATE_CONFIG=tm5.conf nohup geth --datadir qdata/dd5 $GLOBAL_ARGS --rpcport 22004 --port 21004 --voteaccount "0x0638e1574728b6d862dd5d3a3e0942c3be47d996" --votepassword "" 2>>qdata/logs/5.log &
|
||||
|
||||
echo "[*] Starting node 6"
|
||||
PRIVATE_CONFIG=tm6.conf nohup geth --datadir qdata/dd6 $GLOBAL_ARGS --rpcport 22005 --port 21005 2>>qdata/logs/6.log &
|
||||
|
||||
echo "[*] Starting node 7"
|
||||
PRIVATE_CONFIG=tm7.conf nohup geth --datadir qdata/dd7 $GLOBAL_ARGS --rpcport 22006 --port 21006 2>>qdata/logs/7.log &
|
||||
|
||||
echo "[*] Waiting for nodes to start"
|
||||
sleep 10
|
||||
echo "[*] Sending first transaction"
|
||||
PRIVATE_CONFIG=tm1.conf geth --exec 'loadScript("script1.js")' attach ipc:qdata/dd1/geth.ipc
|
||||
|
||||
echo "All nodes configured. See 'qdata/logs' for logs, and run e.g. 'geth attach qdata/dd1/geth.ipc' to attach to the first Geth node"
|
||||
Reference in New Issue
Block a user