var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=2&rec=1&url=https://feather.terra.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

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:

  1. Change the default bond denom of the chain
  2. Change the chain ID
  3. Change the genesis account balances
  4. 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:

  1. equal: All genesis validators receive an equal amount of delegations (ie. bond_supplynum_genesis_validators\frac{\texttt{bond\_supply}}{\texttt{num\_genesis\_validators}}) from the chain deployer
  2. terravp: 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:

1000000+(bond_supplynum_genesis_validators)1000000 + \left( \frac{\texttt{bond\_supply}}{\texttt{num\_genesis\_validators}}\right)

And when using the terravp stake distribution strategy:

1000000+(bond_supply×validator_voting_powertotal_voting_power)1000000 + \left( {\texttt{bond\_supply}} \times \frac{\texttt{validator\_voting\_power}}{\texttt{total\_voting\_power}} \right)

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:

  1. The sum of the amount fields of the accounts array whose denom field matches the coin's denom
  2. If the coin is the bond_denom, the bond_supply field
  3. If the coin is the bond_denom, the number of genesis validators multiplied by 1000000 (the minimum amount of bond_denom required 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.