-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathstart_local_blockchain.sh
executable file
·66 lines (64 loc) · 1.79 KB
/
start_local_blockchain.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#
# A script to start a local blockchain.
#
# Note that ENABLE_EVENT_HANDLER=true is set for node 2 for testing
# the event manager modules of @ainblockchain/ain-js.
#
printf "\n[[[[[ start_local_blockchain.sh ]]]]]\n\n"
# tracker
printf "\nStarting tracker..\n"
PORT=8080 \
P2P_PORT=5000 \
CONSOLE_LOG=false \
node ./tracker-server/index.js &
printf "\nDone\n\n"
sleep 5
# node 0
printf "\nStarting node 0..\n"
UNSAFE_PRIVATE_KEY=b22c95ffc4a5c096f7d7d0487ba963ce6ac945bdc91c79b64ce209de289bec96 \
PORT=8081 \
P2P_PORT=5001 \
STAKE=100000 \
CONSOLE_LOG=true \
LOG_BANDAGE_INFO=true \
ENABLE_REST_FUNCTION_CALL=true \
ENABLE_TX_SIG_VERIF_WORKAROUND=true \
ENABLE_GAS_FEE_WORKAROUND=true \
ENABLE_EXPRESS_RATE_LIMIT=false \
TX_POOL_SIZE_LIMIT_PER_ACCOUNT=1000 \
node ./client/index.js &
printf "\nDone\n\n"
sleep 10
# node 1
printf "\nStarting node 1..\n"
UNSAFE_PRIVATE_KEY=921cc48e48c876fc6ed1eb02a76ad520e8d16a91487f9c7e03441da8e35a0947 \
PORT=8082 \
P2P_PORT=5002 \
STAKE=100000 \
CONSOLE_LOG=true \
LOG_BANDAGE_INFO=true \
ENABLE_REST_FUNCTION_CALL=true \
ENABLE_TX_SIG_VERIF_WORKAROUND=true \
ENABLE_GAS_FEE_WORKAROUND=true \
ENABLE_EXPRESS_RATE_LIMIT=false \
TX_POOL_SIZE_LIMIT_PER_ACCOUNT=1000 \
node ./client/index.js &
printf "\nDone\n\n"
sleep 10
# node 2 with ENABLE_EVENT_HANDLER=true
printf "\nStarting node 2..\n"
UNSAFE_PRIVATE_KEY=41e6e5718188ce9afd25e4b386482ac2c5272c49a622d8d217887bce21dce560 \
PORT=8083 \
P2P_PORT=5003 \
STAKE=100000 \
CONSOLE_LOG=true \
LOG_BANDAGE_INFO=true \
ENABLE_REST_FUNCTION_CALL=true \
ENABLE_TX_SIG_VERIF_WORKAROUND=true \
ENABLE_GAS_FEE_WORKAROUND=true \
ENABLE_EXPRESS_RATE_LIMIT=false \
TX_POOL_SIZE_LIMIT_PER_ACCOUNT=1000 \
ENABLE_EVENT_HANDLER=true \
node ./client/index.js &
printf "\nDone\n\n"