forked from ainblockchain/ain-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 1
/
start_servers.sh
executable file
·29 lines (27 loc) · 1.54 KB
/
start_servers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# PARENT CHAIN
node ./tracker-server/index.js &
sleep 5
NUM_VALIDATORS=3 ACCOUNT_INDEX=0 HOSTING_ENV=local node ./client/index.js &
sleep 10
NUM_VALIDATORS=3 ACCOUNT_INDEX=1 HOSTING_ENV=local node ./client/index.js &
sleep 10
NUM_VALIDATORS=3 ACCOUNT_INDEX=2 HOSTING_ENV=local node ./client/index.js &
sleep 10
# CHILD CHAIN 1
PORT=9010 P2P_PORT=6010 node ./tracker-server/index.js &
sleep 10
PORT=9011 P2P_PORT=6011 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=0 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_1 node ./client/index.js &
sleep 10
PORT=9012 P2P_PORT=6012 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=1 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_1 node ./client/index.js &
sleep 10
PORT=9013 P2P_PORT=6013 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=2 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_1 node ./client/index.js &
sleep 10
# CHILD CHAIN 2
PORT=9020 P2P_PORT=6020 node ./tracker-server/index.js &
sleep 10
PORT=9021 P2P_PORT=6021 TRACKER_WS_ADDR=ws://localhost:6020 NUM_VALIDATORS=3 ACCOUNT_INDEX=0 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_2 node ./client/index.js &
sleep 10
PORT=9022 P2P_PORT=6022 TRACKER_WS_ADDR=ws://localhost:6020 NUM_VALIDATORS=3 ACCOUNT_INDEX=1 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_2 node ./client/index.js &
sleep 10
PORT=9023 P2P_PORT=6023 TRACKER_WS_ADDR=ws://localhost:6020 NUM_VALIDATORS=3 ACCOUNT_INDEX=2 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/shard_2 node ./client/index.js &
sleep 10