Gas tracker optimization - #7420
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/supernova-async-exec #7420 +/- ##
==========================================================
Coverage 77.45% 77.46%
==========================================================
Files 869 869
Lines 118182 118237 +55
==========================================================
+ Hits 91540 91587 +47
- Misses 20628 20635 +7
- Partials 6014 6015 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // if already computed, only store the new round | ||
| if gt.overEstimationFactor != noOverestimationFactor { | ||
| return | ||
| } |
There was a problem hiding this comment.
Just to keep in mind.
This logic assumes the overestimation factor is static and only needs to be computed once. But if in the future the overestimation factor becomes epoch-depended/dynamic then the gas tracker will never refresh the factor.
There was a problem hiding this comment.
that's correct
| } | ||
|
|
||
| // RoundConfirmed is called whenever a new round is confirmed | ||
| func (gt *gasTracker) RoundConfirmed(round uint64, _ uint64) { |
There was a problem hiding this comment.
in the end this will be called will on each round, even if it will not call gt.economicsFee.BlockCapacityOverestimationFactor() anymore after activation, it's not computational heavy so not sure if it's a performance improvement compared to the other implementation
how many times per round will computeGasProvided be called? if it's only once per round, it might not be an improvement
not a strong optinion though
There was a problem hiding this comment.
it was called once for each tx
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?