-
Notifications
You must be signed in to change notification settings - Fork 371
/
start.sh
executable file
·36 lines (27 loc) · 1.05 KB
/
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
32
33
34
35
36
#!/usr/bin/env sh
MONIKER=${MONIKER:-"gnode"}
P2P_LADDR=${P2P_LADDR:-"tcp://0.0.0.0:26656"}
RPC_LADDR=${RPC_LADDR:-"tcp://0.0.0.0:26657"}
CHAIN_ID=${CHAIN_ID:-"portal-loop"}
GENESIS_BACKUP_FILE=${GENESIS_BACKUP_FILE:-""}
SEEDS=${SEEDS:-""}
PERSISTENT_PEERS=${PERSISTENT_PEERS:-""}
echo "" >> /gnoroot/gno.land/genesis/genesis_txs.jsonl
cat ${GENESIS_BACKUP_FILE} >> /gnoroot/gno.land/genesis/genesis_txs.jsonl
# Initialize the secrets
gnoland secrets init
# Initialize the configuration
gnoland config init
# Set the config values
gnoland config set moniker "${MONIKER}"
gnoland config set rpc.laddr "${RPC_LADDR}"
gnoland config set p2p.laddr "${P2P_LADDR}"
gnoland config set p2p.seeds "${SEEDS}"
gnoland config set p2p.persistent_peers "${PERSISTENT_PEERS}"
# Running a lazy init will generate a fresh genesis.json, with
# the previously generated secrets. We do this to avoid CLI magic from config
# reading and piping to the gnoland genesis commands
exec gnoland start \
--chainid="${CHAIN_ID}" \
--lazy \
--skip-failing-genesis-txs