Full Node Build
Original guide can be found on the Cosmos Github:
genesisTransactions/mantle-1 at main · AssetMantle/genesisTransactions
Snapshots:
Assetmantle Validator Node Snapshot | Polkachu
Install pre-requisites
Install Go
Follow the instructions here to install Go.
For an Ubuntu LTS, we can use:
Unless you want to configure in a non standard way, then set these in the .zshrc
file (or whatever you're using for a profile) in the user's home (i.e. ~/
) folder.
Add the "export Pathing" rules at the bottom, and then save the file:
After updating your ~/.profile or
~/.zshrc you will need to source it:
Build Daemon from source
The <version-tag>
will need to be set to either a testnet chain-id
or the latest mainnet version tag.
To confirm that the installation has succeeded, you can run:
Setting up the Node
These instructions will direct you on how to initialize your node, synchronize to the network and upgrade your node to a validator.
Initialize the chain
This will generate the following files in ~/.mantleNode/config/
genesis.json
node_key.json
priv_validator_key.json
Download the genesis file
This will replace the genesis file created using mantleNode init
command with the mainnet genesis.json
.
Set persistent peers
Using sed
, we can set the persistent_peers
easily:
Update Node configs
We can use sed
to update various node configuration values without having to manually edit each file - which can be a pain.
Replace the values below with your own. These commands will update the following:
minimum_gas_prices
pruning
configssnapshot
configs
Updating node ports
We'll use a powerful tool called sed
for this process. sed
is a stream editor that can perform operations, like substitutions, on a text file.
We will specifically focus on updating the ports to use a standardized prefix for your chain. This ensures consistency and improves overall system organization. It will also allow you to run multiple chains on a single server.
Let's start by understanding what we're updating:
proxy_app: This is the address used for inter-process communication between the ABCI application and the consensus engine.
laddr: This is the address that your node listens on for incoming connections.
pprof_laddr: This is the address for the profiling server to listen on.
prometheus_listen_addr: This is the address for the Prometheus metrics server to listen on.
address: These are various addresses that your node may use to listen for different types of connections.
Set Your Chain and Port Prefix
Your chain in this case is Asset Mantle. For Asset Mantle, we want to set the port prefix as 104
. The port prefix will be used to replace the first 2 or 3 digits of the original ports.
Update config.toml
Next, we will update the config.toml
file. For 5-digit ports, the first 3 digits will be replaced. Here is how to calculate the new port values and update the config.toml
file:
Update app.toml
For 4-digit ports, the first 2 digits will be replaced. Here is how to calculate the new port values and update the app.toml
file:
Create (or restore) a local key pair
Either create a new key pair or restore an existing wallet for your validator:
After creating a new key, the key information and seed phrase will be shown. It is essential to write this seed phrase down and keep it in a safe place. The seed phrase is the only way to restore your keys.
Setup cosmovisor
Follow the 2. Setup Cosmovisor instructions to setup cosmovisor and start the node.
Upgrade to a validator
Do not attempt to upgrade your node to a validator until the node is fully in sync as per the previous step.
To upgrade the node to a validator, you will need to submit a create-validator
transaction:
The above transaction is just an example. There are many more flags that can be set to customise your validator, such as your validator website, or keybase.io id, etc. To see a full list:
Backup critical files
There are certain files that you need to backup to be able to restore your validator if, for some reason, it damaged or lost in some way. Please make a secure backup of the following files located in ~/.
mantleNode/config/
:
priv_validator_key.json
node_key.json
It is recommended that you encrypt the backup of these files.
Last updated