Git Product home page Git Product logo

lambda_mainnet_setup_guide's Introduction

lambda_mainnet_setup_guide

Lambda_mainnet_setup_guide

Lambda node setup for mainnet

Official documentation:

Explorer:

Staking:

🛡️Bridge:

Hardware Requirements

Like any Cosmos-SDK chain, the hardware requirements are pretty modest.

Minimum Hardware Requirements

  • 4 or more physical CPU cores
  • At least 500GB of SSD disk storage
  • At least 32GB of memory (RAM)
  • At least 100mbps network bandwidth

Set up your Lambda fullnode

Manual Installation

sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget tmux htop net-tools clang pkg-config libssl-dev jq build-essential git make ncdu -y
version="1.19.2" \
&& cd $HOME \
&& wget "https://golang.org/dl/go$version.linux-amd64.tar.gz" \
&& sudo rm -rf /usr/local/go \
&& sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz" \
&& rm "go$version.linux-amd64.tar.gz" \
&& echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile \
&& source $HOME/.bash_profile
git clone https://github.com/LambdaIM/lambdavm.git
cd lambdavm
make install
lambdavm init Coinstamp --chain-id lambda_92000-1
lambdavm config chain-id lambda_92000-1

CREATE WALLET

lambdavm keys add wallet 

OR RECOVER

lambdavm keys add wallet --recover
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.01ulamb\"/;" $HOME/.lambdavm/config/app.toml
pruning="custom" && \
pruning_keep_recent=100 && \
pruning_keep_every=0 && \
pruning_interval=10 && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.lambdavm/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.lambdavm/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.lambdavm/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.lambdavm/config/app.toml
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"[email protected]:26656\"/; s/^seeds *=.*/seeds = \"[email protected]:26656\"/" $HOME/.lambdavm/config/config.toml

indexer="null" && sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.lambdavm/config/config.toml

(OPTION)

wget https://raw.githubusercontent.com/LambdaIM/mainnet/main/lambda_92000-1/genesis.json
mv genesis.json ~/.lambdavm/config/

sudo tee /etc/systemd/system/lambdavm.service > /dev/null <<EOF
[Unit]
Description=lambdavm
After=network-online.target
[Service]
User=$USER
ExecStart=$(which lambdavm) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && sudo systemctl enable lambdavm && sudo systemctl restart lambdavm && sudo journalctl -u lambdavm -f -o cat

Post installation

When installation is finished please load variables into system

source $HOME/.bash_profile

Next you have to make sure your validator is syncing blocks. You can use command below to check synchronization status

lambdavm status 2>&1 | jq .SyncInfo

(OPTIONAL) State Sync

You can state sync your node in minutes by running commands below. Special thanks to NodeStake

https://nodestake.top/lambda

peers="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12123,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:04656,[email protected]:26989"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.lambdavm/config/config.toml
more ~/.lambdavm/config/config.toml | grep 'seeds'

more ~/.lambdavm/config/config.toml | grep 'persistent_peers'
SNAP_RPC="https://rpc.lambda.nodestake.top: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 lambdavm

lambdavm tendermint unsafe-reset-all --home ~/.lambdavm/
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\"\"|" ~/.lambdavm/config/config.toml

more ~/.lambdavm/config/config.toml | grep 'rpc_servers'

more ~/.lambdavm/config/config.toml | grep 'trust_height'

more ~/.lambdavm/config/config.toml | grep 'trust_hash'
sudo systemctl restart lambdavm

journalctl -u lambdavm -f -o cat

Create wallet

To create new wallet you can use command below. Don’t forget to save the mnemonic

lambdavm keys add wallet

(OPTIONAL) To recover your wallet using seed phrase

lambdavm keys add wallet --recover

To get current list of wallets

lambdavm keys list

Save wallet info

Add wallet and valoper address into variables

LAMBDA_WALLET_ADDRESS=$(lambdavm keys show wallet -a)
LAMBDA_VALOPER_ADDRESS=$(lambdavm keys show wallet --bech val -a)

Load variables into the system

echo 'export LAMBDA_WALLET_ADDRESS='${LAMBDA_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export LAMBDA_VALOPER_ADDRESS='${LAMBDA_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

Create validator

Before creating validator please make sure that you have at least 1 lamb (1 lamb is equal to 10000000000000000000 ulamb) and your node is synchronized

To check your wallet balance:

lambdavm query bank balances $LAMBDA_WALLET_ADDRESS

If your wallet does not show any balance than probably your node is still syncing. Please wait until it finish to synchronize and then continue

To create your validator run command below

lambdavm tx staking create-validator \
  --amount 100000ulamb \
  --from wallet \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.07" \
  --min-self-delegation "1" \
  --pubkey  $(lambdavm tendermint show-validator) \
  --moniker "MONIKERNAME" \
  --chain-id lambda_92000-1 \
  --fees=2500ulamb \
  --gas=250000 

Useful commands

Service management

Check logs

journalctl -fu lambdavm -o cat

Start service

sudo systemctl start lambdavm

Stop service

sudo systemctl stop lambdavm

Restart service

sudo systemctl restart lambdavm

Node info

Synchronization info

lambdavm status 2>&1 | jq .SyncInfo

Validator info

lambdavm status 2>&1 | jq .ValidatorInfo

Node info

lambdavm status 2>&1 | jq .NodeInfo

Show node id

lambdavm tendermint show-node-id

Wallet operations

List of wallets

lambdavm keys list

Recover wallet

lambdavm keys add wallet --recover

Delete wallet

lambdavm keys delete wallet

Get wallet balance

lambdavm query bank balances $LAMBDA_WALLET_ADDRESS

Transfer funds

lambdavm tx bank send $LAMBDA_WALLET_ADDRESS <TO_LAMBDA_WALLET_ADDRESS> 10000000ulamb

Voting

lambdavm tx gov vote 1 yes --from $WALLET --chain-id=lambda_92000-1

Staking, Delegation and Rewards

Delegate stake

lambdavm tx staking delegate $LAMBDA_VALOPER_ADDRESS 10000000ulamb --from=wallet --chain-id=lambda_92000-1 --gas=auto

Redelegate stake from validator to another validator

lambdavm tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 10000000ulamb --from=wallet --chain-id=lambda_92000-1 --gas=auto

Withdraw all rewards

lambdavm tx distribution withdraw-all-rewards --from=wallet --chain-id=lambda_92000-1 --gas=auto

Withdraw rewards with commision

lambdavm tx distribution withdraw-rewards $LAMBDA_VALOPER_ADDRESS --from=wallet --commission --chain-id=lambda_92000-1D

Validator management

Edit validator

lambdavm tx staking edit-validator \
  --moniker=$NODENAME \
  --identity=<your_keybase_id> \
  --website="<your_website>" \
  --details="<your_validator_description>" \
  --chain-id=lambda_92000-1 \
  --from=$WALLET

Unjail validator

lambdavm tx slashing unjail \
  --broadcast-mode=block \
  --from=wallet \
  --chain-id=lambda_92000-1 \
  --gas=auto

lambda_mainnet_setup_guide's People

Contributors

kivancbeser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.