# Official manual - <https://github.com/Gravity-Bridge/Gravity-Docs/blob/main/docs/setting-up-your-genesis-validator.md>
1. download binary
mkdir gravity-bin
cd gravity-bin
# the gravity chain binary itself
wget <https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.0.0/gravity-v0.1.5-linux-amd64>
mv gravity-v0.1.5-linux-amd64 gravity
# Tools for the gravity bridge from the gravity repo
wget <https://github.com/Gravity-Bridge/Gravity-Bridge/releases/download/v1.0.0/gbt>
chmod +x *
sudo mv * /usr/bin/
# 2. download genesis
wget <https://raw.githubusercontent.com/Gravity-Bridge/gravity-docs/main/genesis.json> genesis.json
cp genesis.json $HOME/.gravity/config/genesis.json
# 3. init
gbt init
gbt keys set-ethereum-key --key <your **Ethereum private key** generated during gentx creation>
gbt keys set-orchestrator-key --phrase "**mnemonic from orchestrator** you generated with your gentx"
# check keys
gbt keys show
**# EXAMPLE** 3. init **===========**
$ gbt init
$ gbt keys set-ethereum-key --key **0xf515ea532a94d5d455a50529396xxxxxxxxxxxxx33f9ffc8751e0xxx8bed**
# OUTPUT [2021-12-03T17:22:20Z INFO gbt::keys] Successfully updated Ethereum Key
$ gbt keys set-orchestrator-key --phrase "XXXX member decrease XXXXe shed XXXX also carry idle kit around XXXX stove absorb witness explain XXXX smart inform"
# OUTPUT [2021-12-03T17:25:41Z INFO gbt::keys] Successfully updated Orchestrator Key
$ gbt keys show
# [2021-12-03T17:34:27Z INFO gbt::keys] Your Orchestrator key, **gravity120lcc678gkx7eczpmgae9m6xu7wg8vmm6t**
# [2021-12-03T17:34:28Z INFO gbt::keys] Your Ethereum key, **0x9297719743Aaf5c07A9Bed3102f16456559De**
# ===================
# 4. create gravity-node service (root)
sudo tee /etc/systemd/system/gravity-node.service > /dev/null <<EOF
[Unit]
Description=Gravity blockchain node
Requires=network.target
[Service]
Type=simple
TimeoutStartSec=10s
Restart=always
RestartSec=10
ExecStart=/usr/bin/gravity start
LimitNOFILE=500000
LimitNPROC=500000
Environment="HOME=/root"
[Install]
WantedBy=default.target
EOF
# 5. create orchestrator service
sudo tee /etc/systemd/system/orchestrator.service > /dev/null <<EOF
[Unit]
Description=Gravity bridge orchestrator
Requires=network.target
[Service]
Type=simple
TimeoutStartSec=10s
Restart=always
RestartSec=10
ExecStart=/usr/bin/gbt orchestrator --fees 0ugraviton --gravity-contract-address 0xa17f0B21c70FaB270c68031A179e7bE61BE7E81e
[Install]
WantedBy=default.target
EOF
# 6. Send 1 ETH Goerli to your ETH addr (faucet - <https://faucet.goerli.mudit.blog/>)
# 7. Config.toml
SEEDS="[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \\"$SEEDS\\"/" $HOME/.gravity/config/config.toml
# 8. Start services
sudo systemctl daemon-reload
sudo systemctl enable gravity-node
sudo systemctl enable orchestrator
# Start node
sudo systemctl restart gravity-node && journalctl -u gravity-node -f
# if OK - CTRL+C and contionue
sudo systemctl restart orchestrator && journalctl -u orchestrator -f
# OUTPUT
# Dec 03 18:21:15 gb systemd[1]: Started Gravity bridge orchestrator.
# Dec 03 18:21:15 gb gbt[97954]: [2021-12-03T18:21:15Z INFO gbt::orchestrator] Starting Gravity Validator companion binary Relayer + Oracle + Eth Signer
# Dec 03 18:21:15 gb gbt[97954]: [2021-12-03T18:21:15Z INFO gbt::orchestrator] Ethereum Address: **0x9297719743Aaf5c07A9Bed3102f16456559De** Cosmos Address **gravity120lcc678gkx7eczpmgae9m6xu7wg8vmm6t4**
# Dec 03 18:21:15 gb gbt[97954]: [2021-12-03T18:21:15Z INFO gravity_utils::connection_prep] Cosmos node is waiting for the chain to start, Standing by
# Dec 03 18:21:25 gb gbt[97954]: [2021-12-03T18:21:25Z INFO gravity_utils::connection_prep] Cosmos node is waiting for the chain to start, Standing by
**# Это установка локальной лайт-ноды Эфира тестнета Гоерли
# Если используете Инфуру, это не нужно, просто добавьте рпц Инфуры в сервисник оркестратора выше**
#
**# infura example
#** ExecStart=/usr/bin/gbt orchestrator --fees 0ugraviton --ethereum-rpc "<https://goerli.infura.io/v3/fd0fe106cXXXXXXXXXXXXX>"
#
**# в orchestrator.service**
# 9. Setting up an Ethereum node
# download light client
cd $HOME
wget <https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.13-7a0c19f8.tar.gz>
tar -xvf geth-linux-amd64-1.10.13-7a0c19f8.tar.gz
rm -v geth-linux-amd64-1.10.13-7a0c19f8.tar.gz
mv geth-linux-amd64-1.10.13-7a0c19f8 geth
chmod +x $HOME/geth/geth
sudo mv $HOME/geth/geth /usr/bin/
wget -O $HOME/geth/geth-light-config.toml "<https://raw.githubusercontent.com/Gravity-Bridge/Gravity-Docs/main/configs/geth-light-config.toml>"
# service
sudo tee <<EOF >/dev/null /etc/systemd/system/gethd.service
[Unit]
Description=goerli
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/bin/geth --syncmode "light" --goerli --http --config $HOME/geth/geth-light-config.toml
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable gethd
sudo systemctl restart gethd && journalctl -u gethd -f
# END