How to Initialize a Maroo Node
A focused guide on using the marood init command to set up the necessary configuration files for a new Maroo full node.
Prerequisites
- The `marood` binary is installed and available in your PATH.
1. Running the Init Command
The basic command requires a 'moniker', which is a public name for your node. You should also specify the chain ID you intend to connect to.
marood init <your-node-moniker> --chain-id <target-chain-id> Note: For example, to join the testnet: `marood init "My Awesome Node" --chain-id maroo-testnet`
2. Understanding the Generated Files
After running the command, a new directory will be created at
~/.maroo (unless you specified a different --home). The most important files inside are:~/.maroo/config/genesis.json: This is the genesis file. It defines the initial state of the blockchain, including accounts, parameters, and the initial validator set. When connecting to an existing network, you must replace this file with the official genesis file for that network.~/.maroo/config/config.toml: This is the CometBFT configuration file. It controls P2P networking, consensus parameters, the mempool, and RPC server settings.~/.maroo/config/app.toml: This is the application-level configuration file. It contains settings specific to the Maroo application, such as gas prices, pruning strategies, and API server settings.~/.maroo/config/node_key.json: This file contains the private key that uniquely identifies your node on the P2P network. Do not share this file.~/.maroo/config/priv_validator_key.json: This file contains the key your node uses to sign blocks if it's a validator. This is a highly sensitive file and should be backed up securely.
3. Next Steps
With your node initialized, you are ready for the next steps:
1. Get the Genesis File: If you are joining an existing network, download the correct
2. Configure Peers: Edit
3. Start the Node: Run
1. Get the Genesis File: If you are joining an existing network, download the correct
genesis.json file and replace the one in your config directory.2. Configure Peers: Edit
config.toml to add persistent peers or seeds to help your node find others on the network.3. Start the Node: Run
marood start to begin syncing with the network.