Simple Minitia Setup
Minita is a lightweight, open-sourced, and easy-to-use blockchain client. This document provides instructions for installing Minita on your local machine.
Prerequisites
Step 1. Download Pre-built Binary
You can setup Minitia chain using minitiad.
git clone https://github.com/initia-labs/minitia.git
You can choose to use MoveVM
or WasmVM
by using minimove
or miniwasm
respectively.
cd minimove
git pull origin main
make install
To confirm the successful installation of Minitia, use the following command:
minitiad version
Step 2. Configuration
Initiate your chain
Initialize the node with a human-readable name or moniker.
You can configure a custom token denom as a fee token on a Minitia, but if a custom token is not specified, the default value umin
will be used as the fee token denom.
export L1_CHAIN_ID=mahalo-1
export L2_CHAIN_ID=minitia-$RANDOM
export DENOM=unova
export OPERATOR=operator
export BRIDGE_EXECUTOR=bridge-executor
export RELAYER=relayer
# minitiad init --chain-id=<chain-id> --denom <denom> <moniker>
minitiad init --chain-id=$L2_CHAIN_ID --denom $DENOM $OPERATOR
CHAIN ID
A chain ID is a unique identifier that represents a blockchain network. The format should be an alphanumeric string between 3 to 50 characters long ( ^[-a-zA-Z0-9]{3,47}-\d+$
).
Generate operation keys
If you don't have a key, use the following command to generate a new key.
# minitiad keys add <key-name>
minitiad keys add $OPERATOR
minitiad keys add $BRIDGE_EXECUTOR
minitiad keys add $RELAYER
Add genesis validator
You can add genesis validator with following command.
# minitiad genesis add-genesis-validator <key-name>
minitiad genesis add-genesis-validator $OPERATOR
Add genesis account
# minitiad genesis add-genesis-account <address> <amount>
minitiad genesis add-genesis-account $(minitiad keys show $OPERATOR -a) 1000000000000000$DENOM
minitiad genesis add-genesis-account $(minitiad keys show $BRIDGE_EXECUTOR -a) 1000000000000000$DENOM
minitiad genesis add-genesis-account $(minitiad keys show $RELAYER -a) 1000000000000000$DENOM
Step 3. Start Minitia
Start minitia node.
minitiad start
For detail configuration and usage, check nodes. You will get useful links as follows:
http://localhost:26657 for RPC
http://localhost:1317 for REST API Server (LCD)
http://localhost:1317/swagger/ for Swagger
grpc://localhost:9090 for GRPC
(Optional) Change min-gas-prices
To prevent spam and ensure network stability, a operator need to set a min-gas-prices
which the validators will accept to validate transactions in Minitia nodes.
Change
min-gas-prices
ingenesis.json
By default,
min-gas-prices
is set to 0, and can be changed ongenesis.json
before the node starts running.
sed -i \
-e "/\"min_gas_prices\": \[\]/s//\"min_gas_prices\": [{\"amount\": \"0.15\", \"denom\": \"$DENOM\"}]/" \
~/.minitia/config/genesis.json
This task must be completed before the node starts running.
Update
min-gas-prices
MsgUpdateParams
message can be used to updatemin-gas-prices
after the node starts running. With this message, gas fee token denom can be changed to a desired denom.
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)\"
}
}
]
}" > messages.json
# 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 \
--gas auto --gas-adjustment 1.4
Only the currently configured gas-price can be used to pay transaction fees before modifying the gas-prices
parameter.
(Optional) Start the Light Client Daemon (LCD)
To enable the REST API and LCD, enable api configuration in app.toml
. Also, to enable Swagger, change swagger = false
to swagger = true
. Note that app.toml
file can be found in $HOME/.minitia/config
by default.
[api]
# Enable defines if the API server should be enabled.
enable = true
# Swagger defines if swagger documentation should automatically be registered.
swagger = true
Last updated