Running a Node
In this section, the application we are running is called mantrachaind. We will walk through how to set up and configure the app - along with integrating the application as a system service.
Last updated
In this section, the application we are running is called mantrachaind. We will walk through how to set up and configure the app - along with integrating the application as a system service.
Last updated
Latest chain release binaries can be found .
You can download the mantrachaind
executable and place it in a standard binary folder, such as /usr/local/bin/
or similar. Remember to make it executable by completing sudo chmod +x
.
Each mantrachaind
binary is deployed with a corresponding .sha256 file that you can download, to verify the integrity of the build. Download the sha256sum.txt
and verify the hash.
Before actually running the node, we need to initialize the chain, and most importantly its genesis file. This is done with the init
subcommand:
We will have regularly updating public testnet chains along with our mainnet chain: mantra-1
. Available networks to integrate with along with their requisite genesis files can be found .
Arguments:
moniker
: the custom username of your node, it should be human-readable.
chain-id
: The id of an existing chain that you want to join. Examples:
Testnet: mantra-dukong-1
Mainnet: mantra-1
The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. Reminder to overwrite the default genesis if you're planning to exist to an existing chain!!
The ~/.mantrachain
folder has the following structure:
app.toml
: generated by the Cosmos SDK, and used to configure your app, such as state pruning strategies, telemetry, gRPC and REST servers configuration, state sync...
Both files are heavily commented, please refer to them directly to tweak your node.
genesis.json
In order to connect to an existing public chain, we need to reuse an existing genesis.json
Download the genesis.json
of the chain you want to connect to, and put it into ~/.mantrachain/config
Install prerequisites tools before proceeding, ensure that wget
is installed on your system, as it is required for running a Node. Having wget
installed ensures seamless execution of the below script, allowing it to fetch necessary external resources without interruption.
Create a bash script with the following content:
Update the SEEDS
environment variable
Testnet (mantra-dukong-1):
SEEDS="7e061edecef73a700b699c785f61a44ca981ff7f@34.150.103.79:26656"
Mainnet (mantra-1):
SEEDS="32276da966637722914411e16ca91bd37dcd1c28@35.220.157.87:26656,9f5235b418c87af4302619705d0bf4748249ca6b@34.18.33.96:26656"
Run the script: bash <script-name>.sh
Install lz4
Macos (homebrew) : brew install lz4
Decompress the snapshot
Update the file ~/.mantrachain/config/config.toml
Replace the value of db_backend
by pebbledb
, so it will looks likedb_backend = "pebbledb"
Wait for a few couple of seconds, and if you see the height growing: success! 🎉
When instantiating a node, GRPC and REST are defaulted to localhost to avoid unknown exposure of your node to the public. It is recommended to not expose these endpoints without a proxy that can handle load balancing or authentication is setup between your node and the public.
config.toml
: used to configure the CometBFT, learn more on ,
Go to (Github)[]
Note: more seeds can be found at (Github)[]
In order to quicken the process, we are providing some existing data snapshots at
Warning: If you are starting the node, please follow the procedure here in order to stop the current service and backup the important data:
Download the snapshot from:
Linux: [more info here]()