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

Dynamic Fees - Introducing fees calculators #2619

Closed
wants to merge 12 commits into from

Conversation

abi87
Copy link
Contributor

@abi87 abi87 commented Jan 17, 2024

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

@abi87 abi87 self-assigned this Jan 17, 2024
@abi87 abi87 linked an issue Jan 17, 2024 that may be closed by this pull request
@abi87 abi87 changed the title Introducing fees calculators Dynamic Fees - Introducing fees calculators Jan 17, 2024
@@ -137,7 +137,7 @@ func TestNewImportTx(t *testing.T) {
},
),
sourceKeys: []*secp256k1.PrivateKey{sourceKey},
timestamp: env.config.BanffTime,
Copy link
Contributor Author

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

type Calculator struct {
// setup, to be filled before visitor methods are called
Config *config.Config
ChainTime time.Time
Copy link
Contributor Author

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

@abi87 abi87 force-pushed the introducing-fees-calculators branch from fe1e477 to fcf8fc2 Compare February 1, 2024 23:14
@abi87
Copy link
Contributor Author

abi87 commented Feb 6, 2024

Splitted into #2698 and #2700

@abi87 abi87 closed this Feb 6, 2024
@StephenButtolph StephenButtolph deleted the introducing-fees-calculators branch July 24, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Meter P-chain and X-chain execution cost
1 participant