-
Notifications
You must be signed in to change notification settings - Fork 2
/
start_mainnet_state.sh
executable file
·35 lines (25 loc) · 1.08 KB
/
start_mainnet_state.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
#!/bin/bash
set -e
OSMOSIS_HOME=$HOME/.osmosisd
SNAPSHOT_URL=$(curl -sL https://snapshots.osmosis.zone/latest)
RPC_URL=https://rpc.osmosis.zone
ADDRBOOK_URL="https://rpc.osmosis.zone/addrbook"
GENESIS_URL=https://github.com/osmosis-labs/osmosis/raw/main/networks/osmosis-1/genesis.json
rm -rf $HOME/.osmosisd/
osmosisd init test --chain-id testing --home=$HOME/.osmosisd
# Copy genesis
echo -e "\nDownloading genesis file..."
wget $GENESIS_URL -O $OSMOSIS_HOME/config/genesis.json
echo ✅ Genesis file downloaded successfully.
# Download latest snapshot
echo -e "\nDownloading latest snapshot..."
wget -O - $SNAPSHOT_URL | lz4 -d | tar -C $OSMOSIS_HOME/ -xf -
echo -e ✅ Snapshot downloaded successfully.
# Run the node
osmosisd start --home=$HOME/.osmosisd
# Wait for at least 1 block
# killall osmosisd
# Make sure you're on v25
# osmosisd in-place-testnet edgenet osmo12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj --trigger-testnet-upgrade v26
# Run to run migrations
# osmosisd start --home=$HOME/.osmosisd --p2p.persistent_peers "" --p2p.seeds "" --rpc.unsafe --grpc.enable --grpc-web.enable