mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
* Remove gas_prices_v3, enable new gas limits by GlobalVersion = 5 * Change final date for higher gas limit --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
2.1 KiB
2.1 KiB
Global versions
Global version is a parameter specified in ConfigParam 8 (block.tlb).
Various features are enabled depending on the global version.
Version 4
New TVM instructions
PREVMCBLOCKS,PREVKEYBLOCKGLOBALIDHASHEXT(A)(R)ECRECOVERSENDMSGRUNVM,RUNVMXGASCONSUMEDRIST255_...instructionsBLS_...instructionsP256_CHKSIGNS,P256_CHKSIGNU
Division
Division instruction can add a number to the
intermediate value before division (e.g. (xy+w)/z).
Stack operations
- Arguments of
PICK,ROLL,ROLLREV,BLKSWX,REVX,DROPX,XCHGX,CHKDEPTH,ONLYTOPX,ONLYXare now unlimited. ROLL,ROLLREV,BLKSWX,REVX,ONLYTOPXconsume more gas when arguments are big.
c7 tuple
c7 tuple extended from 10 to 14 elements:
- 10: code of the smart contract.
- 11: value of the incoming message.
- 12: fees collected in the storage phase.
- 13: information about previous blocks.
Action phase
- If "send message" action fails, the account is required to pay for processing cells of the message.
- Flag +16 in actions "Send message", "Reserve", "Change library" causes bounce if action fails.
Storage phase
- Unpaid storage fee is now saved to
due_payment
Version 5
Version 5 enables higher gas limits for special contracts.
- Gas limit for all transactions on special contracts is set to
special_gas_limitfromConfigParam 20(which is 35M at the moment of writing). Previously only ticktock transactions had this limit, while ordinary transactions could use up togas_limitgas (1M). - Gas usage of special contracts is not taken into account when checking block limits. This allows keeping masterchain block limits low while having high gas limits for elector.
- Gas limit on
EQD_v9j1rlsuHHw2FIhcsCFFSD367ldfDdCKcsNmNpIRzUluis increased tospecial_gas_limit * 2until 2024-02-29. See this post for details.