avalanchego icon indicating copy to clipboard operation
avalanchego copied to clipboard

P-chain - introducing fees calculators

Open abi87 opened this issue 1 year ago • 0 comments

Why this should be merged

This PR introduced fees.Calculator which will calculate fees associated with a given transaction. fees.Calculator is pretty simple pre E upgrade, but will be upgraded in next PRs to meter tx complexity (across multiple fee dimensions) once E upgrade activates.

How this works

  • Pull all static config to fee package where fee.Calculator is defined
  • Introduce the static fee calculator
  • Added unit tests to check static fees applied in different forks (which is the main reason the the LOC of this PR)

How this was tested

CI

abi87 avatar Feb 02 '24 08:02 abi87