-
Notifications
You must be signed in to change notification settings - Fork 0
/
genesis_start.sh
31 lines (30 loc) · 991 Bytes
/
genesis_start.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
#!/bin/bash
DATADIR="./blockchain"
if [ ! -d $DATADIR ]; then
mkdir -p $DATADIR;
fi
#Replace EOS Public Key in genesis.json
sed -i "s/IDBOTIC_EOSIO_PUBLIC_KEY/$IDBOTIC_EOSIO_PUBLIC_KEY/" genesis.json
nodeos \
--genesis-json $DATADIR"/../../genesis.json" \
--signature-provider $IDBOTIC_EOSIO_PUBLIC_KEY=KEY:$IDBOTIC_EOSIO_PRIVATE_KEY\
--plugin eosio::producer_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::http_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::history_plugin \
--data-dir $DATADIR"/data" \
--blocks-dir $DATADIR"/blocks" \
--config-dir $DATADIR"/config" \
--producer-name YOUR_PRODUCER_NAME\
--http-server-address 0.0.0.0:8888 \
--p2p-listen-endpoint 0.0.0.0:4444 \
--access-control-allow-origin=* \
--contracts-console \
--http-validate-host=false \
--verbose-http-errors \
--enable-stale-production \
--p2p-peer-address INSTANCE2_IP:4444 \
--p2p-peer-address INSTANCE3_IP:4444 \
>> $DATADIR"/nodeos.log" 2>&1 & \
echo $! > $DATADIR"/eosd.pid