OnboardingNodesApplicationsAPIsContractsSmart contractsTolkTolk languageTVMTON Virtual MachineFoundationsBlockchain foundations

Blockchain limits

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

There are two sources of network parameter definitions:

  1. Blockchain config
  2. Node source code

Parameters defined in the source code provide default values, which may differ from the actual on-chain values. Check up-to-date blockchain parameters live in the explorers.

Message and transaction limits

NameDescriptionValueUnitsTypeDefined in
max_sizeMaximum external message size in bytes65535bytesuint32mc-config.h:392
max_depthMaximum external message depth512levelsuint16mc-config.h:393
max_msg_bitsMaximum message size in bits2097152bitsuint32mc-config.h:395
max_msg_cellsMaximum number of cells a message can occupy8192cellsuint32mc-config.h:396
max_vm_data_depthMaximum cell depth in messages and c4 and c5 registers512levelsuint16mc-config.h:398
max_actionsMaximum number of actions256countuint32transaction.h
max_library_cellsMaximum number of library cells1000cellsuint32mc-config.h:397
max_acc_state_cellsMaximum number of cells that an account state can occupy65536cellsuint32mc-config.h:400
max_acc_state_bitsMaximum account state size in bits67043328bitsuint32mc-config.h:401
max_acc_public_librariesMaximum number of public libraries per account256countuint32mc-config.h:402
max_total_msg_bitsMaximum aggregate bit size of messages in one transaction5242880bitsuint32mc-config.h:415
max_total_msg_cellsMaximum aggregate number of cells of messages in one transaction20480cellsuint32mc-config.h:416
out_msg_queue_size_hard_limitMaximum outbound message queue size18000messagesuint32mc-config.h:419
out_msg_queue_size_soft_limitQueue size above which all messages may be deferred12000messagesuint32mc-config.h:420

Config param 43 controls on-chain values of these parameters.

Gas and fee parameters

NameDescriptionValueUnitsTypeDefined in
free_stack_depthStack depth without gas consumption32stack entriesenum_valuevm.h:122
runvm_gas_priceVM start gas consumption40gas unitsenum_valuevm.h:124
flat_gas_limitGas below flat_gas_limit is provided at the price of flat_gas_price100gas unitsuint64param 21
flat_gas_priceCosts of launching the TON Virtual Machine40000nanogramsuint64param 21
gas_pricePrice of gas in the network in nanograms per 65536 gas units26214400nanogramsuint64param 21
special_gas_limitLimit on gas for special (system) contract transactions1000000gas unitsuint64param 21
gas_limitMaximum amount of gas per transaction1000000gas unitsuint64param 21
gas_creditGas credit for checking external messages10000gas unitsuint64param 21
block_gas_limitMaximum gas per block10000000gas unitsuint64param 21

Storage fees and limits

NameDescriptionValueUnitsTypeDefined in
freeze_due_limitStorage fees (nanograms) for contract freezing100000000nanogramsuint64param 21
delete_due_limitStorage fees (nanograms) for contract deletion1000000000nanogramsuint64param 21
bit_price_psStorage price for one bit for 65536 seconds1nanograms/bituint64param 18
cell_price_psStorage price for one cell for 65536 seconds500nanograms/celluint64param 18

Block size limits

NameDescriptionValueUnitsTypeDefined in
bytes_underloadBlock size limit for underload state131072bytesuint32param 23
bytes_soft_limitBlock size soft limit524288bytesuint32param 23
bytes_hard_limitAbsolute maximum block size in bytes1048576bytesuint32param 23
gas_underloadBlock gas limit for underload state2000000gas unitsuint32param 23
gas_soft_limitBlock gas soft limit10000000gas unitsuint32param 23
gas_hard_limitAbsolute maximum block gas20000000gas unitsuint32param 23
lt_delta_underloadLogical time delta limit for underload state1000lt unitsuint32param 23
lt_delta_soft_limitLogical time delta soft limit5000lt unitsuint32param 23
lt_delta_hard_limitAbsolute maximum logical time delta10000lt unitsuint32param 23

