RPC : https://mars-test-rpc.theamsolutions.info | API : https://mars-test-api.theamsolutions.info
SEED : e26ac62d4b4339bd8863c59027583c1f9a085675@mars-test-seed.theamsolutions.info:22656
Official docs HERE
STEP BY STEP INSTRUCTION
Install GO and dependencies HERE
git clone https://github.com/mars-protocol/hub
cd hub
ver=$(curl -s https://mars-test-rpc.theamsolutions.info/abci_info | jq -r ."result"."response"."version")
git checkout v${ver}
make install
marsd version
marsd init <node-name> --chain-id ares-1
wget -qO $HOME/.mars/config/genesis.json https://raw.githubusercontent.com/mars-protocol/networks/main/ares-1/genesis.json
sha256sum ~/.mars/config/genesis.json
#right output : a600fc081fabdc6dccf0f11591b0c88b62dee11a21dfa23834ab825351bf8e2f
wget -qO $HOME/.mars/config/addrbook.json http://94.250.203.6:90/mars-addrbook.json
sudo tee /etc/systemd/system/marsd.service << EOF
[Unit]
Description=Mars-Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which marsd) start
Restart=always
RestartSec=10
LimitNOFILE=infinity
LimitNPROC=infinity
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable marsd
sudo systemctl daemon-reload
sudo systemctl restart marsd
sudo journalctl -u marsd -f -o cat
DATA SNAPSHOT
#check snapshot height : curl -s http://94.250.203.6:90 | egrep -o ">mars-snap*.*tar" | tr -d ">"
snap=$(curl -s http://94.250.203.6:90 | egrep -o ">mars-snap*.*tar" | tr -d ">")
mv $HOME/.mars/data/priv_validator_state.json $HOME
rm -rf $HOME/.mars/data
wget -P $HOME http://94.250.203.6:90/${snap}
tar xf $HOME/${snap} -C $HOME/.mars
rm $HOME/${snap}
mv $HOME/priv_validator_state.json $HOME/.mars/data
wget -qO $HOME/.mars/config/addrbook.json http://94.250.203.6:90/mars-addrbook.json
sudo systemctl restart marsd
sudo journalctl -u marsd -f -o cat
STATE SYNC
marsd tendermint unsafe-reset-all --home $HOME/.mars
SNAP_RPC="https://mars-test-rpc.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/.mars/config/config.toml
wget -qO $HOME/.mars/config/addrbook.json http://94.250.203.6:90/mars-addrbook.json
sudo systemctl enable marsd.service
sudo systemctl daemon-reload
sudo systemctl restart marsd.service
sudo journalctl -u marsd.service -f -o cat
GOOD LUCK!
AM Solutions © Copyright. All rights reserved.