Skip to content

proper Dynamic Fee calculation #2569

Open
@arturrez

Description

Goal

Currently CLI relies on static fee configuration to calc TX cost. This functionality is currently deprecated and removed from master avalanchego
It should switch to dynamic fee calculator

Assumptions and Scope

currently we see

network.GenesisParams().TxFeeConfig.StaticFeeConfig undefined (type "github.com/ava-labs/avalanchego/genesis".TxFeeConfig has no field or method StaticFeeConfig)

for the latest avalanchego

current usage through the code

fee := network.GenesisParams().TxFeeConfig.StaticFeeConfig.AddSubnetValidatorFee
fee := network.GenesisParams().TxFeeConfig.StaticFeeConfig.TxFee
fee += network.GenesisParams().TxFeeConfig.StaticFeeConfig.CreateBlockchainTxFee
fee += network.GenesisParams().TxFeeConfig.StaticFeeConfig.CreateSubnetTxFee
fee := network.GenesisParams().TxFeeConfig.StaticFeeConfig.AddPrimaryNetworkValidatorFee * uint64(len(hosts))
fee := network.GenesisParams().TxFeeConfig.StaticFeeConfig.AddPrimaryNetworkValidatorFee
 and etc

I've temporary added static fees in models for now, but it should be addressed soon as CLI current fee calculation is not correct

Example Usage

Requirements:

Current Limitations

Nice to Have, but Not Required

Open Questions

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status

      Backlog 🗄️

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions