Genesis Configuration
Defines the initial state of the Maroo blockchain, including accounts, parameters, and module configurations.
The genesis configuration is a JSON file (genesis.json) that specifies the starting state of the Maroo network. It's the foundational blueprint from which the very first block is created. This configuration dictates everything from initial token distributions and validator sets to the default parameters for core modules like the EVM, fee market, and Maroo's custom PCL and OKRW modules.
Structure of `genesis.json`
The
genesis.json file is a large JSON object where top-level keys correspond to the names of the modules registered in the application. The value for each key is another JSON object representing the initial state for that specific module. For example, the bank key holds initial account balances, while the staking key defines the initial set of validators.Maroo-Specific Defaults
The
app/genesis.go file provides functions to generate default genesis states for key modules, tailored for the Maroo ecosystem:NewEVMGenesisState: Configures the EVM module. Crucially, it activates all available static precompiles, giving smart contracts access to Maroo's core functionalities like PCL and Identity from day one.NewFeeMarketGenesisState: Configures the EIP-1559 fee market. Maroo runs BaseFee enabled — senders pay both a base fee (which is burned) and a priority tip (paid to the validator), denominated inaokrw. Standard EVM tooling computes correct values without modification. Seefeemarket-modulefor the full mechanism.NewMintGenesisState: Sets themint_denomtoaokrw, establishing the OKRW stablecoin as the token used for minting new block rewards.NewOkrwGenesisState&NewPclGenesisState: Initialize Maroo's custom modules with their default parameters, preparing them for operation as soon as the chain starts.
Generating and Modifying
A default
genesis.json can be generated using the marood init command. Developers and node operators can then modify this file before starting the network to customize the initial state, such as allocating tokens to specific accounts for a testnet or setting different governance parameters.