Message forwarding costs

NameDescriptionValueUnitsTypeDefined in
lump_priceBase price for message forwarding400000nanogramsuint64param 25
bit_priceCost per 65536 bits of message forwarding26214400nanograms/bituint64param 25
cell_priceCost per 65536 cells for message forwarding2621440000nanograms/celluint64param 25
ihr_factorFactor for immediate hypercube routing cost98304factoruint32param 25
first_fracFraction for first transition in message route21845fractionuint32param 25
next_fracFraction for subsequent transitions in message route21845fractionuint32param 25

Masterchain specific parameters

NameDescriptionValueUnitsTypeDefined in
mc_bit_price_psStorage price for one bit for 65536 seconds1000nanograms/bituint64param 18
mc_cell_price_psStorage price for one cell for 65536 seconds500000nanograms/celluint64param 18
mc_flat_gas_limitGas below flat_gas_limit on masterchain100gas unitsuint64param 20
mc_flat_gas_priceVM launch cost on masterchain1000000nanogramsuint64param 20
mc_gas_priceGas price on masterchain655360000nanogramsuint64param 20
mc_special_gas_limitSpecial contract gas limit on masterchain70000000gas unitsuint64param 20
mc_gas_limitMaximum gas per transaction on masterchain1000000gas unitsuint64param 20
mc_gas_creditGas credit for checking external messages10000gas unitsuint64param 20
mc_block_gas_limitMaximum gas per masterchain block2500000gas unitsuint64param 20
mc_freeze_due_limitStorage fees for contract freezing100000000nanogramsuint64param 20
mc_delete_due_limitStorage fees for contract deletion1000000000nanogramsuint64param 20
mc_bytes_underloadBlock size limit for underload state131072bytesuint32param 22
mc_bytes_soft_limitBlock size soft limit524288bytesuint32param 22
mc_bytes_hard_limitAbsolute maximum block size in bytes1048576bytesuint32param 22
mc_gas_underloadBlock gas limit for underload state200000gas unitsuint32param 22
mc_gas_soft_limitBlock gas soft limit1000000gas unitsuint32param 22
mc_gas_hard_limitAbsolute maximum block gas2500000gas unitsuint32param 22
mc_lump_priceBase price for message forwarding10000000nanogramsuint64param 24
mc_bit_priceCost per 65536 bits of message forwarding655360000nanograms/bituint64param 24
mc_cell_priceCost per 65536 cells for message forwarding65536000000nanograms/celluint64param 24
mc_ihr_factorFactor for immediate hypercube routing cost98304factoruint32param 24
mc_first_fracFraction for first transition in message route21845fractionuint32param 24
mc_next_fracFraction for subsequent transitions in route21845fractionuint32param 24
mc_lt_delta_underloadLogical time delta limit for underload state1000lt unitsuint32param 22
mc_lt_delta_soft_limitLogical time delta soft limit5000lt unitsuint32param 22
mc_lt_delta_hard_limitAbsolute maximum logical time delta10000lt unitsuint32param 22
mc_catchain_lifetimemasterchain catchain groups lifetime in seconds250secondsuint32param 28

Validator parameters

NameDescriptionValueUnitsTypeDefined in
shard_catchain_lifetimeshardchain catchain groups lifetime in seconds250secondsuint32param 28
shard_validators_lifetimeshardchain validators group lifetime in seconds1000secondsuint32param 28
shard_validators_numNumber of validators in shardchain validation group23countuint32param 28
masterchain_block_feeReward for block creation1700000000nanogramsGramsparam 14
basechain_block_feeBasechain block fee1000000000nanogramsGramsparam 14

Time parameters

NameDescriptionValueUnitsTypeDefined in
utime_sinceInitial Unix timestamp for price application0secondsUnixTimeparam 18

On this page