install_node
Rebus mainnet validator node
Official documentation:
Explorer:
https://explorer.nodestake.top/rebus
Install guide
Update packages
sudo apt update && sudo apt upgrade -yInstall dependencies
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git ncdu gcc jq chrony liblz4-tool -yInstall go
ver="1.18.2"
cd $HOME && \
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 GOROOT=/usr/local/go" >> ~/.bash_profile && \
echo "export GOPATH=$HOME/go" >> ~/.bash_profile && \
echo "export GO111MODULE=on" >> ~/.bash_profile && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go versionDownload and build binaries
cd $HOME
git clone https://github.com/rebuschain/rebus.core.git
cd rebus.core && git checkout master
make installInit app
rebusd init <moniker> --chain-id reb_1111-1Download genesis
wget https://raw.githubusercontent.com/rebuschain/rebus.mainnet/master/reb_1111-1/genesis.zip
unzip -o genesis.zip -d $HOME/.rebusd/config/
rm genesis.zipConfig app
Setup chain and keyring-backend to config
rebusd config chain-id reb_1111-1Setup seeds and peers
seeds="e056318da91e77585f496333040e00e12f6941d1@51.83.97.166:26656"
sed -i "s/^seeds *=.*/seeds = \"$seeds\"/;" $HOME/.rebusd/config/config.toml
peers=""
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/;" $HOME/.rebusd/config/config.tomlConfig pruning
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.rebusd/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.rebusd/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.rebusd/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.rebusd/config/app.tomlSet min gas price
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0arebus\"/" $HOME/.rebusd/config/app.tomlEnable/Disable snapshot (optional)
snapshot_interval="1000" && \
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.rebusd/config/app.tomlEnable state sync (optional)
SNAP_RPC=
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
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/.rebusd/config/config.tomlEnable prometheus (optional)
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.rebusd/config/config.tomlSet commit timeout
timeout_commit="2s" && \
sed -i.bak -e "s/^timeout_commit *=.*/timeout_commit = \"$timeout_commit\"/" $HOME/.rebusd/config/config.tomlReset chain data
rebusd tendermint unsafe-reset-all --home $HOME/.rebusdCreate service
sudo tee /etc/systemd/system/rebusd.service > /dev/null <<EOF
[Unit]
Description=rebus
After=network-online.target
[Service]
User=$USER
ExecStart=$(which rebusd) start --home $HOME/.rebusd
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOFRegister and start service
sudo systemctl restart systemd-journald && \
sudo systemctl daemon-reload && \
sudo systemctl enable rebusd && \
sudo systemctl restart rebusd && sudo journalctl -u rebusd -f -o catCheck synchronization status ("catching_up": false is synced)
rebusd status 2>&1 | jq .SyncInfoCreate wallet (!Safe your mnemonic)
rebusd keys add <wallet_name> --coin-type 118 --algo secp256k1To recover your wallet using seed phrase (optional)
rebusd keys add <wallet_name> --coin-type 118 --algo secp256k1 --recoverCheck balance
rebusd query bank balances <wallet_address>Create validator
rebusd tx staking create-validator \
--moniker="<moniker>" \
--amount=1000000000000000000arebus \
--pubkey=$(rebusd tendermint show-validator) \
--chain-id=reb_1111-1 \
--commission-max-change-rate=0.01 \
--commission-max-rate=0.20 \
--commission-rate=0.10 \
--min-self-delegation=1 \
--from=<wallet_name>Show address validator
rebusd keys show <wallet_name> --bech val -aCheck validator status
rebusd query staking validator <valoper_address>Usefull command
Synchronization info
rebusd status 2>&1 | jq .SyncInfoNode info
rebusd status 2>&1 | jq .NodeInfoShow node id
rebusd tendermint show-node-idGet wallet balance
rebusd query bank balances <wallet_name>Transfer funds
rebusd tx bank send <wallet_address> <to_wallet_address> 10000000arebusVoting
rebusd tx gov vote 1 yes --from <wallet_name> --chain-id=reb_1111-1Delegate stake
rebusd tx staking delegate <valoper_address> 10000000arebus --from=<wallet_name> --chain-id=reb_1111-1Withdraw all rewards
rebusd tx distribution withdraw-all-rewards --from=<wallet_name> --chain-id=reb_1111-1Withdraw rewards with commision
rebusd tx distribution withdraw-rewards <valoper_address> --from=<wallet_name> --commission --chain-id=reb_1111-1Edit validator
rebusd tx staking edit-validator \
--moniker=<moniker> \
--identity=<identity> \
--website=<web> \
--details=<any details> \
--chain-id=reb_1111-1 \
--from=<wallet_name>Unjail validator
rebusd tx slashing unjail \
--from=<wallet_name> \
--chain-id=reb_1111-1Delete node
sudo systemctl stop rebusd
sudo systemctl disable rebusd
sudo rm /etc/systemd/system/rebusd* -rf
sudo rm $(which rebusd) -rf
sudo rm $HOME/.rebusd* -rf
sudo rm $HOME/rebus.core -rfLast updated