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

Enforce dynamic fees #3246

Closed

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Jul 30, 2024

Why this should be merged

This is built on top of:

This adds the dynamic fee logic into P-chain block building and execution.

How this works

  1. When the time is advanced, the capacity is increased and the excess is decreased.
  2. After the time has been advanced, the fee calculator is created to charge the minimum fee based on the excess.
  3. The complexity of every transaction in the block is accumulated.
  4. The capacity is decreased and the excess is increased based on the accumulated complexity of the block.
    a. This will return an error (and cause block verification to fail) if the capacity would go negative.

How this was tested

  • TODO

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

Successfully merging this pull request may close these issues.

1 participant