Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper Dynamic Fee calculation #2569

Open
arturrez opened this issue Jan 22, 2025 · 0 comments
Open

proper Dynamic Fee calculation #2569

arturrez opened this issue Jan 22, 2025 · 0 comments

Comments

@arturrez
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog 🗄️
Development

No branches or pull requests

1 participant