C4E network "perun-1"  Services 

ARCHIVE RPC : https://rpc-c4e.theamsolutions.info:443
ARCHIVE API : https://api-c4e.theamsolutions.info:443
gRPC : grpc-c4e.theamsolutions.info:9391
SEED : 89427b98e35b23dacafa8df90df6ae173245439b@seed-c4e.theamsolutions.info:16656

EXPLORER : https://explorer.theamsolutions.info
 

 

Validator Health, TG Alarm guide HERE

TMKMS Remote signing guide, link HERE

NODE SETUP
 

 Install GO & Dependencies  HERE

cd $HOME
ver=$(curl -s https://rpc-c4e.theamsolutions.info/abci_info | jq -r ."result"."response"."version")
git clone --depth 1 --branch  v${ver}  https://github.com/chain4energy/c4e-chain.git
cd c4e-chain
make install
c4ed version


c4ed init <name> --chain-id perun-1

wget -qO $HOME/.c4e-chain/config/genesis.json https://github.com/chain4energy/c4e-chains/raw/main/perun-1/genesis.json

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

sudo systemctl enable c4ed.service
sudo systemctl daemon-reload
 


STATE SYNC SERVICE
 

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


sudo systemctl stop c4ed.service
c4ed tendermint unsafe-reset-all --home $HOME/.c4e-chain

SNAP_RPC="https://rpc-c4e.theamsolutions.info:443"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height) \
&& BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)) \
&& 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/.c4e-chain/config/config.toml; \
wget -qO $HOME/.c4e-chain/config/addrbook.json  https://snapshots.theamsolutions.info/c4e-addrbook.json

sudo systemctl restart c4ed.service
sudo journalctl -u c4ed.service -f -o cat
 

 

 DATA SNAPSHOT 
(updated every 6 hrs.)


#check snapshot info  : curl -s https://snapshots.theamsolutions.info | egrep -o ">c4e-snap*.*tar" | tr -d ">"

snap=$(curl -s https://snapshots.theamsolutions.info | egrep -o ">c4e-snap*.*tar" | tr -d ">")
wget -P $HOME https://snapshots.theamsolutions.info/${snap}
wget -qO $HOME/.c4e-chain/config/addrbook.json  https://snapshots.theamsolutions.info/c4e-addrbook.json
sudo systemctl stop c4ed
mv ~/.c4e-chain/data/priv_validator_state.json ~/
rm -rf  $HOME/.c4e-chain/data
tar xf $HOME/${snap} -C $HOME/.c4e-chain
rm $HOME/${snap}
mv ~/priv_validator_state.json ~/.c4e-chain/data/
sudo systemctl restart c4ed
sudo journalctl -u c4ed -f -o cat

 

CREATE VALIDATOR

c4ed tx staking create-validator \
   --amount="1000000uc4e" \
   --pubkey=$(c4ed tendermint show-validator --home "$HOME/.c4e-chain/") \
   --moniker="<Validaor-Name>" \
   --chain-id=perun-1 \
   --commission-rate="0.10" \
   --commission-max-rate="0.20" \
   --commission-max-change-rate="0.01" \
   --min-self-delegation="1" \
   --gas="auto" \
   --home="$HOME/.c4e-chain/" \
   --from=<key-name>


USEFUL COMMANDS


#check node status
curl localhost:26657/status
#or
c4ed status | jq

#add wallet
c4ed keys add <wallet-name>

#check all available wallets
c4ed keys list

#balance of your wallet
c4ed query bank balances <wallet-key>

#find valoper address
c4ed  keys show <wallet-key> --bech val -a

#check validator staking state
c4ed query staking validator <c4evaloper1...-address> --chain-id <CHAIN-ID>

#command for delegating
c4ed tx staking delegate <c4evaloper1..-address> 1000000uc4e --chain-id <CHAIN-ID> --from <wallet-name> --gas=auto

#withdraw all-rewards with commission
c4ed  tx distribution withdraw-rewards <c4evaloper1..-address> --from <wallet-name>  --chain-id <CHAIN-ID> --commission --yes --gas=auto

#unjail command
c4ed  tx slashing unjail --from <validator_wallet_name> --chain-id <CHAIN-ID> --gas=auto

#vote | options : yes/no/no_with_veto/abstain
c4ed  tx gov vote 1 yes --from <wallet_name> --chain-id <CHAIN-ID> --gas=auto
 

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.