-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathquasar.sh
76 lines (48 loc) · 6.69 KB
/
quasar.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
67
68
69
70
71
72
73
74
75
76
echo "██╗ ██╗██████╗ ██╗██████╗ ████████╗ ██████╗ ██╗ ██╗██╗ ██╗██████╗ ██████╗ ██╗ ██╗";
echo "██║ ██╔╝██╔══██╗██║██╔══██╗╚══██╔══╝██╔═══██╗ ██║ ██╔╝██║ ██║██╔══██╗██╔══██╗██║ ██║";
echo "█████╔╝ ██████╔╝██║██████╔╝ ██║ ██║ ██║ █████╔╝ ██║ ██║██████╔╝██║ ██║██║ ██║";
echo "██╔═██╗ ██╔══██╗██║██╔═══╝ ██║ ██║ ██║ ██╔═██╗ ██║ ██║██╔══██╗██║ ██║██║ ██║";
echo "██║ ██╗██║ ██║██║██║ ██║ ╚██████╔╝ ██║ ██╗╚██████╔╝██║ ██║██████╔╝╚██████╔╝";
echo "╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═════╝ ";
echo " ";
sleep 1
sudo apt-get update -y
sudo apt-get install curl build-essential wget jq git -y
source <(curl -s https://raw.githubusercontent.com/nodejumper-org/cosmos-scripts/master/utils/dependencies_install.sh)
cd $HOME
curl -L https://github.com/quasar-finance/binary-release/raw/main/v0.0.2-alpha-11/quasarnoded-linux-amd64 > quasard
chmod +x quasard
sudo mv quasard /usr/local/bin/
quasard config keyring-backend test
quasard config chain-id qsr-questnet-04
quasard init "$MONIKER" --chain-id qsr-questnet-04
curl -s https://raw.githubusercontent.com/quasar-finance/questnet/main/v04/definitive-genesis.json > $HOME/.quasarnode/config/genesis.json
curl -s https://snapshots2-testnet.nodejumper.io/quasar-testnet/addrbook.json > $HOME/.quasarnode/config/addrbook.json
SEEDS="7ed8e233e5fdb21bf70ac7f635130c7a8b0a4967@quasar-testnet-seed.swiss-staking.ch:10056"
PEERS="[email protected]:48656,[email protected]:53656,[email protected]:48656,[email protected]:38656,[email protected]:28656,[email protected]:20656,[email protected]:26656,[email protected]:26656,[email protected]:18256,[email protected]:26656,[email protected]:18256,[email protected]:26656,[email protected]:26656,[email protected]:18656,[email protected]:26656,[email protected]:8090,[email protected]:26656,[email protected]:29656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:18256,[email protected]:26656,[email protected]:18256,[email protected]:26656,[email protected]:26656,[email protected]:29656,[email protected]:29656,[email protected]:23656,[email protected]:26656,[email protected]:26666,[email protected]:26656,[email protected]:29656,[email protected]:53656,[email protected]:26656"
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.quasarnode/config/config.toml
sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.quasarnode/config/app.toml
sed -i 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|g' $HOME/.quasarnode/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.quasarnode/config/app.toml
sed -i 's|^snapshot-interval *=.*|snapshot-interval = 2000|g' $HOME/.quasarnode/config/app.toml
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0uqsr"|g' $HOME/.quasarnode/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.quasarnode/config/config.toml
sudo tee /etc/systemd/system/quasard.service > /dev/null << EOF
[Unit]
Description=Quasar Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which quasard) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
quasard tendermint unsafe-reset-all --home $HOME/.quasarnode --keep-addr-book
SNAP_NAME=$(curl -s https://snapshots2-testnet.nodejumper.io/quasar-testnet/info.json | jq -r .fileName)
curl "https://snapshots2-testnet.nodejumper.io/quasar-testnet/${SNAP_NAME}" | lz4 -dc - | tar -xf - -C "$HOME/.quasarnode"
sudo systemctl daemon-reload
sudo systemctl enable quasard
sudo systemctl start quasard