Mintstation
Node & Validator
Joining Mainnet

Joining Mainnet

To get up and running with the mintstationd binary, please follow the instructions here.

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

CHAIN_ID=mintstation-1
MONIKER_NAME=<moniker-name>
mintstationd init "$MONIKER_NAME" --chain-id $CHAIN_ID

This will generate the following files in ~/.mintstation/config/

  • genesis.json
  • node_key.json
  • priv_validator_key.json

Download the genesis file

Download the the geneis file.

# Download genesis.json file (https://github.com/cosmostation/mintstation)
rm ~/.mintstation/config/genesis.json
curl -sS "https://rpc-mintstation.cosmostation.io/genesis" | jq .result.genesis > $HOME/.mintstation/config/genesis.json

This will replace the genesis file created using mintstationd init command with the mainnet genesis.json.

Set seeds

We can set the seeds by retrieving the list of seeds from the mintstation repo and using sed to inject into ~/.mintstation/config/config.toml:

# Set the base repo URL for mainnet & retrieve seeds
CHAIN_ID=mintstation-1
CHAIN_REPO="https://raw.githubusercontent.com/cosmostation/mintstation/main/$CHAIN_ID" && \
export SEEDS="$(curl -sL "$CHAIN_REPO/seeds.txt")"
 
# Add seeds to config.toml
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" ~/.mintstation/config/config.toml

Set minimum gas prices

For RPC nodes and Validator nodes we recommend setting the following minimum-gas-prices. As we are a permissionless wasm chain, this setting will help protect against contract spam and potential wasm contract attack vectors.

In $HOME/.mintstation/config/app.toml, set minimum gas prices:

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025umint\"/" ~/.mintstation/config/app.toml

Create (or restore) a local key pair

Either create a new key pair, or restore an existing wallet for your validator:

mintstationd keys add <key-name>
 
# OR
 
# Restore existing mint wallet with mnemonic seed phrase.
# You will be prompted to enter mnemonic seed.
mintstationd keys add <key-name> --recover
 
# Query the keystore for your public address
mintstationd keys show <key-name> --bech val -a

Replace <key-name> with a key name of your choosing.

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.

Get some tokens

We are serving only a few tokens for you to test or do something what you want.

# Check your address which you've generated & copy the address
mintstationd keys show <key-name> -a
 
# Go to minstation faucet and paste your address on it
https://faucet-mintstation.cosmostation.io

If you want to get more tokens or delegations, Please contact us from here.

Syncing the node

There are methods to sync a node to the network:

Sync from genesis

After starting the mintstationd daemon, the chain will begin to sync to the network. The time to sync to the network will vary depending on your setup and the current size of the blockchain, but could take a very long time. To query the status of your node:

# Start for your node to sync from genesis
mintstationd start
 
# Query via the RPC (default port: 26657)
curl http://localhost:26657/status | jq .result.sync_info.catching_up

If this command returns true then your node is still catching up. If it returns false then your node has caught up to the network current block and you are safe to proceed to upgrade to a validator node.

When syncing from genesis, you will need to perform upgrades while catching up to the head. mintstation-1 upgrades are detailed in node-upgrade.md along with a description of each type of upgrade.

Sync with statesync

When a cosmos-sdk based chain already started to make a new consensus, you need some time to sync from genesis with your node.

So, you can resolve this problem by using statesync (opens in a new tab) functionality, which is general characteristic in cosoms-sdk based chain. And then we recommend to sync with statesync by using our snapshot provider rpc endpoint.

# Setup statesync in your config.toml
SNAP_RPC="https://rpc-mintstation.cosmostation.io:443"
 
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1500)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
 
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.mintstation/config/config.toml
 
# Check diff between before and after
diff $HOME/.mintstation/config/config.toml $HOME/.mintstation/config/config.toml.bak
 
# Start for your node to sync with statesync
mintstationd start

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 ~/.mintstation/config/:

  • priv_validator_key.json
  • node_key.json

It is recommended that you encrypt the backup of these files.