Installation
Prerequiretes
Hardware
Minimun Spesification
CPU
2 Cores
RAM
4 GB
Disk
50GB
Installation
Download Go
wget https://go.dev/dl/go1.23.9.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.9.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
Download binary file
git clone https://github.com/Safrochain-Org/safrochain-node.git
cd safrochain-node
git checkout v0.1.0
make install
sudo cp ~/go/bin/safrochaind /usr/local/bin/
safrochaind version
Download libwasmvm
mkdir -p ~/.safrochain/lib
cd ~/.safrochain/lib
wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.4/libwasmvm.x86_64.so
Set libswam environment
echo 'export LD_LIBRARY_PATH=/root/.safrochain/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
echo "alias safrochaind='LD_LIBRARY_PATH=$HOME/.safrochain/lib /usr/local/bin/safrochaind'"
source ~/.bashrc
Initialize the node
safrochaind init <your-name> --chain-id safro-testnet-1
Download Genesis & Addrbook
curl -L https://snapshot-2.provewithryd.xyz/safrochain/genesis.json > $HOME/.safrochain/config/genesis.json
curl -L https://snapshot-2.provewithryd.xyz/safrochain/addrbook.json > $HOME/.safrochain/config/addrbook.json
Configure Seeds and Peers
sed -i -e "s|^seeds *=.*|seeds = \"[email protected]:26656,[email protected]:26656\"|" \
-e "s|^persistent_peers *=.*|persistent_peers = \"[email protected]:26656,[email protected]:26656\"|" \
-e "s|^pex *=.*|pex = false|" $HOME/.safrochain/config/config.toml
Customize Pruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "20"|' \
$HOME/.safrochain/config/app.toml
Set Minimum Gas Price, and Disable the Indexer
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0001usaf\"|" $HOME/.safrochain/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.safrochain/config/config.toml
Create Systemd Services
tee /etc/systemd/system/safrochaind.service > /dev/null <<EOF
[Unit]
Description=Safrochain testnet node
After=network-online.target
[Service]
User=root
ExecStart=/usr/local/bin/safrochaind start
Environment="LD_LIBRARY_PATH=/root/.safrochain/lib"
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and Start Services
systemctl daemon-reexec
systemctl daemon-reload
systemctl enable safrochaind.service
systemctl start safrochaind.service
Last updated