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

Improve fee and script budget calculation in ImpTest fixup #4784

Open
teodanciu opened this issue Dec 6, 2024 · 0 comments
Open

Improve fee and script budget calculation in ImpTest fixup #4784

teodanciu opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@teodanciu
Copy link
Contributor

The script budget (set in the redeemers) depends on the value of the fee, which in turn depends on the value of the budget.

The current solution (implemented in #4766) is to first compute the fee, maximizing it with respect to the budget (so assuming the maximum budget), then computing the real budget, with a previously computed more realistic fee. Unfortunately this is not precisely enough in some cases, so it also adds a 10% to the fee as a margin - because in some cases the required fee would still go over.

A more elegant and reliable way to satisfy this circular dependency between redeemers and fee would be to find a fixed point by calling fixup functionality until the transaction stops changing. This would require some refactoring of the fixup (one idea: making the fixup idempotent).

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

No branches or pull requests

1 participant