You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Furthermore, the regression calculated on the benchmark data is discarded and not used when predicting prices; rather, we generate a new linear model by taking the first sorted point as the base and "worst-case scenario" data point as the slope. Generally, this model results in decently accurate costs at the lower end the input domain, but highly overestimated costs at the higher end of the input domain.
The other models (logarithmic and exponential) do not translate well into linear costs. At the same time, recent opcode benchmarks demonstrate that these types of functions are not modelled by any existing opcode and are thus defunct.
We outline goals of a desired gas pricing model:
A model that gives "reasonably" accurate gas cost predictions based on the benchmarks. The closer the line models the benchmarked data, the better
A model that leans towards overpricing costs rather than underpricing as a security measure against DoS exploits
A model that makes costs low enough to make the network attractive to users
Solution:
Standardize on what data is fed into benchmarks: Because data points have equal weight when calculating regressions, linear distance between points is most appropriate. Currently, the distance between data points is (arbitrarily) exponential, skewing the results.
Investigate the use of a different regressions to identify the type of function latent in the data: linear, quadratic, logarithmic, exponential, etc. Compare the regressions to find the best models: the best models will have a strong fit (i.e. a close-to-1 r-squared value).
Introduce different models of cost resolution based on the type of predictive model identified by comparing regressions.
The text was updated successfully, but these errors were encountered:
bvrooman
changed the title
Investigate approaches for improved linear modelling of predicted gas prices
Investigate approaches for improved modelling of predicted gas prices
Nov 27, 2023
Problem overview
Currently, the model for gas prices is determined by performing rudimentary checks on a linear regression:
benches/src/bin/collect.rs:
Furthermore, the regression calculated on the benchmark data is discarded and not used when predicting prices; rather, we generate a new linear model by taking the first sorted point as the base and "worst-case scenario" data point as the slope. Generally, this model results in decently accurate costs at the lower end the input domain, but highly overestimated costs at the higher end of the input domain.
The other models (logarithmic and exponential) do not translate well into linear costs. At the same time, recent opcode benchmarks demonstrate that these types of functions are not modelled by any existing opcode and are thus defunct.
We outline goals of a desired gas pricing model:
Solution:
The text was updated successfully, but these errors were encountered: