-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanual install
118 lines (92 loc) · 4.15 KB
/
manual install
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
======================= Guide from Nodejumper
# install dependencies, if needed
sudo apt update
sudo apt install -y curl git jq lz4 build-essential unzip
if [ ! -f "/usr/local/go/bin/go" ]; then
bash <(curl -s "https://raw.githubusercontent.com/nodejumper-org/cosmos-scripts/master/utils/go_install.sh")
source .bash_profile
fi
#!/bin/bash
NODE_MONIKER="YOUR_NODE_MONIKER"
cd || return
rm -rf nibiru
git clone https://github.com/NibiruChain/nibiru
cd nibiru || return
git checkout v0.15.0
make install
nibid version # v0.15.0
nibid config keyring-backend test
nibid config chain-id nibiru-testnet-1
nibid init $NODE_MONIKER --chain-id nibiru-testnet-1
curl -s https://rpc.testnet-1.nibiru.fi/genesis | jq -r .result.genesis > $HOME/.nibid/config/genesis.json
sha256sum $HOME/.nibid/config/genesis.json # b58b61beb34f0d9e45ec2f1449f6600acef428b401976dc90edb9d586a412ed2
curl -s https://snapshots3-testnet.nodejumper.io/nibiru-testnet/addrbook.json > $HOME/.nibid/config/addrbook.json
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001unibi"|g' $HOME/.nibid/config/app.toml
seeds=""
peers="b32bb87364a52df3efcbe9eacc178c96b35c823a@nibiru-testnet.nodejumper.io:26656,[email protected]:60656,[email protected]:10656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.nibid/config/config.toml
# in case of pruning
sed -i 's|pruning = "default"|pruning = "custom"|g' $HOME/.nibid/config/app.toml
sed -i 's|pruning-keep-recent = "0"|pruning-keep-recent = "100"|g' $HOME/.nibid/config/app.toml
sed -i 's|pruning-interval = "0"|pruning-interval = "17"|g' $HOME/.nibid/config/app.toml
sudo tee /etc/systemd/system/nibid.service > /dev/null << EOF
[Unit]
Description=Nibiru Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which nibid) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
nibid tendermint unsafe-reset-all --home $HOME/.nibid --keep-addr-book
SNAP_RPC="https://nibiru-testnet.nodejumper.io:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.nibid/config/config.toml
sudo systemctl daemon-reload
sudo systemctl enable nibid
sudo systemctl restart nibid
sudo journalctl -u nibid -f --no-hostname -o cat
# Create wallet
nibid keys add wallet
## Console output
#- name: wallet
# type: local
# address: nibi1r9kmadqs9nsppn4wz5yp4rw8zn9545rc4zwvs7
# pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Auq9WzVEs5pCoZgr2WctjI7fU+lJCH0I3r6GC1oa0tc0"}'
# mnemonic: ""
#!!! SAVE SEED PHRASE
kite upset hip dirt pet winter thunder slice parent flag sand express suffer chest custom pencil mother bargain remember patient other curve cancel sweet
# Wait util the node is synced, should return FALSE
nibid status 2>&1 | jq .SyncInfo.catching_up
# Go to https://discord.com/invite/zjkzZwrez5 and request tokens in faucet channel
# Verify the balance
nibid q bank balances $(nibid keys show wallet -a)
## Console output
# balances:
# - amount: "10000000"
# denom: unibi
# Create validator
nibid tx staking create-validator \
--amount=5000000unibi \
--pubkey=$(nibid tendermint show-validator) \
--moniker="YOUR_VALIDATOR_MONIKER" \
--chain-id=nibiru-testnet-1 \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.05 \
--min-self-delegation=1 \
--fees=2000unibi \
--from=wallet \
-y
# Make sure you see the validator details
nibid q staking validator $(nibid keys show wallet --bech val -a)