Refactor gas profiles to store call counts #8795
Labels
A-contract-runtime
Area: contract compilation and execution, virtual machines, etc
C-housekeeping
Category: Refactoring, cleanups, code quality
At the moment the
ProfileDataV3
stores the total consumed gas for each host function and action. This makes Compute Cost calculation harder than necessary because we need to divide the total consumed gas by the host function call before multiplying it by the corresponding compute cost.We could simplify this by instead storing the call count for each ExtCost inside the profile as it can be used to derive both resulting gas usage and compute usage.
Relatedly, we also store a counter
EXT_COSTS_COUNTER
alongsideGasCounter
for the use in parameter estimator. We should consider whether it should be merged directly intoGasCounter
to eliminate duplication with Profiles that we track anyway unconditionally.The text was updated successfully, but these errors were encountered: