aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[storage_gas] implement customizable storage gas config

Open lightmark opened this issue 3 years ago • 0 comments

Description

We implement a customizable curve for storage-based gas base unit and map x <-[0, 10000] to y<-[0, 10000]. storage gas = min_gas + (max_gas - min_gas) * (current_usage / target_utilization)

The curve is a vector of point(x, y), both are basis points.

  1. curve's points' y value must be monotonically non-decreasing, and x values must be monotonically increasing.
  2. curve's points must start with a point of x = 0 and end with a point of x = 10000.

Test Plan

ut


This change is Reviewable

lightmark avatar Sep 02 '22 22:09 lightmark