Skip to content

Latest commit

 

History

History
140 lines (135 loc) · 4.82 KB

README.md

File metadata and controls

140 lines (135 loc) · 4.82 KB

LikeCoin [likecoin-mainnet-2]

LikeCoin Guide

Validator AlxVoy

Links

Links mainnet

RPC

API

Peers and seeds

Genesis and addrbook

Explorer

Auto installation script

wget https://anode.team/LikeCoin/main/setup_likecoin.sh && chmod u+x setup_likecoin.sh && ./setup_likecoin.sh

Installation Steps

Prerequisite: go1.18+ required. ref

Prerequisite: git. ref

  • Fetch and install the current version.
wget https://github.com/likecoin/likecoin-chain/releases/download/v3.1.1/likecoin-chain_3.1.1_Linux_x86_64.tar.gz
tar -xvf likecoin-chain_3.1.1_Linux_x86_64.tar.gz
chmod +x bin/liked
mv bin/liked /usr/local/bin/
rm CHANGELOG.md LICENSE README.md likecoin-chain_3.1.1_Linux_x86_64.tar.gz
  • Init
liked init <moniker> --chain-id likecoin-mainnet-2

Generate keys

liked keys add <wallet_name>

Genesis, addrbook

curl https://raw.githubusercontent.com/likecoin/mainnet/master/genesis.json > ~/.liked/config/genesis.json
curl https://anode.team/LikeCoin/main/addrbook.json > ~/.liked/config/addrbook.json

Peers, seed

seeds="[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.liked/config/config.toml
  • Minimum gas prices
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"1.0nanolike\"/;" ~/.liked/config/app.toml

Create the service file

sudo tee /etc/systemd/system/liked.service > /dev/null <<EOF
[Unit]
Description=LikeCoin
After=network-online.target

[Service]
User=$USER
ExecStart=$(which liked) start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
  • Load service and start
sudo systemctl daemon-reload && sudo systemctl enable liked
sudo systemctl restart liked && journalctl -fu liked -o cat

Create Validator

liked tx staking create-validator \
  --amount=1000000000000nanolike \
  --pubkey=$(liked tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --chain-id="likecoin-mainnet-2" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --node "tcp://127.0.0.1:26657" \
  --fees="200000nanolike" \
  --from=<wallet_name>

State-Sync

  • start with State-Sync
SNAP_RPC=https://likecoin.rpc.m.anode.team: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
sudo systemctl stop liked && liked tendermint unsafe-reset-all --home $HOME/.liked
peers="[email protected]:29696"
sed -i.bak -e  "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.liked/config/config.toml
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/.liked/config/config.toml
sudo systemctl restart liked && journalctl -fu liked -o cat