Advertisement
EvenoR

INITIA HETZNER NODE

May 21st, 2024 (edited)
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.93 KB | None | 0 0
  1. --------------
  2.  
  3. local_height=$(initiad status | jq -r .sync_info.latest_block_height); network_height=$(curl -s https://rpc.dinhcongtac221.fun/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"
  4.  
  5. --------------
  6.  
  7. PEERS=$(curl -s --max-time 3 --retry 2 --retry-connrefused "https://rpc-initia-testnet.trusted-point.com/hetzner_peers.txt")
  8. if [ -z "$PEERS" ]; then
  9.     echo "No peers were retrieved from the URL."
  10. else
  11.     echo -e "\nPEERS: "$PEERS""
  12.     sed -i "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" "$HOME/.initia/config/config.toml"
  13.     echo -e "\nConfiguration file updated successfully.\n"
  14. fi
  15.  
  16. --------------
  17.  
  18. sudo systemctl restart initiad && sudo journalctl -u initiad -f -o cat
  19.  
  20. --------------
  21.  
  22. initiad tx mstaking create-validator \
  23. --amount 1000000uinit \
  24. --pubkey $(initiad tendermint show-validator) \
  25. --moniker "YOUR_MONIKER_NAME" \
  26. --identity "YOUR_KEYBASE_ID" \
  27. --details "YOUR_DETAILS" \
  28. --website "YOUR_WEBSITE_URL" \
  29. --chain-id initiation-1 \
  30. --commission-rate 0.05 \
  31. --commission-max-rate 0.20 \
  32. --commission-max-change-rate 0.05 \
  33. --from wallet \
  34.  --gas=2000000 --fees=300000uinit \
  35. --node https://rpc.dinhcongtac221.fun/ \
  36. -y
  37.  
  38. -------------
  39.  
  40. initiad tx mstaking delegate $(initiad keys show $WALLET_NAME --bech val -a)  <AMOUNT>uinit --from $WALLET_NAME --gas=2000000 --fees=300000uinit --node https://rpc.dinhcongtac221.fun/ -y
  41.  
  42. ------------
  43.  
  44. RPC="http://$(wget -qO- eth0.me)$(grep -A 3 "\[rpc\]" $HOME/.initia/config/config.toml | egrep -o ":[0-9]+")" && echo $RPC
  45.  
  46. curl $RPC/status
  47.  
  48. sed -i '/\[rpc\]/,/\[/{s/^laddr = "tcp:\/\/127\.0\.0\.1:/laddr = "tcp:\/\/0.0.0.0:/}' $HOME/.initia/config/config.toml
  49.  
  50. sudo systemctl restart initiad
  51.  
  52. sudo journalctl -u initiad -f -o cat --no-hostname
  53.  
  54. curl $RPC/status
  55.  
  56. echo $RPC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement