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
make install
sudo cp ~/go/bin/safrochaind /usr/local/bin/
safrochaind version
Initialize the node
safrochaind init <your-name> --chain-id safro-testnet-1
Download Genesis
FILEID=1nSPXDq4vsH4D5NI5e1rUpgbR8-kl_M0Z
FILENAME=$HOME/.safrochain/config/genesis.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
"https://docs.google.com/uc?export=download&id=$FILEID" -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt
Download Addrbook
FILEID=1dUBQ2XGOUhrZK3Xjf20KrgZprbZpaChq
FILENAME=$HOME/.safrochain/config/addrbook.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
"https://docs.google.com/uc?export=download&id=$FILEID" -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt
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 = "10"|' \
$HOME/.safrochain/config/app.toml
Set Minimum Gas Price, and Disable the Indexer
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.075usaf\"|" $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
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