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.
cdmini$VMgitcheckoutv$MINITIA_VERSIONmakeinstall
Verify the installation of the Minitia image. If the process was completed successfully, the version number should match $MINITIA_VERSION:
minitiadversion
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
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) Change min-gas-prices
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:
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:
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.
import { LCDClient, MnemonicKey, MsgExecuteMessages, MsgUpdateOpchildParams, OpchildParams, Wallet,} from'@initia/initia.js';asyncfunctionmain() {constlcd=newLCDClient('[rest-url]', { gasPrices:'0.15umin',// current gas price, if admin is free whitelisted, you can set it to 0 gasAdjustment:'1.5', });constkey=newMnemonicKey({ mnemonic:'beauty sniff protect ...', }); // must be adminconstwallet=newWallet(lcd, key);constformerParam=awaitlcd.opchild.parameters();constmsgs= [newMsgExecuteMessages(key.accAddress, [newMsgUpdateOpchildParams('init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne',// opchild module addressnewOpchildParams(formerParam.max_validators,formerParam.historical_entries, // gas price's type is dec coin. You must multiply the gas price by 10 ** 18. (ex. 0.15umin => 150000000000000000umin)
'150000000000000000umin,150000000000000000l2/fe807d454c86db0d3f2b1c5ee5108b9440b5dcb98947585e3dc25ed3d6dfa900',
formerParam.bridge_executor,formerParam.admin,formerParam.fee_whitelist ) ), ]), ];// sign txconstsignedTx=awaitwallet.createAndSignTx({ msgs });// send(broadcast) txlcd.tx.broadcastSync(signedTx).then(res =>console.log(res));// {// height: 0,// txhash: '0F2B255EE75FBA407267BB57A6FF3E3349522DA6DBB31C0356DB588CC3933F37',// raw_log: '[]'// }}main();
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.
Relayer bots facilitate the transfer of messages and tokens between different blockchains or layers, crucial for interoperability and cross-chain functionality.
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.