Setting Up

Step 1. Install Dependencies

Install Go (v1.22+)

The minitia daemon is built using Go, a performant, easy-to-learn, and expressive programming language that is widely used in distributed systems.

To install Go, follow the instructions on the Go website.

To verify your installation, run the following command in your terminal

go version
Docker

All components of the minitia stack offers 2 deployment methods; building and running from source and through the provided Docker containers.

For those looking to use Docker, following the instructions to install from the Docker website.

To verify that Docker is installed, run the following command in your terminal:

docker version

Step 2. Download Minitia CLI Binary

First, specify the Minitia VM and minitia version you want to use:

export VM=[vm-type] # one of "move", "wasm", or "evm"
export MINITIA_VERSION="0.2.16" # replace with other version as necessary

Next, clone the corresponding Minitia Git repository:

git clone https://github.com/initia-labs/mini$VM.git

Once the clone is complete, navigate to the appropriate directory (minimove, miniwasm, or minievm) and check out the Minitia version specified above. Finally, build the Minitia CLI.

cd mini$VM
git checkout v$MINITIA_VERSION
make install

Verify the installation of the Minitia image. If the process was completed successfully, the version number should match $MINITIA_VERSION:

minitiad version

Step 3. Starting your minitia

Once the minitiad CLI is functional, the following steps depends on how you want to run or test your minitia

  • Standalone Minitia (Testnet/Local Only): A minimal, streamlined setup ideal for testing Minitia functionality and deploying or integrating with it. It does not include IBC or OPInit bridges. See Deploying a Standalone Minitia

  • Run with IBC and OPInit Bots: The full minitia setup with all of the components when you want to connect to other minitias or Initia L1. See Minitia Full Deployment

Optional Steps

Add Custom Gas Tokens

To safeguard against spam and maintain network stability, operators are required to set minimum gas prices (min-gas-prices) that validators will accept for processing transactions on Minitia nodes.

Changing min-gas-prices in genesis.json

Initially, min-gas-prices are set to 0 in the genesis.json file, and operators should modify this setting before the node begins operation. To change the min-gas-prices to a specific value, use the following command:

sed -i \
    -e "/\"min_gas_prices\": \[\]/s//\"min_gas_prices\": [{\"amount\": \"0.15\", \"denom\": \"$DENOM\"}]/" \
    ~/.minitia/config/genesis.json

This adjustment must be finalized prior to the node's initial start-up.

Updating min-gas-prices After Node Startup

You can use this devtool to update min-gas-prices by submitting the JSON file. The JSON file can be generated here.

In order to update manually, please refer to the following tutorial:

After the node is up and running, the min-gas-prices can be updated using the MsgUpdateParams message. This allows for the modification of the gas fee token denomination to one that is preferred.

The messages.json file is structured as follows to facilitate this update:

echo "{
	\"messages\": [
		{
			\"@type\":\"/opinit.opchild.v1.MsgUpdateParams\",
			\"authority\": \"init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne\",
			\"params\": {
				\"max_validators\": 100,
				\"historical_entries\": 10000,
				\"min_gas_prices\": [{\"amount\": \"0.15\", \"denom\": \"$DENOM\"}],
				\"bridge_executor\": \"$(minitiad keys show $BRIDGE_EXECUTOR -a)\",
				\"admin\": \"$(minitiad keys show $VALIDATOR -a)\",
				\"fee_whitelist\": [\"$(minitiad keys show $BRIDGE_EXECUTOR -a)\", \"$(minitiad keys show $RELAYER -a)\"]
			}
		}
	]
}" > messages.json

To apply these changes, execute the transaction with the updated parameters:

# minitiad tx opchild execute-messages <message-file> --from <validator> --chain-id <chain-id> --gas-prices <gas-prices> --gas auto
minitiad tx opchild execute-messages \
  ./messages.json \
  --from $OPERATOR \
  --chain-id $L2_CHAIN_ID \
  --gas-prices 0.15$DENOM \ # can be skipped if $OPERATOR is in fee whitelist 
  --gas auto --gas-adjustment 1.4

It's important to note that only the currently configured gas price is acceptable for transaction fees until the min-gas-prices parameter is successfully updated.

Next Steps

Now that you have successfully set up your Minitia, the next crucial steps involve setting up OP bots, Relayer bots, and oracles. These components are vital for ensuring smooth operation, secure transactions, and accurate data within your blockchain ecosystem. Here's an outline of how to approach each setup:

Setting Up OP Bots

OP bots are essential for managing transactions and data between Layer 1 (L1) and Layer 2 (L2) networks, optimizing scalability and efficiency.

Setting Up OPinit Bots

Relayer bots

Relayer bots facilitate the transfer of messages and tokens between different blockchains or layers, crucial for interoperability and cross-chain functionality.

Hermes Relayer (IBC)

Oracle

Oracles provide external data to blockchain smart contracts, enabling them to execute based on real-world information.

Oracle: SlinkyEnabling Oracles

(Optional) Add Validators on Minitias

All Minitias have a single sequencer as default. If for any reason you want to add own validators onto your Minitia, follow this tutorial.

CometBFT requires a consensus of over 67%. However, with fewer than three validators, a single validator failure can cause the chain to halt. Therefore, for multi-validator setups, we strongly recommend having at least four validators to prevent such disruptions.

Step 1. Create messages.json

echo "{
  \"messages\": [
    {
      \"@type\": \"/opinit.opchild.v1.MsgAddValidator\",
      \"authority\": \"init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne\",
      \"moniker\": \"[moniker]\",
      \"validator_address\": \"[val-address]\",
      \"pubkey\": {
        \"@type\": \"/cosmos.crypto.ed25519.PubKey\",
        \"key\": \"[val-pubkey]\"
      }
    }
  ]
}" > messages.json 
  • "init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne" : OPchild module address.

  • Insert your moniker, validator address, and pubkey.

  • validator address is initvaloper- prefixed address.`

  • you can get the pubkey with command minitiad comet show-validator

Step 2. Execute Message

minitiad tx opchild execute-messages \
  ./messages.json \
  --from $OPERATOR \
  --chain-id $L2_CHAIN_ID \
  --gas-prices 0.15$DENOM \ # can be skipped if $OPERATOR is in fee whitelist 
  --gas auto --gas-adjustment 1.4
  • OPERATOR must be an admin in [lcd-uri]/opinit/opchild/v1/params.

Last updated

Logo

© 2024 Initia Foundation, All rights reserved.