-
Notifications
You must be signed in to change notification settings - Fork 669
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
Dynamic Fees - Introducing fees calculators #2619
Conversation
@@ -137,7 +137,7 @@ func TestNewImportTx(t *testing.T) { | |||
}, | |||
), | |||
sourceKeys: []*secp256k1.PrivateKey{sourceKey}, | |||
timestamp: env.config.BanffTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not make sense in the first place. We initialize the environment to to test Apricot fork
vms/avm/txs/fees/calculator.go
Outdated
type Calculator struct { | ||
// setup, to be filled before visitor methods are called | ||
Config *config.Config | ||
ChainTime time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while ChainTime is not strictly necessary here, we'll use it to check the active fork in next PRs. We keep ChainTime here so that we initialize it in this PR and we reduce diffs down the line
fe1e477
to
fcf8fc2
Compare
Why this should be merged
Dynamic fees will require measuring size of txs, signatures and other txs components. We introduce feeCalculator visitors as a structure where dynamic fees calculations will be carried out.
How this works
Introduced fee calculators visitors for P-chain and X-chain.
How this was tested
CI