"Rebus" node setup guide | State Sync | Data snap

Explorer https://explorer.theamsolutions.info/rebus-main

RPC  https://rebus-rpc2.theamsolutions.info  | API https://rebus-api.theamsolutions.info

   Official docs HERE

 
STEP BY STEP INSTRUCTIONS
 
 

Install GO & Dependencies  HERE

Install binaries & Run node

git clone https://github.com/rebuschain/rebus.core.git
cd rebus.core
git checkout v0.2.3
make install
rebusd version --long | head
#output :  commit: ee105dac0b3f481600ba30fb75f6628f9309e91e

rebusd init <your-moniker> --chain-id reb_1111-1

rm $HOME/.rebusd/config/genesis.json

wget -qO $HOME/genezis.zip https://raw.githubusercontent.com/rebuschain/rebus.mainnet/master/reb_1111-1/genesis.zip \
&& unzip $HOME/genezis.zip -d $HOME/.rebusd/config/
 

#check genesis hash
sha256sum $HOME/.rebusd/config/genesis.json
#should be:  10cc853d7ccc8ebc67155ee4ffc1bb32caac3f05873df79e866524898b3f20eb


sudo tee /etc/systemd/system/rebusd.service << EOF
[Unit]
Description=Rebusd
After=network-online.target
#
[Service]
User=$USER
ExecStart=$(which rebusd) start
RestartSec=10
Restart=on-failure
LimitNOFILE=65535
#
[Install]
WantedBy=multi-user.target
EOF

wget -q -O $HOME/.rebusd/config/addrbook.json https://github.com/AlexToTheMoon/AM-Solutions/raw/main/addrbook-rebus.json

sudo systemctl enable rebusd && sudo systemctl daemon-reload \
&& sudo systemctl restart rebusd
#LOGS 
journalctl -u rebusd -f -o cat 

STATE SYNC 

sudo systemctl stop rebusd; \
rebusd tendermint unsafe-reset-all --home $HOME/.rebusd --keep-addr-book

#If U don`t have address book
wget -qO $HOME/.rebusd/config/addrbook.json http://94.250.203.6:90/rebus-addrbook.json

SNAP_RPC="https://rebus-rpc2.theamsolutions.info:443"; \
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\"|" $HOME/.rebusd/config/config.toml

sudo systemctl restart rebusd
journalctl -u rebusd -f -o cat

#switch off state sync after sync
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.rebusd/config/config.toml

DATA SNAP
 

#check snapshot height  : curl -s http://94.250.203.6:90 | egrep -o ">rebus-snap*.*tar" | tr -d ">"

snap=$(curl -s http://94.250.203.6:90 | egrep -o ">rebus-snap*.*tar" | tr -d ">")
sudo systemctl stop rebusd
mv $HOME/.rebusd/data/priv_validator_state.json $HOME
rm -rf  $HOME/.rebusd/data
wget -P $HOME http://94.250.203.6:90/${snap}
tar xf $HOME/${snap} -C $HOME/.rebusd
rm $HOME/${snap}
mv $HOME/priv_validator_state.json $HOME/.rebusd/data
wget -q -O $HOME/.rebusd/config/addrbook.json http://94.250.203.6:90/rebus-addrbook.json
sudo systemctl restart rebusd
journalctl -u rebusd -f -o cat

 

GOOD LUCK!

 

 

AM Solutions © Copyright. All rights reserved.

We need your consent to load the translations

We use a third-party service to translate the website content that may collect data about your activity. Please review the details in the privacy policy and accept the service to view the translations.