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

Use max_fee policy to charge user #665

Closed
MitchTurner opened this issue Jan 25, 2024 · 4 comments · Fixed by #685
Closed

Use max_fee policy to charge user #665

MitchTurner opened this issue Jan 25, 2024 · 4 comments · Fixed by #685
Assignees

Comments

@MitchTurner
Copy link
Member

No description provided.

@MitchTurner
Copy link
Member Author

This was on the Miro board, but I'm not sure what it means :P

@xgreenx
Copy link
Collaborator

xgreenx commented Feb 12, 2024

The current codebase converts max_gas into max_fee and deducts this amount from available balances.
image

It was okay to do because gas_price was statically defined by the transaction itself. But in a new module, since the base gas price is dynamic, the max_fee based on the max_gas is dynamic too. Instead of using this dynamic value, we need to use max_fee defined by the user in the policies if it is available.

@MitchTurner
Copy link
Member Author

Are we keeping script_gas_limit? I'm still confused about the relationship between gas limit and max_fee.

@Voxelot
Copy link
Member

Voxelot commented Feb 22, 2024

yes we need to keep script_gas_limit as a way for users to budget how much of their fee goes into script execution vs witness data etc

@MitchTurner MitchTurner changed the title Use max_fee to charge user Use max_fee policy to charge user Feb 22, 2024
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 a pull request may close this issue.

3 participants