# Constants

The following sections contain the module constants, also known as parameter types. These can only be changed as part of a runtime upgrade. On the api, these are exposed via api.consts.<module>.<method>.

(NOTE: These were generated from a static/snapshot view of a recent Substrate master node. Some items may not be available in older nodes, or in any customized implementations.)

# babe

# epochDuration: u64

  • interface: api.consts.babe.epochDuration
  • summary: The number of slots that an epoch takes. We couple sessions to epochs, i.e. we start a new session once the new epoch begins.

# expectedBlockTime: Moment

  • interface: api.consts.babe.expectedBlockTime
  • summary: The expected average block time at which BABE should be creating blocks. Since BABE is probabilistic it is not trivial to figure out what the expected average block time should be based on the slot duration and the security parameter c (where 1 - c represents the probability of a slot being empty).

# balances

# creationFee: Balance

  • interface: api.consts.balances.creationFee
  • summary: The fee required to create an account.

# existentialDeposit: Balance

  • interface: api.consts.balances.existentialDeposit
  • summary: The minimum amount required to keep an account open.

# transactionBaseFee: Balance

  • interface: api.consts.balances.transactionBaseFee
  • summary: The fee to be paid for making a transaction; the base.

# transactionByteFee: Balance

  • interface: api.consts.balances.transactionByteFee
  • summary: The fee to be paid for making a transaction; the per-byte portion.

# transferFee: Balance

  • interface: api.consts.balances.transferFee
  • summary: The fee required to make a transfer.

# contracts

# blockGasLimit: Gas

  • interface: api.consts.contracts.blockGasLimit
  • summary: The maximum amount of gas that could be expended per block. A reasonable default value is 10_000_000.

# callBaseFee: Gas

  • interface: api.consts.contracts.callBaseFee
  • summary: The base fee charged for calling into a contract. A reasonable default value is 135.

# contractFee: BalanceOf

  • interface: api.consts.contracts.contractFee
  • summary: The fee required to instantiate a contract instance. A reasonable default value is 21.

# creationFee: BalanceOf

  • interface: api.consts.contracts.creationFee
  • summary: The fee required to create an account.

# instantiateBaseFee: Gas

  • interface: api.consts.contracts.instantiateBaseFee
  • summary: The base fee charged for instantiating a contract. A reasonable default value is 175.

# maxDepth: u32

  • interface: api.consts.contracts.maxDepth
  • summary: The maximum nesting level of a call/instantiate stack. A reasonable default value is 100.

# maxValueSize: u32

  • interface: api.consts.contracts.maxValueSize
  • summary: The maximum size of a storage value in bytes. A reasonable default is 16 KiB.

# rentByteFee: BalanceOf

  • interface: api.consts.contracts.rentByteFee
  • summary: Price of a byte of storage per one block interval. Should be greater than 0.

# rentDepositOffset: BalanceOf

  • interface: api.consts.contracts.rentDepositOffset
  • summary: The amount of funds a contract should deposit in order to offset the cost of one byte. Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day, then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent. But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000, then it would pay 500 BU/day.

# signedClaimHandicap: BlockNumber

  • interface: api.consts.contracts.signedClaimHandicap
  • summary: Number of block delay an extrinsic claim surcharge has. When claim surcharge is called by an extrinsic the rent is checked for current_block - delay

# storageSizeOffset: u32

  • interface: api.consts.contracts.storageSizeOffset
  • summary: Size of a contract at the time of instantiaion. This is a simple way to ensure that empty contracts eventually gets deleted.

# surchargeReward: BalanceOf

  • interface: api.consts.contracts.surchargeReward
  • summary: Reward that is received by the party whose touch has led to removal of a contract.

# tombstoneDeposit: BalanceOf

  • interface: api.consts.contracts.tombstoneDeposit
  • summary: The minimum amount required to generate a tombstone.

# transactionBaseFee: BalanceOf

  • interface: api.consts.contracts.transactionBaseFee
  • summary: The fee to be paid for making a transaction; the base.

# transactionByteFee: BalanceOf

  • interface: api.consts.contracts.transactionByteFee
  • summary: The fee to be paid for making a transaction; the per-byte portion.

# transferFee: BalanceOf

  • interface: api.consts.contracts.transferFee
  • summary: The fee required to make a transfer.

# democracy

# cooloffPeriod: BlockNumber

  • interface: api.consts.democracy.cooloffPeriod
  • summary: Period in blocks where an external proposal may not be re-submitted after being vetoed.

# emergencyVotingPeriod: BlockNumber

  • interface: api.consts.democracy.emergencyVotingPeriod
  • summary: Minimum voting period allowed for an emergency referendum.

