January 2024 network updates and voting

January 2024 network updates and voting

Core

Changes in gas behavior

To date gas in transactions on special accounts was counted in block gas limit. Since Elector contract is one of the most gas intensive (requires 20m currently and up to 35m for 500 validators), it was necessary to keep masterchain block limits high: block gas limit is currently set to 37m. Usually it doesn't cause issues, however it leaves room for possibility to create "larger than wanted" block in masterchain and slow down blockrate: for reliable operation it is desirable to have block limits on the level that guarantee that blocks can be collated and verified much faster than network propagation time.


So to lower the limit for safety reasons it is proposed to not count gas on special account. It will allow both decrease block gas limit and keep Elector operational.


Second update

Change in gas counting is consensus critical and all nodes need simultaneously switch to new behavior. That is why such changes should be done through voting. Initially we decided to activate new behavior through voting for ConfigParameter 20, in particular, through setting new GasLimitsPrices constructor `gas_prices_v3`. These solution was chosen because ConfigParameter 20 contains `block_gas_limit` and need to be updated anyway.


However, thanks to Hipo developers and maintainers of ton.ts Tonwhales, it was found that migration to new config may require hurried maintenance in some smart contracts and dapps. To make transition more smooth and painless for everyone, it was decided to abandon initial plan and instead activate new behavior through change in ConfigParameter 8. This new plan required another update that is planned for January 25.


Voting

After network will be upgraded (to be prepared for voting) it will be proposed to validators to vote for following changes:

Config parameter 8

(capabilities version:5 capabilities:46)

instead of old

(capabilities version:4 capabilities:46)

This will activate new behavior

Config parameter 20 and Config parameter 22

(config_mc_gas_prices  (gas_flat_pfx flat_gas_limit:100 flat_gas_price:1000000    other:(gas_prices_ext gas_price:655360000 gas_limit:1000000 special_gas_limit:35000000 gas_credit:10000 block_gas_limit:2500000 freeze_due_limit:100000000 delete_due_limit:1000000000)))

instead of

(config_mc_gas_prices  (gas_flat_pfx flat_gas_limit:100 flat_gas_price:1000000 other:(gas_prices_ext gas_price:655360000 gas_limit:1000000 special_gas_limit:35000000 gas_credit:10000 block_gas_limit:37000000 freeze_due_limit:100000000 delete_due_limit:1000000000)))


and


(config_mc_block_limits  (block_limits    bytes:(param_limits underload:131072 soft_limit:524288 hard_limit:1048576)    gas:(param_limits underload:200000 soft_limit:1000000 hard_limit:2500000)    lt_delta:(param_limits underload:1000 soft_limit:5000 hard_limit:10000)))

instead of

(config_mc_block_limits (block_limits   bytes:(param_limits underload:131072 soft_limit:524288 hard_limit:1048576)   gas:(param_limits underload:2000000 soft_limit:2000000 hard_limit:37000000)   lt_delta:(param_limits underload:1000 soft_limit:5000 hard_limit:10000)))

  


This will decrease gas block limit.



@wallet

Alongside with changes for special accounts it is planned to temporarily increase gas limits on @wallet highload wallet. The reasons for this can be found in recent post.


Gas limit on this account will be increased to 2x of special_gas_limit till 29 February.


Why it is not possible to increase gas limits for everyone? Transaction execution requires computation time (and if tx take up significant space in block, also the bigger transaction the longer it will be to validate/approve block), so it need to be limited, to prevent that some transaction will stop or delay the network. That way it is impossible to increase gas for everyone to the level that will allow @wallet to withdraw funds: it will be unsafe due to possibility to craft tx that will work for so long, or build too big message/cell that it may even stop network. However, it is safer to increase gas limit on specific account because we know it's code and know that even with increased limits it will not generate unprocessable transaction.

Report Page