✔️Aligned layer

Install go

cd $HOME 
VER="1.21.3" 
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go 
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz" 
rm "go$VER.linux-amd64.tar.gz" 
[ ! -f ~/.bash_profile ] && touch /.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile [ ! -d ~/go/bin ] && mkdir -p ~/go/bin

set vars

echo "export WALLET="wallet"" >> $HOME/.bash_profile 
echo "export MONIKER="test"" >> $HOME/.bash_profile 
echo "export ALIGNEDLAYER_CHAIN_ID="alignedlayer"" >> $HOME/.bash_profile
echo "export ALIGNEDLAYER_PORT="50"" >> $HOME/.bash_profile 
source $HOME/.bash_profile

download binary

bash_

cd $HOME #install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env #install Ignite CLI curl https://get.ignite.com/cli | bash sudo mv ignite /usr/local/bin/ #install bin rm -rf $HOME/aligned_layer_tendermint git clone https://github.com/yetanotherco/aligned_layer_tendermint.git cd $HOME/aligned_layer_tendermint git checkout 98643167990f8a597b331ddd879e079bafb25b08 make build-linux

config and init app

alignedlayerd init $MONIKER --chain-id alignedlayer sed -i -e "s|^node =.|node = "tcp://localhost:${ALIGNEDLAYER_PORT}657"|" $HOME/.alignedlayer/config/client.toml

download genesis and addrbook

wget -O $HOME/.alignedlayer/config/genesis.json https://testnet-files.itrocket.net/alignedlayer/genesis.json wget -O $HOME/.alignedlayer/config/addrbook.json https://testnet-files.itrocket.net/alignedlayer/addrbook.json

set seeds and peers

SEEDS="d1a8816c1c5800b352c2a1eb0e7a156bce34ae9f@alignedlayer-testnet-seed.itrocket.net:50656" PEERS="144c2d4fbbaf54dda837bfbc88b688fb2f02c92f@alignedlayer-testnet-peer.itrocket.net:50656" sed -i -e "s/^seeds =./seeds = "$SEEDS"/; s/^persistent_peers =./persistent_peers = "$PEERS"/" $HOME/.alignedlayer/config/config.toml

set custom ports in app.toml

sed -i.bak -e "s%:1317%:${ALIGNEDLAYER_PORT}317%g; s%:8080%:${ALIGNEDLAYER_PORT}080%g; s%:9090%:${ALIGNEDLAYER_PORT}090%g; s%:9091%:${ALIGNEDLAYER_PORT}091%g; s%:8545%:${ALIGNEDLAYER_PORT}545%g; s%:8546%:${ALIGNEDLAYER_PORT}546%g; s%:6065%:${ALIGNEDLAYER_PORT}065%g" $HOME/.alignedlayer/config/app.toml

set custom ports in config.toml file

sed -i.bak -e "s%:26658%:${ALIGNEDLAYER_PORT}658%g; s%:26657%:${ALIGNEDLAYER_PORT}657%g; s%:6060%:${ALIGNEDLAYER_PORT}060%g; s%:26656%:${ALIGNEDLAYER_PORT}656%g; s%^external_address = ""%external_address = "$(wget -qO- eth0.me):${ALIGNEDLAYER_PORT}656"%; s%:26660%:${ALIGNEDLAYER_PORT}660%g" $HOME/.alignedlayer/config/config.toml

config pruning

sed -i -e "s/^pruning =./pruning = "custom"/" $HOME/.alignedlayer/config/app.toml sed -i -e "s/^pruning-keep-recent =./pruning-keep-recent = "100"/" $HOME/.alignedlayer/config/app.toml sed -i -e "s/^pruning-interval =./pruning-interval = "50"/" $HOME/.alignedlayer/config/app.toml

set minimum gas price, enable prometheus and disable indexing

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.0001stake"|g' $HOME/.alignedlayer/config/app.toml sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.alignedlayer/config/config.toml sed -i -e "s/^indexer =./indexer = "null"/" $HOME/.alignedlayer/config/config.toml

create service file

sudo tee /etc/systemd/system/alignedlayerd.service > /dev/null <<EOF [Unit] Description=Alignedlayer node After=network-online.target [Service] User=$USER WorkingDirectory=$HOME/.alignedlayer ExecStart=$(which alignedlayerd) start --home $HOME/.alignedlayer Restart=on-failure RestartSec=5 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF

reset and download snapshot

alignedlayerd tendermint unsafe-reset-all --home $HOME/.alignedlayer if curl -s --head curl https://testnet-files.itrocket.net/alignedlayer/snap_alignedlayer.tar.lz4 | head -n 1 | grep "200" > /dev/null; then curl https://testnet-files.itrocket.net/alignedlayer/snap_alignedlayer.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.alignedlayer else echo no have snap fi

enable and start service

sudo systemctl daemon-reload sudo systemctl enable alignedlayerd sudo systemctl restart alignedlayerd && sudo journalctl -u alignedlayerd -f

Last updated