[go: up one dir, main page]

EVM Kernel: Bump Etherlink's capacity to 8MGas/s

Part of L2-79

What

This commit increases the gas capacity of Etherlink to 8 MGas/s. It also meticulously adjusts the alpha parameter in the gas price calculation to effectively accommodate this new, higher throughput. Finally, it updates the node’s own gas price prediction logic to take account of this new limit.

Why

The prior capacity of 4 MGas/s had been identified as a critical bottleneck, actively limiting the network's overall throughput compared to its real performances. The new capacity (and derived target) is more aligned with the real performances of the system. The corresponding adjustment to the alpha parameter is crucial; it guarantees that the gas price remains both responsive and stable under the new operational capacity, effectively preventing any undesirable, excessive price fluctuations.

How

The CAPACITY constant, located in etherlink/kernel_latest/kernel/src/gas_price.rs, has been comprehensively updated from its previous value of 4,000,000 to the new 8,000,000. Concurrently, the ALPHA constant within the very same file has been proportionally decreased from 0.000000007 to 0.000000004. This dual modification is specifically designed to maintain the appropriate gas price dynamics relative to the substantially increased capacity. This strategic adjustment ensures the network is well-equipped to handle a significantly higher load while meticulously preserving the intended and stable behavior of the gas price mechanism.

In etherlink/bin_node/lib_dev/gas_price.ml, the gas_constants function has been updated to accept a version parameter. This modification enables the capacity used in gas price calculations to dynamically adjust based on the storage version. Specifically, for versions older than 36, the capacity remains at 4 MGas/s, while for version 36 (added in this commit to feature-gate the change) and above, it is set to 8 MGas/s. This ensures that the gas price prediction mechanism in the dev node aligns with the kernel's new capacity target.

Manually testing the MR

Check i haven’t forgotten something? 😅

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Letan

Merge request reports

Loading