release-notes/1_62/gas_changes.md
Sui v1.62 includes targeted gas schedule and metering fixes to more accurately account for the true execution cost and introduce a few new gas changes to reduce over-charging.
Dynamic field changes (largest behavioral impact)
Dynamic field operations now charge differently depending on cache status:
Additional execution-level adjustments
The following execution-level adjustments are being introduced:
MoveLoc is cheaper: We previously (incorrectly) charged proportionally to value size, even though no value is created. We now charge a constant amount.ReadRef is slightly more expensive: This creates value copies, which we now account for.We backtested several million transactions when examining these gas changes. Across a few million sampled transactions:
Looking at the distribution among affected transactions:
For most workloads, you will notice no change (only 5.7% are affected from several million transactions). If you do, it is more likely to be a cost decrease.
Your transactions may be more expensive if they do some or all of the following:
This is because first-time loads of uncached dynamic fields are now more expensive.
Your transactions should get cheaper if they do any of the following:
These now benefit from the cache-aware and “created in-transaction” discounts.
Most other instruction and stack-metering changes are modest, paving a path toward optimization in compilation. Over time, compiler work to prefer moving locals over copies wherever possible should allow the compiler to be able to take advantage of the reduced cost for MoveLoc that is introduced in these changes.