> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ton.org/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.ton.org/feedback

```json
{
  "path": "/foundations/config",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Blockchain config

export const Image = ({src, darkSrc, alt = '', darkAlt, href, target, height = 342, width = 608, noZoom = false, center = false}) => {
  const isSVG = src.match(/\.svg(?:[#?].*?)?$/i) !== null;
  const shouldInvert = isSVG && !darkSrc;
  const shouldCreateLink = href !== undefined;
  const minPx = 9;
  const maxPx = 608;
  const expectedPx = `a number or a string with a number that is greater than ${minPx - 1} and less than or equal to ${maxPx}`;
  const createInvalidPropCallout = (title, received, expected) => {
    return <Danger>
        <span className="font-bold">
          Invalid <code>{title.toString()}</code> passed!
        </span>
        <br />
        <span className="font-bold">Received: </span>
        {received.toString()}
        <br />
        <span className="font-bold">Expected: </span>
        {expected.toString()}
        {}
      </Danger>;
  };
  const checkValidDimensionValue = value => {
    switch (typeof value) {
      case "string":
      case "number":
        const num = Number(value);
        return Number.isSafeInteger(num) && num >= minPx && num <= maxPx;
      default:
        return false;
    }
  };
  let callouts = [];
  if (height && !checkValidDimensionValue(height)) {
    callouts.push(createInvalidPropCallout("height", height, expectedPx));
  }
  if (width && !checkValidDimensionValue(width)) {
    callouts.push(createInvalidPropCallout("width", width, expectedPx));
  }
  if (callouts.length !== 0) {
    return callouts;
  }
  const heightPx = Number(height);
  const widthPx = Number(width);
  const shouldCenter = center === "true" || center === true ? true : false;
  const shouldNotZoom = noZoom === "true" || noZoom === true ? true : false;
  const images = <>
      <img className="block dark:hidden" src={src} alt={alt} {...height && ({
    height: heightPx
  })} {...width && ({
    width: widthPx
  })} {...(shouldCreateLink || shouldInvert || shouldNotZoom) && ({
    noZoom: "true"
  })} />
      <img className={`hidden dark:block ${shouldInvert ? "invert" : ""}`} src={darkSrc ?? src} alt={darkAlt ?? alt} {...height && ({
    height: heightPx
  })} {...width && ({
    width: widthPx
  })} {...(shouldCreateLink || shouldInvert || shouldNotZoom) && ({
    noZoom: "true"
  })} />
    </>;
  if (shouldCreateLink) {
    if (shouldCenter) {
      return <div style={{
        display: "flex",
        justifyContent: "center"
      }}>
          <a href={href} target={target ?? "_self"}>
            {images}
          </a>
        </div>;
    }
    return <a href={href} target={target ?? "_self"}>
        {images}
      </a>;
  }
  if (shouldCenter) {
    return <div style={{
      display: "flex",
      justifyContent: "center"
    }}>{images}</div>;
  }
  return images;
};

export const Aside = ({type = "note", title = "", icon = "", iconType = "regular", children}) => {
  const asideVariants = ["note", "tip", "caution", "danger"];
  const asideComponents = {
    note: {
      outerStyle: "border-sky-500/20 bg-sky-50/50 dark:border-sky-500/30 dark:bg-sky-500/10",
      innerStyle: "text-sky-900 dark:text-sky-200",
      calloutType: "note",
      icon: <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className="w-4 h-4 text-sky-500" aria-label="Note">
          <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path>
        </svg>
    },
    tip: {
      outerStyle: "border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10",
      innerStyle: "text-emerald-900 dark:text-emerald-200",
      calloutType: "tip",
      icon: <svg width="11" height="14" viewBox="0 0 11 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className="text-emerald-600 dark:text-emerald-400/80 w-3.5 h-auto" aria-label="Tip">
          <path d="M3.12794 12.4232C3.12794 12.5954 3.1776 12.7634 3.27244 12.907L3.74114 13.6095C3.88471 13.8248 4.21067 14 4.46964 14H6.15606C6.41415 14 6.74017 13.825 6.88373 13.6095L7.3508 12.9073C7.43114 12.7859 7.49705 12.569 7.49705 12.4232L7.50055 11.3513H3.12521L3.12794 12.4232ZM5.31288 0C2.52414 0.00875889 0.5 2.26889 0.5 4.78826C0.5 6.00188 0.949566 7.10829 1.69119 7.95492C2.14321 8.47011 2.84901 9.54727 3.11919 10.4557C3.12005 10.4625 3.12175 10.4698 3.12261 10.4771H7.50342C7.50427 10.4698 7.50598 10.463 7.50684 10.4557C7.77688 9.54727 8.48281 8.47011 8.93484 7.95492C9.67728 7.13181 10.1258 6.02703 10.1258 4.78826C10.1258 2.15486 7.9709 0.000106649 5.31288 0ZM7.94902 7.11267C7.52078 7.60079 6.99082 8.37878 6.6077 9.18794H4.02051C3.63739 8.37878 3.10743 7.60079 2.67947 7.11294C2.11997 6.47551 1.8126 5.63599 1.8126 4.78826C1.8126 3.09829 3.12794 1.31944 5.28827 1.3126C7.2435 1.3126 8.81315 2.88226 8.81315 4.78826C8.81315 5.63599 8.50688 6.47551 7.94902 7.11267ZM4.87534 2.18767C3.66939 2.18767 2.68767 3.16939 2.68767 4.37534C2.68767 4.61719 2.88336 4.81288 3.12521 4.81288C3.36705 4.81288 3.56274 4.61599 3.56274 4.37534C3.56274 3.6515 4.1515 3.06274 4.87534 3.06274C5.11719 3.06274 5.31288 2.86727 5.31288 2.62548C5.31288 2.38369 5.11599 2.18767 4.87534 2.18767Z"></path>
        </svg>
    },
    caution: {
      outerStyle: "border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10",
      innerStyle: "text-amber-900 dark:text-amber-200",
      calloutType: "warning",
      icon: <svg className="flex-none w-5 h-5 text-amber-400 dark:text-amber-300/80" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-label="Warning">
          <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
        </svg>
    },
    danger: {
      outerStyle: "border-red-500/20 bg-red-50/50 dark:border-red-500/30 dark:bg-red-500/10",
      innerStyle: "text-red-900 dark:text-red-200",
      calloutType: "danger",
      icon: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" className="text-red-600 dark:text-red-400/80 w-4 h-4" aria-label="Danger">
          <path d="M17.1 292c-12.9-22.3-12.9-49.7 0-72L105.4 67.1c12.9-22.3 36.6-36 62.4-36l176.6 0c25.7 0 49.5 13.7 62.4 36L494.9 220c12.9 22.3 12.9 49.7 0 72L406.6 444.9c-12.9 22.3-36.6 36-62.4 36l-176.6 0c-25.7 0-49.5-13.7-62.4-36L17.1 292zm41.6-48c-4.3 7.4-4.3 16.6 0 24l88.3 152.9c4.3 7.4 12.2 12 20.8 12l176.6 0c8.6 0 16.5-4.6 20.8-12L453.4 268c4.3-7.4 4.3-16.6 0-24L365.1 91.1c-4.3-7.4-12.2-12-20.8-12l-176.6 0c-8.6 0-16.5 4.6-20.8 12L58.6 244zM256 128c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path>
        </svg>
    }
  };
  let variant = type;
  let gotInvalidVariant = false;
  if (!asideVariants.includes(type)) {
    gotInvalidVariant = true;
    variant = "danger";
  }
  const iconVariants = ["regular", "solid", "light", "thin", "sharp-solid", "duotone", "brands"];
  if (!iconVariants.includes(iconType)) {
    iconType = "regular";
  }
  return <>
      <div className={`callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border ${asideComponents[variant].outerStyle}`} data-callout-type={asideComponents[variant].calloutType}>
        <div className="mt-0.5 w-4" data-component-part="callout-icon">
          {}
          {icon === "" ? asideComponents[variant].icon : <Icon icon={icon} iconType={iconType} size={14} />}
        </div>
        <div className={`text-sm prose min-w-0 w-full ${asideComponents[variant].innerStyle}`} data-component-part="callout-content">
          {gotInvalidVariant ? <p>
              <span className="font-bold">
                Invalid <code>type</code> passed!
              </span>
              <br />
              <span className="font-bold">Received: </span>
              {type}
              <br />
              <span className="font-bold">Expected one of: </span>
              {asideVariants.join(", ")}
            </p> : <>
              {title && <p className="font-bold">{title}</p>}
              {children}
            </>}
        </div>
      </div>
    </>;
};

<Aside>
  You can view live values by using [Tonviewer](https://tonviewer.com/config).
</Aside>

This page provides a description of the configuration parameters used in the TON Blockchain.

TON features a complex configuration consisting of many technical parameters, some of which are utilized by the blockchain itself, while others serve the ecosystem. However, only a limited number of individuals fully understand the significance of these parameters. This article aims to offer users a straightforward explanation of each parameter and its purpose.

## Prerequisites

This material should be read alongside the parameter list.

You can view the parameter values in the [current configuration](https://tonviewer.com/config), and the method of writing them into [cells](/foundations/serialization/boc) is outlined in the [`block.tlb`](https://github.com/ton-blockchain/ton/blob/master/crypto/block/block.tlb) file in [TL-B](/languages/tl-b/overview) format.

<Aside>
  Configuration values are TL-B typed cells serialized into [Bags of Cells (BoC)](/foundations/serialization/boc).
</Aside>

All parameters are in place, and you won't get lost. For your convenience, please use the right sidebar for quick navigation.

## Param 0: config address

This parameter is the address of a special smart contract that stores the blockchain's configuration. The configuration is stored in the contract to simplify its loading and modification during validator voting.

<Aside>
  In the configuration parameter, only the hash portion of the address is recorded, as the contract always resides in the masterchain (workchain -1). Therefore, the full address of the contract will be written as `-1:<value of the configuration parameter>`.
</Aside>

[Parameter #0 on mainnet](https://tonviewer.com/config#0)

## Param 1: elector address

This parameter is the address of the [elector smart contract](/foundations/system), responsible for appointing validators, distributing rewards, and voting on changes to blockchain parameters.

[Parameter #1 on mainnet](https://tonviewer.com/config#1)

## Param 2: TON minting address

This parameter represents the address of the system, on behalf of which new Toncoin are minted and sent as rewards for validating the blockchain.

<Aside>
  If parameter 2 is missing, parameter 0 is used instead (newly minted Toncoin come from the configuration smart contract).
</Aside>

[Parameter #2 on mainnet](https://tonviewer.com/config#2)

## Param 3: fee collector address

This parameter is the address of the transaction fee collector.

<Aside>
  If this parameter is missing (for the time being), transaction fees are directed to the elector smart contract (parameter 1).
</Aside>

[Parameter #3 on mainnet](https://tonviewer.com/config#3)

## Param 4: root DNS address

This parameter is the address of the root DNS contract of the TON network.

<Aside>
  For details, see the [original specification](https://github.com/ton-blockchain/TEPs/blob/master/text/0081-dns-standard.md).

  This contract is not responsible for selling **.ton** domains.
</Aside>

[Parameter #4 on mainnet](https://tonviewer.com/config#4)

## Param 6: extra currency fee

This parameter is responsible for minting fees for new currencies.

[Parameter #6 on mainnet](https://tonviewer.com/config#6)

## Param 7: extra currency volume

This parameter stores the volume of each extra currency in circulation. The data is organized as a dictionary (also referred to as a **hashmap**). The structure uses the format `currency_id -> amount`, where the amount is represented as a `VarUInteger 32`, which is an integer ranging from `0` to `2^248-1`.

[Parameter #7 on mainnet](https://tonviewer.com/config#7)

## Param 8: network version

This parameter indicates the network version and additional capabilities supported by the validators.

<Aside>
  Validators are nodes in the TON Blockchain network that are responsible for creating new blocks and verifying transactions.
</Aside>

* `version`: This field specifies the version.

* `capabilities`: This field is a set of flags that are used to indicate the presence or absence of certain features or capabilities.

Thus, when updating the network, validators will vote to change parameter 8. This way, the TON Blockchain network can be updated without downtime.

[Parameter #8 on mainnet](https://tonviewer.com/config#8)

## Param 9: mandatory params

This parameter contains a list (binary tree) of mandatory parameters. It ensures that certain configuration parameters are always present and cannot be removed by a proposal to change the configuration until parameter 9 changes.

[Parameter #9 on mainnet](https://tonviewer.com/config#9)

## Param 10: critical params

This parameter represents a list (binary tree) of critical TON parameters whose change significantly affects the network, so more voting rounds are held.

[Parameter #10 on mainnet](https://tonviewer.com/config#10)

## Param 11: config params

This parameter indicates under what conditions proposals to change the TON configuration are accepted.

* `min_tot_rounds`: The minimum number of rounds before a proposal can be applied. Currently, this parameter is not used: only `max_tot_round` (when the proposal will be rejected) and `min_wins` (when the proposal will be accepted) matter.

* `max_tot_rounds`: The maximum number of rounds, upon reaching which the proposal will automatically be rejected

* `min_wins`: The required number of wins (3/4 of validators by the sum of the pledges must vote in favor)

* `max_losses`: The maximum number of losses, upon reaching which the proposal will automatically be rejected

* `min_store_sec` and `max_store_sec` determine the possible time interval during which the proposal will be stored

* `bit_price` and `cell_price` indicate the price of storing one bit or one cell of the proposal

[Parameter #11 on mainnet](https://tonviewer.com/config#11)

## Param 12: Workchain config

This parameter represents the configuration of a workchain in the TON Blockchain. workchains are designed as independent blockchains that can operate in parallel, allowing TON to scale and process a large number of transactions and smart contracts.

### Workchain configuration parameters

* `enabled_since`: A UNIX timestamp of the moment this workchain was enabled.

* `actual_min_split`: The minimum depth of the split (sharding) of this workchain, supported by validators.

* `min_split`: The minimum depth of the split of this workchain, set by the configuration.

* `max_split`: The maximum depth of the split of this workchain.

* `basic`: A boolean flag (1 for true, 0 for false) indicating whether this workchain is basic (handles TON coins, smart contracts based on the TON Virtual Machine).

* `active`: A boolean flag indicating whether this workchain is active at the moment.

* `accept_msgs`: A boolean flag indicating whether this workchain is accepting messages at the moment.

* `flags`: Additional flags for the workchain (reserved, currently always 0).

* `zerostate_root_hash` and `zerostate_file_hash`: Hashes of the first block of the workchain.

* `version`: Version of the workchain.

* `format`: The format of the workchain, which includes `vm_version` and `vm_mode` - the virtual machine used there.

[Parameter #12 on mainnet](https://tonviewer.com/config#12)

## Param 13: complaint cost

This parameter defines the cost of filing complaints about the incorrect operation of validators in the [elector smart contract](/foundations/system).

[Parameter #13 on mainnet](https://tonviewer.com/config#13)

## Param 14: block reward

This parameter indicates the reward for creating a block in the TON Blockchain. Values are in nanotons (also referred to as nanograms); therefore, the reward for block creation in the masterchain is 1.7 Toncoin, while in the basechain, it is 1.0 Toncoin. In the event of a workchain split, the block reward is also divided: if there are two shardchains within the workchain, then the reward for each shard block will be 0.5 Toncoin.

[Parameter #14 on mainnet](https://tonviewer.com/config#14)

## Param 15: elections timing

This parameter contains the duration of different stages of elections and validators' work in the TON Blockchain.

For each validation period, there is an `election_id` equal to the UNIX-format time at the start of the validation.

You can get the current `election_id` (if elections are ongoing) or the past one by invoking the elector smart contract's respective get-methods `active_election_id` and `past_election_ids`.

### Election and validation timing parameters

* `validators_elected_for`: The number of seconds the elected validators perform their role (one round).

* `elections_start_before`: The seconds before the end of the current round, when the election process for the next period will start.

* `elections_end_before`: The seconds before the end of the current round, the validators for the next round will be chosen.

* `stake_held_for`: The period for which a validator's stake is held (for handling complaints) after the round expires.

<Aside>
  Each value in the arguments is determined by the `uint32` data type.
</Aside>

### Examples

In the TON Blockchain, validation periods are typically divided into **even** and **odd** rounds that alternate. Voting for the next round occurs during the previous one, so a validator must allocate their funds into two separate pools to participate in both rounds.

#### Mainnet

Current values:

```python theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
constants = {
    'validators_elected_for': 65536,  # 18.2 hours
    'elections_start_before': 32768,  # 9.1 hours
    'elections_end_before': 8192,     # 2.2 hours
    'stake_held_for': 32768           # 9.1 hours
}
```

Scheme:

<Image src="/resources/images/limits/config15-mainnet.png" darkSrc="/resources/images/limits/config15-mainnet.png" alt="Election timing scheme (Mainnet)" />

#### How to calculate periods?

Let `election_id = validation_start = 1600032768`. Then:

```python theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
election_start = election_id - constants['elections_start_before'] = 1600032768 - 32768 = 1600000000
election_end = delay_start = election_id - constants['elections_end_before'] = 1600032768 - 8192 = 1600024576
hold_start = validation_end = election_id + constants['validators_elected_for'] = 1600032768 + 65536 = 1600098304
hold_end = hold_start + constants['stake_held_for'] = 1600098304 + 32768 = 1600131072
```

Therefore, at this time, the length of one round of one parity is `1600131072 - 1600000000 = 131072 seconds = 36.40888... hours`

#### Testnet

Current values:

```python theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
constants = {
    'validators_elected_for': 7200,  # 2 hours
    'elections_start_before': 2400,  # 40 minutes
    'elections_end_before': 180,     # 3 minutes
    'stake_held_for': 900            # 15 minutes
}
```

Scheme:

<Image src="/resources/images/limits/config15-testnet.png" darkSrc="/resources/images/limits/config15-testnet.png" alt="Election timing scheme (Testnet)" />

#### How to calculate periods?

Let `election_id = validation_start = 160002400`. Then:

```python theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
election_start = election_id - constants['elections_start_before'] = 160002400 - 2400 = 160000000
election_end = delay_start = election_id - constants['elections_end_before'] = 160002400 - 180 = 160002220
hold_start = validation_end = election_id + constants['validators_elected_for'] = 160002400 + 7200 = 160009600
hold_end = hold_start + constants['stake_held_for'] = 160009600 + 900 = 160010500
```

Therefore, at this time, the length of one round of one parity is `160010500 - 160000000 = 10500 seconds = 175 minutes = 2.91666... hours`

[Parameter #15 on mainnet](https://tonviewer.com/config#15)

## Param 16: validators limits

This parameter represents the limits on the number of validators in the TON Blockchain. It is directly used by the elector smart contract.

### Configuration parameters for the number of validators for elections

* `max_validators`: This parameter represents the maximum number of validators that can participate in the network operation at any given time.

* `max_main_validators`: This parameter represents the maximum number of masterchain validators.

* `min_validators`: This parameter represents the minimum number of validators that must support the network operation.

#### Notes

* The maximum number of validators is greater than or equal to the maximum number of masterchain validators.

* The maximum number of masterchain validators must be greater than or equal to the minimum number of validators.

* The minimum number of validators must be no less than 1.

[Parameter #16 on mainnet](https://tonviewer.com/config#16)

## Param 17: stake limits

This parameter represents the stake parameters configuration in the TON Blockchain. In many blockchain systems, especially those using the Proof-of-Stake or Delegated Proof-of-Stake consensus algorithm, cryptocurrency owners native to the network can "stake" their tokens to become validators and earn rewards.

### Configuration parameters

* `min_stake`: This parameter represents the minimum amount of Toncoin that an interested party needs to stake to participate in the validation process.

* `max_stake`: This parameter represents the maximum amount of Toncoin that an interested party can stake.

* `min_total_stake`: This parameter represents the minimum total amount of Toncoin that the chosen set of validators must hold.

* `max_stake_factor`: This parameter is a multiplier indicating how many times the maximum effective stake (pledge) can exceed the minimum stake sent by any other validator.

<Aside>
  Each value in the arguments is determined by the `uint32` data type.
</Aside>

[Parameter #17 on mainnet](https://tonviewer.com/config#17)

## Param 18: storage prices

This parameter represents the configuration for determining the prices for data storage on the TON Blockchain. This serves as a measure to prevent spam and encourages network maintenance.

### Dictionary of storage fee parameters

* `utime_since`: This parameter provides the initial Unix timestamp from which the specified prices apply.

* `bit_price_ps` and `cell_price_ps`: These parameters represent the storage prices for one bit or one cell of information in the main workchains of the TON Blockchain for 65536 seconds.

* `mc_bit_price_ps` and `mc_cell_price_ps`: These parameters represent the storage prices per bit and per cell in the TON masterchain for 65536 seconds.

<Aside>
  `utime_since` accepts values in the `uint32` data type.

  The rest accept values in the `uint64` data type.
</Aside>

[Parameter #18 on mainnet](https://tonviewer.com/config#18)

## Param 20 and 21: gas prices

These parameters define the cost of computations in the TON network. The complexity of any computation is estimated in gas units.

Note: Param 20 defines gas settings for the masterchain; Param 21 defines gas settings for other workchains.

* `flat_gas_limit` and `flat_gas_price`: A certain starting amount of gas is provided at a price of `flat_gas_price` (to offset the costs of launching the TON Virtual Machine).

* `gas_price`: This parameter reflects the price of gas in the network, in nanotons per 65536 gas units.

* `gas_limit`: This parameter represents the maximum amount of gas that can be consumed per transaction.

* `special_gas_limit`: This parameter represents the limit on the amount of gas that can be consumed per transaction of a special (system) contract.

* `gas_credit`: This parameter represents a credit in gas units provided to transactions to process an external message.

* `block_gas_limit`: This parameter represents the maximum amount of gas that can be consumed within a single block.

* `freeze_due_limit` and `delete_due_limit`: Limits of accumulated storage fees (in nanotons) at which a contract is frozen and deleted, respectively.

<Aside>
  You can find more about `gas_credit` and other parameters in the section of external messages [here](/tvm/instructions#external-messages).
</Aside>

[Parameter #20 on mainnet](https://tonviewer.com/config#20) | [Parameter #21 on mainnet](https://tonviewer.com/config#21)

## Param 22 and 23: block limits

These parameters set limits on the block, upon reaching which the block is finalized and the callback of the remaining messages (if any) is carried over to the next block.

### Configuration parameters

* `bytes`: This section sets the limits on the block size in bytes.

* `underload`: Underload is a state when the shard realizes that there is no load and is inclined to merge if a neighboring shard is willing.

* `soft_limit`: Soft limit - when this limit is reached, internal messages stop being processed.

* `hard_limit`: Hard limit - this is the absolute maximum size.

* `gas`: This section sets the limits on the amount of gas that a block can consume. Gas, in the context of blockchain, is an indicator of computational work. The limits on underload, soft and hard limits work the same as for size in bytes.

* `lt_delta`: This section sets the limits on the difference in logical time between the first and last transaction. Logical time is a concept used in the TON Blockchain for ordering events. The limits on underload, soft and hard limits work the same as for size in bytes and gas.

<Aside>
  If a shard has insufficient load and there is an intention to merge with a neighboring shard, the `soft_limit` indicates a threshold. When this threshold is exceeded, internal messages will stop being processed, while external messages will still be handled. External messages will continue to be processed until the total reaches a limit that is equal to half the sum of the `soft_limit` and `hard_limit`, or `(soft_limit + hard_limit) / 2`.
</Aside>

[Parameter #22 on mainnet](https://tonviewer.com/config#22) | [Parameter #23 on mainnet](https://tonviewer.com/config#23)

## Param 24 and 25: message price

Parameter 24 represents the configuration for the cost of sending messages in the masterchain of the TON Blockchain.

Parameter 25 represents the configuration for the cost of sending messages in all other cases.

### Configuration parameters defining the costs of forwarding

* `lump_price`: This parameter means the base price for forwarding a message, regardless of its size or complexity.

* `bit_price`: This parameter represents the cost per bit of message forwarding.

* `cell_price`: This parameter reflects the cost of forwarding a message per cell. A cell is the basic unit of data storage on the TON Blockchain.

* `ihr_price_factor`: This is a factor used to calculate the cost of immediate hypercube routing (IHR).

<Aside>
  IHR is a method of message delivery in the TON Blockchain network, where messages are sent directly to the recipient's shardchain.
</Aside>

* `first_frac`: This parameter defines the fraction of the remaining amount that will be used for the first transition along the message route.

* `next_frac`: This parameter defines the fraction of the remaining amount that will be used for subsequent transitions along the message route.

[Parameter #24 on mainnet](https://tonviewer.com/config#24) | [Parameter #25 on mainnet](https://tonviewer.com/config#25)

## Param 28: catchain config

This parameter provides the configuration for the `Catchain` protocol in the TON Blockchain. `Catchain` is the lowest-level consensus protocol used in the TON to achieve agreement among validators.

### Configuration parameters

* `flags`: A general field that can be used to set various binary parameters. In this case, it equals 0, which means that no specific flags are set.

* `shuffle_mc_validators`: A Boolean value indicating whether to shuffle the masterchain validators or not. If this parameter is set to 1, the validators will be shuffled; otherwise, they will not.

* `mc_catchain_lifetime`: The lifetime of masterchain's `Catchain` groups in seconds.

* `shard_catchain_lifetime`: The lifetime of shardchain's `Catchain` groups in seconds.

* `shard_validators_lifetime`: The lifetime of a shardchain's validators group in seconds.

* `shard_validators_num`: The number of validators in each shardchain validation group.

[Parameter #28 on mainnet](https://tonviewer.com/config#28)

## Param 29: consensus config

This parameter provides the configuration for the consensus protocol above `Catchain` ([Param 28](#param-28)) in the TON Blockchain. The consensus protocol is a crucial component of a blockchain network, and it ensures that all nodes agree on the state of the distributed ledger.

### Configuration parameters

* `flags`: A general field that can be used to set various binary parameters.

* `new_catchain_ids`: A Boolean value indicating whether to generate new `Catchain` identifiers.

* `round_candidates`: The number of candidates to be considered in each round of the consensus protocol.

* `next_candidate_delay_ms`: The delay in milliseconds before the right to generate a block candidate passes to the next validator.

* `consensus_timeout_ms`: The timeout for block consensus in milliseconds.

* `fast_attempts`: The number of "fast" attempts to reach consensus.

* `attempt_duration`: The duration of each attempt at agreement, in seconds.

* `catchain_max_deps`: The maximum number of dependencies of a Catchain block.

* `max_block_bytes`: The maximum size of a block in bytes.

* `max_collated_bytes`: The maximum size of serialized block correctness proofs in bytes.

* `proto_version`: The protocol version.

* `catchain_max_blocks_coeff`: The coefficient limiting the rate of block generation in `Catchain`, [description](https://github.com/ton-blockchain/ton/blob/master/doc/catchain-dos.md).

For up-to-date values, see [https://tonviewer.com/config](https://tonviewer.com/config).

[Parameter #29 on mainnet](https://tonviewer.com/config#29)

## Param 31: fee-exempt contracts

This parameter represents the configuration of smart contract addresses from which no fees are charged for either gas or storage, and where **tick-tock** transactions can be created. The list usually includes governance contracts. The parameter is presented as a binary tree structure — a tree (HashMap 256), where the keys are a 256-bit representation of the address. Only addresses in the masterchain can be present in this list.

[Parameter #31 on mainnet](https://tonviewer.com/config#31)

## Param 32, 34, and 36: validator lists

Lists of validators from the previous (32), current (34), and next (36) rounds. Parameter 36 is set from the end of the elections until the start of the round.

### Configuration parameters

* `cur_validators`: This is the current list of validators. Validators are typically responsible for verifying transactions in a blockchain network.

* `utime_since` and `utime_until`: These parameters provide the time period during which these validators are active.

* `total` and `main`: These parameters provide the total number of validators and the number of validators validating the masterchain in the network.

* `total_weight`: This adds up the weights of the validators.

* `list`: A list of validators in the tree format `id->validator-data`: `validator_addr`, `public_key`, `weight`, `adnl_addr`: These parameters provide details about each validator - their 256-bit addresses in the masterchain, public key, weight, ADNL address (the address used at the network level of the TON).

[Parameter #32 on mainnet](https://tonviewer.com/config#32) | [Parameter #34 on mainnet](https://tonviewer.com/config#34) | [Parameter #36 on mainnet](https://tonviewer.com/config#36)

## Param 40: misbehavior punishment

This parameter defines the structure of the configuration for punishment for improper behavior (non-validation). In the absence of the parameter, the default fine size is 101 Toncoin.

### Configuration parameters

`MisbehaviourPunishmentConfig`: This data structure defines how improper behavior in the system is punished.

It contains several fields:

* `default_flat_fine`: This part of the fine does not depend on the stake size.

* `default_proportional_fine`: This part of the fine is proportional to the validator's stake size.

* `severity_flat_mult`: This is the multiplier applied to the `default_flat_fine` value for significant violations by the validator.

* `severity_proportional_mult`: This is the multiplier applied to the `default_proportional_fine` value for significant violations by the validator.

* `unpunishable_interval`: This parameter represents the period during which offenders are not punished to eliminate temporary network problems or other anomalies.

* `long_interval`, `long_flat_mult`, `long_proportional_mult`: These parameters define a "long" period of time and multipliers for flat and proportional fines for improper behavior.

* `medium_interval`, `medium_flat_mult`, `medium_proportional_mult`: Similarly, they define a "medium" period of time and multipliers for flat and proportional fines for improper behavior.

[Parameter #40 on mainnet](https://tonviewer.com/config#40)

## Param 43: account and message limits

This parameter relates to the size limits and other features of accounts and messages.

### Configuration parameters

* `max_msg_bits`: Maximum message size in bits.

* `max_msg_cells`: Maximum number of cells (a form of storage unit) a message can occupy.

* `max_library_cells`: Maximum number of cells that can be used for library cells.

* `max_vm_data_depth`: Maximum cell depth in messages and account state.

* `max_ext_msg_size`: Maximum external message size in bits.

* `max_ext_msg_depth`: Maximum external message depth. This could refer to the depth of the data structure within the message.

* `max_acc_state_cells`: Maximum number of cells that an account state can occupy.

* `max_acc_state_bits`: Maximum account state size in bits.

If absent, the default parameters are taken:

* `max_size` = 65535

* `max_depth` = 512

* `max_msg_bits` = 1 \<\< 21

* `max_msg_cells` = 1 \<\< 13

* `max_library_cells` = 1000

* `max_vm_data_depth` = 512

* `max_acc_state_cells` = 1 \<\< 16

* `max_acc_state_bits` = (1 \<\< 16) \* 1023

<Aside>
  You can view more details about the standard parameters [here](https://github.com/ton-blockchain/ton/blob/fc9542f5e223140fcca833c189f77b1a5ae2e184/crypto/block/mc-config.h#L379) in the source code.
</Aside>

[Parameter #43 on mainnet](https://tonviewer.com/config#43)

## Param 44: suspended addresses

This parameter defines the list of suspended addresses, which cannot be initialized until `suspended_until`. It only applies to yet uninitiated accounts. This is a measure for stabilizing the tokenomics (limiting early miners). If not set, there are no limitations. Each address is represented as an end node in this tree, and the tree-like structure allows efficient checking of whether an address is in the list.

<Aside>
  The stabilization of the tokenomics is further described in the [official report](https://t.me/tonblockchain/178) of the `@tonblockchain` Telegram channel.
</Aside>

[Parameter #44 on mainnet](https://tonviewer.com/config#44)

## Param 45: precompiled contracts

The list of precompiled contracts is stored in the masterchain config:

```tlb theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
precompiled_smc#b0 gas_usage:uint64 = PrecompiledSmc;
precompiled_contracts_config#c0 list:(HashmapE 256 PrecompiledSmc) = PrecompiledContractsConfig;
_ PrecompiledContractsConfig = ConfigParam 45;
```

More details about precompiled contracts are on [this page](/foundations/precompiled).

[Parameter #45 on mainnet](https://tonviewer.com/config#45)

## Param 71 - 73: outbound bridges

This parameter pertains to bridges for wrapping Toncoin in other networks:

* ETH-TON **(71)**

* BNB-TON **(72)**

* Polygon-TON **(73)**

### Configuration parameters

* `bridge_address`: This is the bridge contract address that accepts TON to issue wrapped Toncoin in other networks.

* `oracle_multisig_address`: This is the bridge management wallet address. A multisig wallet is a type of digital wallet that requires signatures from multiple parties to authorize a transaction. It is often used to increase security. The oracles act as the parties.

* `oracles`: List of oracles in the form of a tree `id->address`

* `external_chain_address`: This is the bridge contract address in the corresponding external blockchain.

[Parameter #71 on mainnet](https://tonviewer.com/config#71) | [Parameter #72 on mainnet](https://tonviewer.com/config#72) | [Parameter #73 on mainnet](https://tonviewer.com/config#73)

## Param 79, 81, and 82: inbound bridges

This parameter relates to bridges for wrapping tokens from other networks into tokens on the TON network:

* ETH-TON **(79)**

* BNB-TON **(81)**

* Polygon-TON **(82)**

### Configuration parameters

* `bridge_address` and `oracles_address`: These are the blockchain addresses of the bridge and the bridge management contract (oracles multisig), respectively.

* `oracles`: List of oracles in the form of a tree `id->address`

* `state_flags`: State flag. This parameter is responsible for enabling/disabling separate bridge functions.

* `prices`: This parameter contains a list or dictionary of prices for different operations or fees associated with the bridge, such as `bridge_burn_fee`, `bridge_mint_fee`, `wallet_min_tons_for_storage`, `wallet_gas_consumption`, `minter_min_tons_for_storage`, `discover_gas_consumption`.

* `external_chain_address`: The bridge contract address in another blockchain.

[Parameter #79 on mainnet](https://tonviewer.com/config#79) | [Parameter #81 on mainnet](https://tonviewer.com/config#81) | [Parameter #82 on mainnet](https://tonviewer.com/config#82)

## Negative parameters

<Aside>
  Validators enforce TL-B validity only for configuration parameters with non-negative indices. Values with negative indices are not validated against a specific `ConfigParam i` type. See the explanation in [Configuration parameters](/foundations/config) section.
</Aside>

## Next steps

After thoroughly reviewing this article, it is highly recommended that you dedicate time to a more in-depth study of the following documents:

* The original descriptions are present, but they may be limited, in the documents:
  * [The Open Network Whitepaper](/foundations/whitepapers/ton)
  * [Telegram Open Network Blockchain](/foundations/whitepapers/tblkch)

* Source code:
  * [`mc-config.h`](https://github.com/ton-blockchain/ton/blob/fc9542f5e223140fcca833c189f77b1a5ae2e184/crypto/block/mc-config.h)
  * [`block.tlb`](https://github.com/ton-blockchain/ton/blob/master/crypto/block/block.tlb)