# enactmentPeriod: BlockNumber

  • interface: api.consts.democracy.enactmentPeriod
  • summary: The minimum period of locking and the period between a proposal being approved and enacted. It should generally be a little more than the unstake period to ensure that voting stakers have an opportunity to remove themselves from the system in the case where they are on the losing side of a vote.

# launchPeriod: BlockNumber

  • interface: api.consts.democracy.launchPeriod
  • summary: How often (in blocks) new public referenda are launched.

# minimumDeposit: BalanceOf

  • interface: api.consts.democracy.minimumDeposit
  • summary: The minimum amount to be used as a deposit for a public referendum proposal.

# votingPeriod: BlockNumber

  • interface: api.consts.democracy.votingPeriod
  • summary: How often (in blocks) to check for new votes.

# elections

# approvalSetSize: u32

  • interface: api.consts.elections.approvalSetSize
  • summary: The chunk size of the approval vector.

# candidacyBond: BalanceOf

  • interface: api.consts.elections.candidacyBond
  • summary: How much should be locked up in order to submit one's candidacy. A reasonable default value is 9.

# carryCount: u32

  • interface: api.consts.elections.carryCount
  • summary: How many runners-up should have their approvals persist until the next vote. A reasonable default value is 2.

# decayRatio: u32

  • interface: api.consts.elections.decayRatio
  • summary: Decay factor of weight when being accumulated. It should typically be set to at least membership_size -1 to keep the collective secure. When set to N, it indicates (1/N)^t of staked is decayed at weight increment step t. 0 will result in no weight being added at all (normal approval voting). A reasonable default value is 24.

# inactiveGracePeriod: VoteIndex

  • interface: api.consts.elections.inactiveGracePeriod
  • summary: How many vote indices need to go by after a target voter's last vote before they can be reaped if their approvals are moot. A reasonable default value is 1.

# minimumVotingLock: BalanceOf

  • interface: api.consts.elections.minimumVotingLock
  • summary: Minimum about that can be used as the locked value for voting.

# presentSlashPerVoter: BalanceOf

  • interface: api.consts.elections.presentSlashPerVoter
  • summary: The punishment, per voter, if you provide an invalid presentation. A reasonable default value is 1.

# voterSetSize: u32

  • interface: api.consts.elections.voterSetSize
  • summary: The chunk size of the voter vector.

# votingBond: BalanceOf

  • interface: api.consts.elections.votingBond
  • summary: How much should be locked up in order to be able to submit votes.

# votingFee: BalanceOf

  • interface: api.consts.elections.votingFee
  • summary: The amount of fee paid upon each vote submission, unless if they submit a hole index and replace it.

# votingPeriod: BlockNumber

  • interface: api.consts.elections.votingPeriod
  • summary: How often (in blocks) to check for new votes. A reasonable default value is 1000.

# finalityTracker

# reportLatency: BlockNumber

  • interface: api.consts.finalityTracker.reportLatency
  • summary: The delay after which point things become suspicious. Default is 1000.

# windowSize: BlockNumber

  • interface: api.consts.finalityTracker.windowSize
  • summary: The number of recent samples to keep from this chain. Default is 101.

# session

# dedupKeyPrefix: Bytes

  • interface: api.consts.session.dedupKeyPrefix
  • summary: Used as first key for NextKeys and KeyOwner to put all the data into the same branch of the trie.

# staking

# bondingDuration: EraIndex

  • interface: api.consts.staking.bondingDuration
  • summary: Number of eras that staked funds must remain bonded for.

# sessionsPerEra: SessionIndex

  • interface: api.consts.staking.sessionsPerEra
  • summary: Number of sessions per era.

# timestamp

# minimumPeriod: Moment

  • interface: api.consts.timestamp.minimumPeriod
  • summary: The minimum period between blocks. Beware that this is different to the expected period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. e.g. For Aura, it will be double this period on default settings.

# treasury

# burn: Permill

  • interface: api.consts.treasury.burn
  • summary: Percentage of spare funds (if any) that are burnt per spend period.

# proposalBond: Permill

  • interface: api.consts.treasury.proposalBond
  • summary: Fraction of a proposal's value that should be bonded in order to place the proposal. An accepted proposal gets these back. A rejected proposal does not.

# proposalBondMinimum: BalanceOf

  • interface: api.consts.treasury.proposalBondMinimum
  • summary: Minimum amount of funds that should be placed in a deposit for making a proposal.

# spendPeriod: BlockNumber

  • interface: api.consts.treasury.spendPeriod
  • summary: Period between successive spends.