avalanchego
avalanchego copied to clipboard
P-chain - introducing fees calculators
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 wherefee.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