Skip to content

Latest commit

 

History

History
135 lines (130 loc) · 5 KB

README.md

File metadata and controls

135 lines (130 loc) · 5 KB

Lum [lum-network-1]

Lum Guide

Validator AlxVoy

Links

RPC

API

Peers and seeds

Genesis and addrbook

Explorer

Installation Steps

Prerequisite: go1.18+ required. ref

Prerequisite: git. ref

  • Fetch and install the current version.
git clone https://github.com/lum-network/chain.git lum
cd lum
git checkout v1.3.0
make install
  • Init
lumd init <moniker> --chain-id lum-network-1

Generate keys

lumd keys add <wallet_name>

Genesis, addrbook

curl https://raw.githubusercontent.com/lum-network/mainnet/master/genesis.json > ~/.lumd/config/genesis.json
curl https://anode.team/Lum/main/addrbook.json > ~/.lumd/config/addrbook.json

Peers, seed

seeds="19ad16527c98b782ee35df56b65a3a251bd99971@peer-1.mainnet.lum.network:26656"
peers="b47626b9d78ed7ed3c413304387026f907c70cbe@peer-0.mainnet.lum.network:26656,19ad16527c98b782ee35df56b65a3a251bd99971@peer-1.mainnet.lum.network:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:46656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.lumd/config/config.toml

Create the service file

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

[Service]
Type=simple
User=root
WorkingDirectory=/root/
ExecStart=$(which lumd) start --p2p.laddr tcp://0.0.0.0:26656 --home /$HOME/.lumd
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

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

Create Validator

lumd tx staking create-validator \
  --amount=2500000000ulum \
  --pubkey=$(lumd tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --commission-rate="0.03" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --node "tcp://127.0.0.1:26617" \
  --min-self-delegation="1" \
  --chain-id=lum-network-1 \
  --fees=200000ulum \
  --from=<wallet_name>

State-Sync

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