# Blockchain limits (https://docs-orhepa2tm-ton-core-docs.vercel.app/llms/foundations/limits/content.md)



This document contains the current limits and configuration parameters used in the TON blockchain.

There are two sources of network parameter definitions: <br />

1. Blockchain config
2. Node source code

<Callout>
  You can check all the blockchain parameters live in the explorers: [Tonviewer](https://tonviewer.com/config) or [Tonscan](https://tonscan.org/config).

  Parameters defined in the code can be found in the [source code repository](https://github.com/ton-blockchain/ton).
</Callout>

## Message and transaction limits [#message-and-transaction-limits]

| Name                       | Description                                                | Value    | Units  | Type   | Defined in                                                                                                                             |
| -------------------------- | ---------------------------------------------------------- | -------- | ------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| `max_size`                 | Maximum external message size in bytes                     | 65535    | bytes  | uint32 | [`mc-config.h`:392](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L392) |
| `max_depth`                | Maximum external message depth                             | 512      | levels | uint16 | [`mc-config.h`:393](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L393) |
| `max_msg_bits`             | Maximum message size in bits                               | 2097152  | bits   | uint32 | [`mc-config.h`:395](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L395) |
| `max_msg_cells`            | Maximum number of cells a message can occupy               | 8192     | cells  | uint32 | [`mc-config.h`:396](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L396) |
| `max_vm_data_depth`        | Maximum cell depth in messages and `c4` and `c5` registers | 512      | levels | uint16 | [`mc-config.h`:398](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L398) |
| `max_actions`              | Maximum number of actions                                  | 256      | count  | uint32 | [`transaction.h`](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/transaction.h)      |
| `max_library_cells`        | Maximum number of library cells                            | 1000     | cells  | uint32 | [`mc-config.h`:397](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L397) |
| `max_acc_state_cells`      | Maximum number of cells that an account state can occupy   | 65536    | cells  | uint32 | [`mc-config.h`:400](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L400) |
| `max_acc_state_bits`       | Maximum account state size in bits                         | 67043328 | bits   | uint32 | [`mc-config.h`:401](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L401) |
| `max_acc_public_libraries` | Maximum number of public libraries per account             | 256      | count  | uint32 | [`mc-config.h`:402](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/block/mc-config.h#L402) |

## Gas and fee parameters [#gas-and-fee-parameters]

| Name                | Description                                                             | Value    | Units         | Type        | Defined in                                                                                                          |
| ------------------- | ----------------------------------------------------------------------- | -------- | ------------- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
| `free_stack_depth`  | Stack depth without gas consumption                                     | 32       | stack entries | enum\_value | [vm.h:120](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/vm/vm.h#L120) |
| `runvm_gas_price`   | VM start gas consumption                                                | 40       | gas units     | enum\_value | [vm.h:122](https://github.com/ton-blockchain/ton/blob/05bea13375448a401d8e07c6132b7f709f5e3a32/crypto/vm/vm.h#L122) |
| `flat_gas_limit`    | Gas below `flat_gas_limit` is provided at the price of `flat_gas_price` | 100      | gas units     | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `flat_gas_price`    | Costs of launching the TON Virtual Machine                              | 40000    | nanotons      | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `gas_price`         | Price of gas in the network in nanotons per 65536 gas units             | 26214400 | nanotons      | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `special_gas_limit` | Limit on gas for special (system) contract transactions                 | 1000000  | gas units     | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `gas_limit`         | Maximum amount of gas per transaction                                   | 1000000  | gas units     | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `gas_credit`        | Gas credit for checking external messages                               | 10000    | gas units     | uint64      | [config21](/llms/foundations/config/content.md)                                                          |
| `block_gas_limit`   | Maximum gas per block                                                   | 10000000 | gas units     | uint64      | [config21](/llms/foundations/config/content.md)                                                          |

## Storage fees and limits [#storage-fees-and-limits]

| Name               | Description                                   | Value      | Units         | Type   | Defined in                                                 |
| ------------------ | --------------------------------------------- | ---------- | ------------- | ------ | ---------------------------------------------------------- |
| `freeze_due_limit` | Storage fees (nanotons) for contract freezing | 100000000  | nanotons      | uint64 | [config21](/llms/foundations/config/content.md) |
| `delete_due_limit` | Storage fees (nanotons) for contract deletion | 1000000000 | nanotons      | uint64 | [config21](/llms/foundations/config/content.md) |
| `bit_price_ps`     | Storage price for one bit for 65536 seconds   | 1          | nanotons/bit  | uint64 | [config18](/llms/foundations/config/content.md)    |
| `cell_price_ps`    | Storage price for one cell for 65536 seconds  | 500        | nanotons/cell | uint64 | [config18](/llms/foundations/config/content.md)    |

## Block size limits [#block-size-limits]

| Name                  | Description                                  | Value    | Units     | Type   | Defined in                                                   |
| --------------------- | -------------------------------------------- | -------- | --------- | ------ | ------------------------------------------------------------ |
| `bytes_underload`     | Block size limit for underload state         | 131072   | bytes     | uint32 | [config23](/llms/foundations/config/content.md) |
| `bytes_soft_limit`    | Block size soft limit                        | 524288   | bytes     | uint32 | [config23](/llms/foundations/config/content.md) |
| `bytes_hard_limit`    | Absolute maximum block size in bytes         | 1048576  | bytes     | uint32 | [config23](/llms/foundations/config/content.md) |
| `gas_underload`       | Block gas limit for underload state          | 2000000  | gas units | uint32 | [config23](/llms/foundations/config/content.md) |
| `gas_soft_limit`      | Block gas soft limit                         | 10000000 | gas units | uint32 | [config23](/llms/foundations/config/content.md) |
| `gas_hard_limit`      | Absolute maximum block gas                   | 20000000 | gas units | uint32 | [config23](/llms/foundations/config/content.md) |
| `lt_delta_underload`  | Logical time delta limit for underload state | 1000     | lt units  | uint32 | [config23](/llms/foundations/config/content.md) |
| `lt_delta_soft_limit` | Logical time delta soft limit                | 5000     | lt units  | uint32 | [config23](/llms/foundations/config/content.md) |
| `lt_delta_hard_limit` | Absolute maximum logical time delta          | 10000    | lt units  | uint32 | [config23](/llms/foundations/config/content.md) |

## Message forwarding costs [#message-forwarding-costs]

| Name         | Description                                          | Value      | Units         | Type   | Defined in                                                    |
| ------------ | ---------------------------------------------------- | ---------- | ------------- | ------ | ------------------------------------------------------------- |
| `lump_price` | Base price for message forwarding                    | 400000     | nanotons      | uint64 | [config25](/llms/foundations/config/content.md) |
| `bit_price`  | Cost per 65536 bits of message forwarding            | 26214400   | nanotons/bit  | uint64 | [config25](/llms/foundations/config/content.md) |
| `cell_price` | Cost per 65536 cells for message forwarding          | 2621440000 | nanotons/cell | uint64 | [config25](/llms/foundations/config/content.md) |
| `ihr_factor` | Factor for immediate hypercube routing cost          | 98304      | factor        | uint32 | [config25](/llms/foundations/config/content.md) |
| `first_frac` | Fraction for first transition in message route       | 21845      | fraction      | uint32 | [config25](/llms/foundations/config/content.md) |
| `next_frac`  | Fraction for subsequent transitions in message route | 21845      | fraction      | uint32 | [config25](/llms/foundations/config/content.md) |

## Masterchain specific parameters [#masterchain-specific-parameters]

| Name                     | Description                                     | Value       | Units         | Type   | Defined in                                                    |
| ------------------------ | ----------------------------------------------- | ----------- | ------------- | ------ | ------------------------------------------------------------- |
| `mc_bit_price_ps`        | Storage price for one bit for 65536 seconds     | 1000        | nanotons/bit  | uint64 | [config18](/llms/foundations/config/content.md)       |
| `mc_cell_price_ps`       | Storage price for one cell for 65536 seconds    | 500000      | nanotons/cell | uint64 | [config18](/llms/foundations/config/content.md)       |
| `mc_flat_gas_limit`      | Gas below `flat_gas_limit` on masterchain       | 100         | gas units     | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_flat_gas_price`      | VM launch cost on masterchain                   | 1000000     | nanotons      | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_gas_price`           | Gas price on masterchain                        | 655360000   | nanotons      | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_special_gas_limit`   | Special contract gas limit on masterchain       | 70000000    | gas units     | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_gas_limit`           | Maximum gas per transaction on masterchain      | 1000000     | gas units     | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_gas_credit`          | Gas credit for checking external messages       | 10000       | gas units     | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_block_gas_limit`     | Maximum gas per masterchain block               | 2500000     | gas units     | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_freeze_due_limit`    | Storage fees for contract freezing              | 100000000   | nanotons      | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_delete_due_limit`    | Storage fees for contract deletion              | 1000000000  | nanotons      | uint64 | [config20](/llms/foundations/config/content.md)    |
| `mc_bytes_underload`     | Block size limit for underload state            | 131072      | bytes         | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_bytes_soft_limit`    | Block size soft limit                           | 524288      | bytes         | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_bytes_hard_limit`    | Absolute maximum block size in bytes            | 1048576     | bytes         | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_gas_underload`       | Block gas limit for underload state             | 200000      | gas units     | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_gas_soft_limit`      | Block gas soft limit                            | 1000000     | gas units     | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_gas_hard_limit`      | Absolute maximum block gas                      | 2500000     | gas units     | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_lump_price`          | Base price for message forwarding               | 10000000    | nanotons      | uint64 | [config24](/llms/foundations/config/content.md) |
| `mc_bit_price`           | Cost per 65536 bits of message forwarding       | 655360000   | nanotons/bit  | uint64 | [config24](/llms/foundations/config/content.md) |
| `mc_cell_price`          | Cost per 65536 cells for message forwarding     | 65536000000 | nanotons/cell | uint64 | [config24](/llms/foundations/config/content.md) |
| `mc_ihr_factor`          | Factor for immediate hypercube routing cost     | 98304       | factor        | uint32 | [config24](/llms/foundations/config/content.md) |
| `mc_first_frac`          | Fraction for first transition in message route  | 21845       | fraction      | uint32 | [config24](/llms/foundations/config/content.md) |
| `mc_next_frac`           | Fraction for subsequent transitions in route    | 21845       | fraction      | uint32 | [config24](/llms/foundations/config/content.md) |
| `mc_lt_delta_underload`  | Logical time delta limit for underload state    | 1000        | lt units      | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_lt_delta_soft_limit` | Logical time delta soft limit                   | 5000        | lt units      | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_lt_delta_hard_limit` | Absolute maximum logical time delta             | 10000       | lt units      | uint32 | [config22](/llms/foundations/config/content.md)  |
| `mc_catchain_lifetime`   | masterchain catchain groups lifetime in seconds | 250         | seconds       | uint32 | [config28](/llms/foundations/config/content.md)      |

## Validator parameters [#validator-parameters]

| Name                        | Description                                         | Value      | Units    | Type   | Defined in                                               |
| --------------------------- | --------------------------------------------------- | ---------- | -------- | ------ | -------------------------------------------------------- |
| `shard_catchain_lifetime`   | shardchain catchain groups lifetime in seconds      | 250        | seconds  | uint32 | [config28](/llms/foundations/config/content.md) |
| `shard_validators_lifetime` | shardchain validators group lifetime in seconds     | 1000       | seconds  | uint32 | [config28](/llms/foundations/config/content.md) |
| `shard_validators_num`      | Number of validators in shardchain validation group | 23         | count    | uint32 | [config28](/llms/foundations/config/content.md) |
| `masterchain_block_fee`     | Reward for block creation                           | 1700000000 | nanotons | Grams  | [config14](/llms/foundations/config/content.md)    |
| `basechain_block_fee`       | Basechain block fee                                 | 1000000000 | nanotons | Grams  | [config14](/llms/foundations/config/content.md)    |

## Time parameters [#time-parameters]

| Name          | Description                                  | Value | Units   | Type     | Defined in                                              |
| ------------- | -------------------------------------------- | ----- | ------- | -------- | ------------------------------------------------------- |
| `utime_since` | Initial Unix timestamp for price application | 0     | seconds | UnixTime | [config18](/llms/foundations/config/content.md) |
