aptos-foundation/AIPs

[AIP-84][Discussion][Retrospective] improving gas coverage

vgao1996 opened this issue · 0 comments

AIP Discussion

This proposal improves the VM's gas coverage by introducing a few new gas charges and limits. It is is served as retroactive as the issue addresses a security vulnerability.

  • Gas for Type creation
    • Bytecode instructions and other operations that perform type instantiations, such as vec_push<T>, will incur gas charges.
  • Gas & Limits for Dependencies
    • There will be limits on the total number of dependencies and the total size of dependencies (in bytes) a transaction could have.
    • Each dependency will also incur gas charges if directly or transitively referenced by a transaction.
    • Framework modules are excluded from such calculations.

These new charges enable us to reach 100% gas coverage, ensuring fair allocation of the network's computing resources and thus the security of the network.

Read more about it here: #426