π Node installation
Update packages
sudo apt update && sudo apt upgrade -yInstall dependencies
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop screen unzip bc lz4 gcc -yInstall Go
cd $HOME && \
ver="1.21.13" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go versionThe output should be: go version go1.21.13 linux/amd64
Download binary for work
git clone https://github.com/atomone-hub/atomone
cd atomone
git checkout v4.1.0
make installSpecify variables, for ease of work
echo 'export atomone_moniker="Validator_name"' >> $HOME/.profile
echo 'export atomone_wallet="Wallet_name"' >> $HOME/.profile
echo 'export atomone_port="111"' >> $HOME/.profile
source $HOME/.profileInitialize the node
atomoned init $atomone_moniker --chain-id atomone-1Set the settings
atomoned config chain-id atomone-1 && \
peers=5c1b408eb2bd0e4e285daba059a71c3423a16ae9@188.245.125.107:26656,e6ccf37182345ad048cf60335ab3dc1a5512baff@13.59.146.253:26656,4f0855bd3cac712f2292dc39e1b8a3b5ffb68584@149.50.102.86:36656,da165aaeac3adbc9845879e06f336c2668c5d915@65.21.214.84:9756,8e0cfafb7d8f2a9b177b6764e972ee27220a9255@65.21.136.219:23456,6219193bd3b127e980686b745b97bdcd2ff429ef@95.217.107.137:11656,dc92e7b8ed2aafc34c400405916569aad0d990f3@169.155.44.68:26656 && \
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.atomone/config/config.toml && \
seeds="6b0ffcce9b59b91ceb8eea5d4599e27707e3604a@seeds.stakeup.tech:10226" && \
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.atomone/config/config.toml
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001uatone"|g' $HOME/.atomone/config/app.tomlCreate wallet
atomoned keys add $atomone_walletSave the wallet. Or restore if there is a mnemonic:
atomoned keys add $atomone_wallet --recoverDownload Genesis
wget -O genesis.json "https://snapshots.stakeup.tech/atomone/genesis.json" --inet4-only
mv genesis.json ~/.atomone/configOptional Settings
Memory optimization
cd $HOME/.atomone/config && \
indexer="null" && \
snapshot_interval="0" && \
pruning="custom" && \
pruning_keep_recent="1000" && \
pruning_interval="50" && \
sed -i.bak -e "s/^indexer *=.*/indexer = \"$indexer\"/" config.toml && \
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" app.toml && \
sed -i.bak -e "s/^pruning *=.*/pruning = \"$pruning\"/" app.toml && \
sed -i.bak -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" app.toml && \
sed -i.bak -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" app.tomlChange port
cd $HOME/.atomone/config && \
sed -i.bak \
-e "s/:\s*26656/:${atomone_port}56/g" \
-e "s/:\s*26657/:${atomone_port}57/g" \
-e "s/:\s*26658/:${atomone_port}58/g" \
-e "s/:\s*26660/:${atomone_port}59/g" \
-e "s/:\s*6060/:${atomone_port}61/g" \
config.toml
sed -i.bak \
-e "s/:\s*1317/:${atomone_port}17/g" \
-e "s/:\s*8080/:${atomone_port}80/g" \
-e "s/:\s*9090/:${atomone_port}90/g" \
-e "s/:\s*9091/:${atomone_port}91/g" \
app.toml && \
echo 'export atomone_node=http://localhost:${atomone_port}57' >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
atomoned config node $atomone_nodeCreate a service file
sudo tee /etc/systemd/system/atomoned.service > /dev/null <<EOF
[Unit]
Description=atomone
After=network-online.target
[Service]
User=$USER
ExecStart=$(which atomoned) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload &&
sudo systemctl enable atomoned &&
sudo systemctl restart atomoned && sudo journalctl -u atomoned -f -o cat