Skip to main content

Installation

![lambda]

Chain ID: lambda_92000-1 | Latest Version Tag: v1.0.1 |

Install dependencies

Update system and install build tools

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Download and build binaries

# Clone project repository
cd $HOME
rm -rf lambdavm
git clone https://github.com/LambdaIM/lambdavm.git
cd lambdavm
git checkout v1.0.1

# Build binaries
make build

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.lambdavm/cosmovisor/genesis/bin
mv build/lambdavm $HOME/.lambdavm/cosmovisor/genesis/bin/
rm -rf build

# Create application symlinks
sudo ln -s $HOME/.lambdavm/cosmovisor/genesis $HOME/.lambdavm/cosmovisor/current -f
sudo ln -s $HOME/.lambdavm/cosmovisor/current/bin/lambdavm /usr/local/bin/lambdavm -f

Install Cosmovisor and create a service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

# Create service
sudo tee /etc/systemd/system/lambdavm.service > /dev/null << EOF
[Unit]
Description=composable node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.lambdavm"
Environment="DAEMON_NAME=lambdavm"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.lambdavm/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable lambdavm

Initialize the node

# Set node configuration
lambdavm config chain-id lambda_92000-1
lambdavm config keyring-backend file

# Initialize the node
lambdavm init <moniker> --chain-id lambda_92000-1
lambdavm keys add <wallet_name>

# Download genesis and addrbook
curl -Ls http://lambda.nomadvalidator.com/genesis.json > ~/.lambdavm/config/genesis.json
curl -Ls http://lambda.nomadvalidator.com/addrbook.json > ~/.lambdavm/config/addrbook.json

# Add seeds
SEEDS="[email protected]:26656,234b319119af66069cc44323a622dd40748f72e1@rpc.lambda.nomadvalidator.com:26656"
PEERS="[email protected]:26656,[email protected]:56656,[email protected]:26556,[email protected]:36656,[email protected]:38656,[email protected]:26767,[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.lambdavm/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0001ulamb\"|" $HOME/.lambdavm/config/app.toml

# Set pruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.lambdavm/config/app.toml


### Download latest chain snapshot

```bash
SOON

Start service and check the logs

sudo systemctl start lambdavm && sudo journalctl -u lambdavm -f --no-hostname -o cat