"REGEN" Redwood testnet -  State Sync /RPC / Data snap services 

RPC  http://161.97.82.203:16657  |  API http://161.97.82.203:1311
 

STEP BY STEP INSTRUCTIONS

 Install GO & Dependencies  HERE

# Install binaries and prepare for node launch
# it wont be redundant to doublecheck correct version at Discord https://discord.gg/regen-network

git clone https://github.com/regen-network/regen-ledger
cd regen-ledger
ver=$(curl -s http://redwood.regen.network:26657/abci_info? | jq -r ."result"."response"."version")
git checkout tags/${ver}
make install

regen init <moniker> --chain-id regen-redwood-1
wget -qO $HOME/.regen/config/genesis.json https://github.com/regen-network/testnets/raw/master/regen-redwood-1/genesis.json

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

sudo systemctl enable regen-redwood
sudo systemctl daemon-reload
 


STATE SYNC SERVICE
 

Please make sure You have latest, officially launched version of Regen binaries.



sudo systemctl stop regen-redwood
regen tendermint  unsafe-reset-all --home $HOME/.regen

SNAP_RPC="http://161.97.82.203:16657 "; \
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/.regen/config/config.toml

 wget -qO $HOME/.regen/config/addrbook.json  http://94.250.203.6:90/redwood-addrbook.json

sudo systemctl restart regen-redwood && sudo journalctl -u regen-redwood -f -o cat

Use command below to switch off your State Sync mode, after node fully synced to avoid problems in future node restarts!

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.regen/config/config.toml

A fully synced node supposed to be ready in 10-15 min. depending on computer/bandwidth power.
Enjoy. 

 

SHRUNK DATA SNAPSHOT


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

snap=$(curl -s http://94.250.203.6:90 | egrep -o ">redwood-snap*.*tar" | tr -d ">")
sudo systemctl stop regen-redwood
mv $HOME/.regen/data/priv_validator_state.json $HOME
rm -rf  $HOME/.regen/data
wget -P $HOME http://94.250.203.6:90/${snap}
tar xf $HOME/${snap} -C $HOME/.regen
rm $HOME/${snap}
mv $HOME/priv_validator_state.json $HOME/.regen/data/
wget -qO $HOME/.regen/config/addrbook.json http://94.250.203.6:90/redwood-addrbook.json
sudo systemctl restart regen-redwood
sudo journalctl -u regen-redwood -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 and accept the service to view the translations.