-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAndromeda
95 lines (69 loc) · 3.44 KB
/
Andromeda
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
wget -q -O andromeda.sh https://api.nodes.guru/andromeda.sh && chmod +x andromeda.sh && sudo /bin/bash andromeda.sh
source $HOME/.bash_profile
andromedad keys add wallet
andromedad q bank balances YOUR_WALLET_ADDRESS
wallet recovery:
andromedad keys add wallet --recover
Validator create:
andromedad tx staking create-validator \
--moniker="$VALIDATOR" \
--amount=1000000uandr \
--fees 300uandr \
--pubkey=$(andromedad tendermint show-validator) \
--chain-id=$CHAIN_ID \
--commission-max-change-rate=0.01 \
--commission-max-rate=0.20 \
--commission-rate=0.10 \
--min-self-delegation=1 \
--from=wallet \
--yes
Log:
journalctl -u andromedad -f -o cat
Restart
systemctl restart andromedad
Status
curl localhost:26657/status
Sync
curl -s localhost:26657/status | jq .result.sync_info.catching_up
Valoper:
andromedad keys show wallet --bech val -a
Staking:
andromedad tx staking delegate YOUR_VALOPER_ADDRESS 1000000uandr --from wallet --chain-id $CHAIN_ID --fees 5000uandr
Addrbook
sudo systemctl stop andromedad
rm $HOME/.andromedad/config/addrbook.json
wget -O $HOME/.andromedad/config/addrbook.json "https://raw.githubusercontent.com/cryptobtcbuyer/Testnet_guides/main/Andromeda/addrbook.json"
sudo systemctl restart andromedad && sudo journalctl -u andromedad -f -o cat
Ports:
26656, 26657, 9091, 9090, 6060, 1317
Delite:
systemctl stop andromedad
systemctl disable andromedad
rm -rf ~/andromeda ~/.andromedad /etc/systemd/system/andromedad.service
Vote:
andromedad tx gov vote 2 yes --from wallet --chain-id=$CHAIN_ID --gas-prices 0.1uandr --gas-adjustment 1.5 --gas auto -y
UnJail:
andromedad tx slashing unjail --from wallet --node https://rpc-andromeda-testnet.cereslabs.io:443 --chain-id $CHAIN_ID
Reward claim:
andromedad tx distribution withdraw-rewards $(andromedad keys show wallet --bech val -a) --commission --from wallet --chain-id=$CHAIN_ID --gas-prices 0.1uandr --gas-adjustment 1.5 --gas auto -y
Redegation:
andromedad tx staking redelegate FROM_VALOPER TO_VALOPER 2000000uandr --from wallet --chain-id galileo-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.0001uandr -y
statesync
sudo systemctl stop andromedad
cp $HOME/.andromedad/data/priv_validator_state.json $HOME/.andromedad/priv_validator_state.json.backup
andromedad tendermint unsafe-reset-all --home $HOME/.andromedad --keep-addr-book
SNAP_RPC="https://andromeda-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
PEERS="9d058b4c4eb63122dfab2278d8be1bf6bf07f9ef@andromeda-testnet.nodejumper.io:26656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.andromedad/config/config.toml
sed -i 's|^enable *=.*|enable = true|' $HOME/.andromedad/config/config.toml
sed -i 's|^rpc_servers *=.*|rpc_servers = "'$SNAP_RPC,$SNAP_RPC'"|' $HOME/.andromedad/config/config.toml
sed -i 's|^trust_height *=.*|trust_height = '$BLOCK_HEIGHT'|' $HOME/.andromedad/config/config.toml
sed -i 's|^trust_hash *=.*|trust_hash = "'$TRUST_HASH'"|' $HOME/.andromedad/config/config.toml
mv $HOME/.andromedad/priv_validator_state.json.backup $HOME/.andromedad/data/priv_validator_state.json
curl -s https://snapshots2-testnet.nodejumper.io/andromeda-testnet/wasm.lz4 | lz4 -dc - | tar -xf - -C $HOME/.andromedad
sudo systemctl restart andromedad
sudo journalctl -u andromedad -f --no-hostname -o cat