Minimum hardware requirements :
1) Auto_install script
Copy wget -O gravitym https://raw.githubusercontent.com/111STAVR111/props/main/Gravity/gravitym && chmod +x gravitym && ./gravitym
2) Manual installation
Preparing the server
Copy sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
GO 1.21.6
Copy ver = "1.21.6"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME /.bash_profile
source $HOME /.bash_profile
go version
Build 01.10.24
Copy cd $HOME && mkdir -p go/bin/
mkdir gravity-bin && cd gravity-bin
wget -O gravity https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.12.0/gravity-linux-amd64
mv gravity-linux-amd64 gravity
wget https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.12.0/gbt
chmod +x *
mv $HOME /gravity /usr/bin/
mv $HOME /gbt /usr/bin/
gravity version --long | head
commit: 5ae18bc3253933168137a257ccfadf4d81e2eef7
Initiation
Copy gravity init STAVR_guide --chain - id gravity - bridge - 3
gravity config chain - id gravity - bridge - 3
gbt init
Create wallet
Copy gravity keys add < wallet_nam e > --algo secp256k1 --coin-type 118
gravity keys add < wallet_orchestrator_nam e >
gravity eth_keys add < wallet_eth_nam e >
Key set for orchestrator
Copy gbt keys set - ethereum - key --key < your Ethereum PRIVATE key >
gbt keys set - orchestrator - key --phrase "<your mnemonic from orchestrator wallet>"
Download Genesis
Copy wget - O $HOME / . gravity / config / genesis . json "https://raw.githubusercontent.com/111STAVR111/props/main/Gravity/genesis.json"
sha256sum $HOME/.gravity/config/genesis.json
3c1cb9bf8003a1045b415b19bc92890b5a69ec8cf1ef909b61d5503b5e1c1dff
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
Copy sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001ugraviton\"/;" ~/.gravity/config/app.toml
external_address = $( wget -qO- eth0.me )
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME /.gravity/config/config.toml
peers = ""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME /.gravity/config/config.toml
seeds = ""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME /.gravity/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME /.gravity/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME /.gravity/config/config.toml
Pruning (optional)
Copy pruning = "custom"
pruning_keep_recent = "1000"
pruning_keep_every = "0"
pruning_interval = "10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME /.gravity/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME /.gravity/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME /.gravity/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME /.gravity/config/app.toml
Indexer (optional)
Copy indexer = "null" &&
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME /.gravity/config/config.toml
Download addrbook
Copy wget -O $HOME /.gravity/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Gravity/addrbook.json"
Create a service file
Copy sudo tee /etc/systemd/system/gravity.service > /dev/null << EOF
[Unit]
Description=gravity
After=network-online.target
[Service]
User=$USER
ExecStart=$( which gravity) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
StateSync Gravity Mainnet
SnapShot Mainnet updated every 5 hours
Start
Copy sudo systemctl daemon-reload
sudo systemctl enable gravity
sudo systemctl restart gravity && sudo journalctl -fu gravity -o cat
Create the service file Orchestrator
Copy 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 0x a4108aA1Ec4967F8b52220a4f7e94A8201F2D906 \
--ethereum - rpc "https://eth.althea.net/"
[Install]
WantedBy = default . target
EOF
Load service and start
Copy sudo systemctl daemon - reload && sudo systemctl enable orchestrator
sudo systemctl restart orchestrator && journalctl - fu orchestrator - o cat
Create validator
Copy gravity tx staking create - validator \
--commission - rate 0.1 \
--commission - max - rate 0.2 \
--commission - max - change - rate 0.2 \
-- min - self - delegation "1" \
--amount 1000000000000000000ugraviton \
--pubkey $(gravity tendermint show - validator) \
-- from < wallet > \
--moniker = "STAVR_guide" \
--chain - id gravity - bridge - 3 \
--fees = "500ugraviton" \
--identity = "" \
--website = "" \
--details = "" - y
Monitoring
You can set up your node status alarm here - Monitoring
Security
You can create secure management of your wallet and your node by following this links.
TMKMS Wallet Security
Delete node
Copy sudo systemctl stop gravity
sudo systemctl disable gravity
rm /etc/systemd/system/gravity.service
sudo systemctl daemon-reload
cd $HOME
rm -rf gravity-bin
rm -rf .gravity
rm -rf $( which gravity )
Last updated 2 months ago