2. Configure Chain
Feather allows certain aspects of your chain to be configured. Edit the config/config.json file if you would like to do any of the following:
- Change the default bond denom of the chain
- Change the chain ID
- Change the genesis account balances
- Change the address prefixes of user accounts, validator accounts, and consensus accounts
Example config.jsonâ
Refer to the following example config.json file to explain the various configurations:
{ // Actual chain ID when chain is deployed by Feather. // Must uniquely identify your blockchain network. // Naming convention: `[-a-zA-Z0-9]{3,47}`. "chain_id": "feather-1", // Human readable name of the chain. "app_name": "feather-core", // Prefix for all addresses on the chain. "address_prefix": "feath", // Staking bond denominator (i.e. coin denom used for staking). "bond_denom": "stake", // Amount of `bond_denom` used for staking at genesis. // This is split amongst approved genesis validators by Feather. "bond_supply": "1000000000", // Cooldown time after unbonding from a validator before an account can stake again. "unbonding_time": "1814400s", // Max number of validators the chain supports. "max_validators": 130, // Minimum commission rate for validators. Must be a number between 0 and 1. "min_commission_rate": "0", // List of genesis accounts, with their balances at genesis. "accounts": [ { "address": "feath1...aaa", "coins": [ { "denom": "stake", "amount": "4000000000" }, { "denom": "token", "amount": "3000000000" } ], // Optional vesting configurations "vesting": { "coins": [ { "denom": "stake", // Must already exist in the root `coins` section "amount": "1000000000" // Must be less than the amount defined in the root `coins` section } ], "start": 1690000000, // Unix time; optional "end": 1700000000 // Unix time; must be larger than `start` } } ]}
Genesis validator delegationsâ
At genesis, all validators will have an initial self-delegation of exactly 1000000 of the bond_denom (ie. stake). This is to satisfy Cosmos SDK's requirement of having at least one validator with a total delegation of at least 1000000 of the bond_denom during chain genesis.
Additionally, all bond_supply (owned by the address of the chain deployer) will be split according to the stake distribution setting specified and delegated to genesis validators. There are currently two stake distribution settings:
equal: All genesis validators receive an equal amount of delegations (ie. ) from the chain deployerterravp: All validators receive delegations proportional to the validator's voting power in the Terra chain from the chain deployer- A validator that has no voting power in the Terra chain will thus NOT receive any delegations from the chain deployer
In summary, the total delegation or voting power of a validator at chain genesis when using the equal stake distribution strategy is:
And when using the terravp stake distribution strategy:
Genesis account balancesâ
The accounts array in config.json specifies the genesis accounts and their balances at chain genesis. These balances are in addition of the bond_supply field or any validator's self-delegations. In other words, a chain deployer can have a bond_supply of 1000000000 and still have an additional genesis account with a balance of 5000000000 of the bond_denom (ie. stake) specified, meaning they will own a total of 6000000000 of the bond_denom at chain genesis. Likewise, a validator will own a total of 1000000 of the bond_denom (used for self-delegation) and whatever is specified in the accounts array.
Vesting configurationsâ
An account can also contain an optional vesting key, which defines the vesting strategy of the various coins of that account. Note that the coins defined in here are a subset of the main coins of the account. In other words, the coins defined in the vesting key must already exist, and must be less than the coins defined directly outside of the vesting key. The start key is optional (defaults to the start time of the chain), but the end key is compulsory, and they both accept Unix time only.
Genesis coins total supplyâ
The total supply of a coin at chain genesis is the sum of the following:
- The sum of the
amountfields of theaccountsarray whosedenomfield matches the coin's denom - If the coin is the
bond_denom, thebond_supplyfield - If the coin is the
bond_denom, the number of genesis validators multiplied by1000000(the minimum amount ofbond_denomrequired for a validator's self-delegation)
In the example config.json above, assuming there are exactly 8 validators, the total supply of stake is 5008000000 and the total supply of token is 3000000000 at chain genesis.