Skip to content

Commit 1d7e93f

Browse files
Blockchain limits page (#1139)
* Added BlockChain limits page * Added BlockChain limits * upd * disscussion resolve & cspell
1 parent 6392068 commit 1d7e93f

File tree

3 files changed

+129
-2
lines changed

3 files changed

+129
-2
lines changed

cspell.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"name":"examples",
2525
"path":"./src/grammar/examples-dictionary.txt"
26-
},
26+
}
2727
],
2828
"words": [
2929
"ADNL",
@@ -119,6 +119,8 @@
119119
"Tonhub",
120120
"Tonkeeper",
121121
"Tonkey",
122+
"Tonviewer",
123+
"Tonscan",
122124
"Underload",
123125
"Uninit",
124126
"WAGMI",
@@ -258,6 +260,7 @@
258260
"randomizer",
259261
"reindex",
260262
"respecifying",
263+
"runvm",
261264
"runvmcode",
262265
"seamus",
263266
"seck256r1",
@@ -299,6 +302,7 @@
299302
"underload",
300303
"underloaded",
301304
"unixtime",
305+
"utime",
302306
"visio",
303307
"Visio",
304308
"votings",
@@ -370,6 +374,6 @@
370374
"i18n",
371375
".husky",
372376
"3rd/*",
373-
".github/*",
377+
".github/*"
374378
]
375379
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# TON blockchain limits
2+
3+
This document contains the current limits and metrics used in the TON blockchain.
4+
5+
:::info
6+
You can check all the blockchain parameters live in the explorer:[Tonviewer](https://tonviewer.com/config) or [Tonscan](https://tonscan.org/config).
7+
8+
Parameters defined in the code can be found in the [source code repository](https://github.com/ton-blockchain/ton).
9+
:::
10+
11+
## Message and transaction limits
12+
13+
<!-- &nbsp; represents a non-breaking space in HTML -->
14+
15+
| Name | Description | Value | Type | Defined&nbsp;in |
16+
| -------------------------- | -------------------------------------------------------- | -------- | ------ | --------------- |
17+
| `max_size` | Maximum external message size in bytes | 65535 | uint32 | mc-config.h |
18+
| `max_depth` | Maximum external message depth | 512 | uint16 | mc-config.h |
19+
| `max_msg_bits` | Maximum message size in bits | 2097152 | uint32 | mc-config.h |
20+
| `max_msg_cells` | Maximum number of cells a message can occupy | 8192 | uint32 | mc-config.h |
21+
| `max_vm_data_depth` | Maximum cell depth in messages and c4 & c5 registers | 512 | uint16 | mc-config.h |
22+
| `max_actions` | Maximum amount of actions | 256 | uint32 | transaction.h |
23+
| `max_library_cells` | Maximum number of library cells in library | 1000 | uint32 | mc-config.h |
24+
| `max_acc_state_cells` | Maximum number of cells that an account state can occupy | 65536 | uint32 | mc-config.h |
25+
| `max_acc_state_bits` | Maximum account state size in bits | 67043328 | uint32 | cells x size |
26+
| `max_acc_public_libraries` | Maximum amount of public libraries for account | 256 | uint32 | mc-config.h |
27+
28+
## Gas and fee parameters
29+
30+
| Name | Description | Value | Type | Defined&nbsp;in |
31+
| ------------------- | ------------------------------------------------------------------- | -------- | ---------- | --------------- |
32+
| `free_stack_depth` | Stack depth without gas consumption | 32 | enum_value | vm.h |
33+
| `runvm_gas_price` | VM start gas consumption | 40 | enum_value | vm.h |
34+
| `flat_gas_limit` | Gas below `flat_gas_limit` is provided at price of `flat_gas_price` | 100 | uint64 | config21 |
35+
| `flat_gas_price` | Costs of launching the TON Virtual Machine | 40000 | uint64 | config21 |
36+
| `gas_price` | Price of gas in the network in nanotons per 65536 gas units | 26214400 | uint64 | config21 |
37+
| `special_gas_limit` | Limit on gas for special (system) contract transactions | 1000000 | uint64 | config21 |
38+
| `gas_limit` | Maximum amount of gas per transaction | 1000000 | uint64 | config21 |
39+
| `gas_credit` | Gas credit for checking external messages | 10000 | uint64 | config21 |
40+
| `block_gas_limit` | Maximum gas per block | 10000000 | uint64 | config21 |
41+
42+
## Storage fees and limits
43+
44+
| Name | Description | Value | Type | Defined&nbsp;in |
45+
| ------------------ | -------------------------------------------- | ---------- | ------ | --------------- |
46+
| `freeze_due_limit` | Storage fees (nanoTON) for contract freezing | 100000000 | uint64 | config21 |
47+
| `delete_due_limit` | Storage fees (nanoTON) for contract deletion | 1000000000 | uint64 | config21 |
48+
| `bit_price_ps` | Storage price for one bit for 65536 seconds | 1 | uint64 | config18 |
49+
| `cell_price_ps` | Storage price for one cell for 65536 seconds | 500 | uint64 | config18 |
50+
51+
## Block size limits
52+
53+
| Name | Description | Value | Type | Defined&nbsp;in |
54+
| --------------------- | -------------------------------------------- | -------- | ------ | --------------- |
55+
| `bytes_underload` | Block size limit for underload state | 131072 | uint32 | config23 |
56+
| `bytes_soft_limit` | Block size soft limit | 524288 | uint32 | config23 |
57+
| `bytes_hard_limit` | Absolute maximum block size in bytes | 1048576 | uint32 | config23 |
58+
| `gas_underload` | Block gas limit for underload state | 2000000 | uint32 | config23 |
59+
| `gas_soft_limit` | Block gas soft limit | 10000000 | uint32 | config23 |
60+
| `gas_hard_limit` | Absolute maximum block gas | 20000000 | uint32 | config23 |
61+
| `lt_delta_underload` | Logical time delta limit for underload state | 1000 | uint32 | config23 |
62+
| `lt_delta_soft_limit` | Logical time delta soft limit | 5000 | uint32 | config23 |
63+
| `lt_delta_hard_limit` | Absolute maximum logical time delta | 10000 | uint32 | config23 |
64+
65+
## Message forwarding costs
66+
67+
| Name | Description | Value | Type | Defined&nbsp;in |
68+
| ------------ | ---------------------------------------------------- | ---------- | ------ | --------------- |
69+
| `lump_price` | Base price for message forwarding | 400000 | uint64 | config25 |
70+
| `bit_price` | Cost per 65536 bit of message forwarding | 26214400 | uint64 | config25 |
71+
| `cell_price` | Cost per 65536 cells of message forwarding | 2621440000 | uint64 | config25 |
72+
| `ihr_factor` | Factor for immediate hypercube routing cost | 98304 | uint32 | config25 |
73+
| `first_frac` | Fraction for first transition in message route | 21845 | uint32 | config25 |
74+
| `next_frac` | Fraction for subsequent transitions in message route | 21845 | uint32 | config25 |
75+
76+
## MasterChain specific parameters
77+
78+
| Name | Description | Value | Type | Defined&nbsp;in |
79+
| ------------------------ | ----------------------------------------------- | ----------- | ------ | --------------- |
80+
| `mc_bit_price_ps` | Storage price for one bit for 65536 seconds | 1000 | uint64 | config18 |
81+
| `mc_cell_price_ps` | Storage price for one cell for 65536 seconds | 500000 | uint64 | config18 |
82+
| `mc_flat_gas_limit` | Gas below `flat_gas_limit` on MasterChain | 100 | uint64 | config20 |
83+
| `mc_flat_gas_price` | VM launch cost on MasterChain | 1000000 | uint64 | config20 |
84+
| `mc_gas_price` | Gas price on MasterChain | 655360000 | uint64 | config20 |
85+
| `mc_special_gas_limit` | Special contract gas limit on MasterChain | 70000000 | uint64 | config20 |
86+
| `mc_gas_limit` | Maximum gas per transaction on MasterChain | 1000000 | uint64 | config20 |
87+
| `mc_gas_credit` | Gas credit for checking external messages | 10000 | uint64 | config20 |
88+
| `mc_block_gas_limit` | Maximum gas per MasterChain block | 2500000 | uint64 | config20 |
89+
| `mc_freeze_due_limit` | Storage fees for contract freezing | 100000000 | uint64 | config20 |
90+
| `mc_delete_due_limit` | Storage fees for contract deletion | 1000000000 | uint64 | config20 |
91+
| `mc_bytes_underload` | Block size limit for underload state | 131072 | uint32 | config22 |
92+
| `mc_bytes_soft_limit` | Block size soft limit | 524288 | uint32 | config22 |
93+
| `mc_bytes_hard_limit` | Absolute maximum block size in bytes | 1048576 | uint32 | config22 |
94+
| `mc_gas_underload` | Block gas limit for underload state | 200000 | uint32 | config22 |
95+
| `mc_gas_soft_limit` | Block gas soft limit | 1000000 | uint32 | config22 |
96+
| `mc_gas_hard_limit` | Absolute maximum block gas | 2500000 | uint32 | config22 |
97+
| `mc_lump_price` | Base price for message forwarding | 10000000 | uint64 | config24 |
98+
| `mc_bit_price` | Cost per 65536 bit of message forwarding | 655360000 | uint64 | config24 |
99+
| `mc_cell_price` | Cost per 65536 cells of message forwarding | 65536000000 | uint64 | config24 |
100+
| `mc_ihr_factor` | Factor for immediate hypercube routing cost | 98304 | uint32 | config24 |
101+
| `mc_first_frac` | Fraction for first transition in message route | 21845 | uint32 | config24 |
102+
| `mc_next_frac` | Fraction for subsequent transitions in route | 21845 | uint32 | config24 |
103+
| `mc_lt_delta_underload` | Logical time delta limit for underload state | 1000 | uint32 | config22 |
104+
| `mc_lt_delta_soft_limit` | Logical time delta soft limit | 5000 | uint32 | config22 |
105+
| `mc_lt_delta_hard_limit` | Absolute maximum logical time delta | 10000 | uint32 | config22 |
106+
| `mc_catchain_lifetime` | MasterChain catchain groups lifetime in seconds | 250 | uint32 | config28 |
107+
108+
## Validator parameters
109+
110+
| Name | Description | Value | Type | Defined&nbsp;in |
111+
| --------------------------- | --------------------------------------------------- | ---------- | ------ | --------------- |
112+
| `shard_catchain_lifetime` | ShardChain catchain groups lifetime in seconds | 250 | uint32 | config28 |
113+
| `shard_validators_lifetime` | ShardChain validators group lifetime in seconds | 1000 | uint32 | config28 |
114+
| `shard_validators_num` | Number of validators in ShardChain validation group | 23 | uint32 | config28 |
115+
| `masterchain_block_fee` | Reward for block creation | 1700000000 | Grams | config14 |
116+
| `basechain_block_fee` | BaseChain block fee | 1000000000 | Grams | config14 |
117+
118+
## Time parameters
119+
120+
| Name | Description | Value | Type | Defined&nbsp;in |
121+
| ------------- | -------------------------------------------- | ----- | -------- | --------------- |
122+
| `utime_since` | Initial Unix timestamp for price application | 0 | UnixTime | config18 |

sidebars/documentation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = [
3333
'v3/documentation/smart-contracts/contracts-specs/examples',
3434
],
3535
},
36+
'v3/documentation/smart-contracts/limits',
3637
{
3738
type: 'category',
3839
label: 'Message management',

0 commit comments

Comments
 (0)