Welcome to validator AlxVoy ⚡ ANODE.TEAM



Gravity Bridge

Links

Mainnet service

Explorers

Sync

RPC & API

Peers and seeds

Genesis and addrbook

Service script (Install, State-Sync, Snapshot, Delete)

wget -O Gravity.sh https://anode.team/Gravity/main/Gravity.sh && chmod u+x Gravity.sh && ./Gravity.sh

Installation

Software Requirements

  • Prerequisite: go1.18.5+ required. ref
  • Prerequisite: git. ref

Download last binary

mkdir gravity-bin && cd gravity-bin

wget https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.11.1/gravity-linux-amd64
mv gravity-linux-amd64 gravity
wget https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.11.1/gbt

chmod +x *
sudo mv * /usr/local/bin/

Init the config files

gravity init <moniker> --chain-id gravity-bridge-3
gbt init

Create wallets

gravity keys add <wallet_name> --algo secp256k1 --coin-type 118
gravity keys add <wallet_orchestrator_name>
gravity eth_keys add <wallet_eth_name>

Key set for orchestrator

gbt keys set-ethereum-key --key <your Ethereum PRIVATE key>
gbt keys set-orchestrator-key --phrase "<your mnemonic from orchestrator wallet>"

Download genesis and addrbook

curl https://anode.team/Gravity/main/genesis.json > ~/.gravity/config/genesis.json
curl https://anode.team/Gravity/main/addrbook.json > ~/.gravity/config/addrbook.json

Add peers, seed

SEEDS=""
PEERS="c189b7217b037e50b3456440963f91d027a4df5a@65.108.199.222:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.gravity/config/config.toml

Add min gas

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0,001ugraviton\"/" $HOME/.gravity/config/app.toml

Create the service file

sudo tee /etc/systemd/system/gravity.service > /dev/null <<EOF
[Unit]
Description=Gravity Bridge
After=network-online.target

[Service]
User=$USER
ExecStart=$(which gravity) start --inv-check-period 5000
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Load service and start

sudo systemctl daemon-reload && sudo systemctl enable gravity
sudo systemctl restart gravity && journalctl -fu gravity -o cat

Create the service file Orchestrator

sudo tee /etc/systemd/system/orchestrator.service > /dev/null <<EOF
[Unit]
Description=Gravity Bridge Orchestrator
Requires=network.target
[Service]
Type=simple
TimeoutStartSec=10s
Restart=on-failure
RestartSec=10
ExecStart=$(which gbt) orchestrator \
--fees 5000ugraviton \
--gravity-contract-address 0xa4108aA1Ec4967F8b52220a4f7e94A8201F2D906 \
--ethereum-rpc "https://eth.althea.net/"
[Install]
WantedBy=default.target
EOF

Load service and start

sudo systemctl daemon-reload && sudo systemctl enable orchestrator
sudo systemctl restart orchestrator && journalctl -fu orchestrator -o cat

Create Validator

gravity tx staking create-validator \
  --amount=1000000ugraviton \
  --pubkey=$(gravity tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --chain-id="gravity-bridge-3" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --fees="500ugraviton" \
  --from=<wallet_name>

State-Sync

SNAP_RPC=https://gravity.rpc.m.anode.team:443 && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sudo systemctl stop gravity && gravity tendermint unsafe-reset-all --home $HOME/.gravity --keep-addr-book
peers="54f81cc43244227ba7f514c0c18bff2a184438c0@144.76.97.251:26656"
sed -i.bak -e  "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.gravity/config/config.toml
sed -i.bak -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\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.gravity/config/config.toml
sudo systemctl restart gravity && journalctl -fu gravity -o cat