# Install dependencies for building from sourcesudoaptupdatesudoaptinstall-ylz4jqmakegitgccbuild-essentialcurlchronyunzipgzipsnapdtmuxbc# Install Gosudorm-rf/usr/local/gocurl-Lhttps://go.dev/dl/go1.21.6.linux-amd64.tar.gz|sudotar-xzf--C/usr/localecho'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin'>> $HOME/.bash_profilesource.bash_profile
Install node
Replace "NODE_MONIKER" with your name moniker
# Clone project repositorycd $HOMEgitclonehttps://github.com/MANTRA-Finance/public.gitcdpublicgitcheckoutv3.0.0# Build binarymakeinstall# Set node CLI configurationmantrachaindconfigchain-idmantra-hongbai-1mantrachaindconfigkeyring-backendosmantrachaindconfignodetcp://localhost:26657source $HOME/.bash_profile# Initialize the nodemantrachaindinit"NODE_MONIKER"--chain-idmantra-hongbai-1# Download genesis and addrbook filescurlhttps://config-t.noders.services/mantra/genesis.json-o~/.mantrachaind/config/genesis.jsoncurlhttps://config-t.noders.services/mantra/addrbook.json-o~/.mantrachaind/config/addrbook.json# Set peerssed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"f32589afc557a5c4a372f38dae72fbaaa8a5b98d@mantra-t-rpc.noders.services:30656\"/" ~/.mantrachaind/config/config.toml
# Set minimum gas pricesed-i-e"s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.001uom\"|"~/.mantrachaind/config/app.toml# Set pruningsed-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"|' \~/.mantrachaind/config/app.toml# Download latest chain data snapshotSNAP_NAME=$(curl -s https://snapshots.l0vd.com/mantra-testnet/ | egrep -o ">mantrachain-testnet-1.*\.tar.lz4" | tr -d ">")
curlhttps://snapshots.l0vd.com/mantra-testnet/${SNAP_NAME} |lz4-dc-|tar-xf--C $HOME/.mantrachain# Create a servicesudotee/etc/systemd/system/mantrachaind.service>/dev/null<<EOF[Unit]Description=mantra node serviceAfter=network-online.target[Service]User=$USERExecStart=$(which mantrachaind) startRestart=on-failureRestartSec=10LimitNOFILE=65535Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"[Install]WantedBy=multi-user.targetEOFsudosystemctldaemon-reloadsudosystemctlenablemantrachaind.service# Start the service and check the logssudosystemctlstartmantrachaind.servicesudojournalctl-umantrachaind.service-f-ocat
📝 Create Validator
1️⃣ Create wallet
mantrachaindkeysaddwallet
Save all information after entering the command, without this you will not be able to restore data to the wallet. SAVE SEED PHRASE (12 words).