-
Notifications
You must be signed in to change notification settings - Fork 1k
WIP: Rework gas mapping #9803
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
base: at/tx-credit
Are you sure you want to change the base?
WIP: Rework gas mapping #9803
Conversation
I tried to find the logic where in new frames the weight limit needs to be converted to a gas limit and then back into a weigh limit. For EVM it seems like both conversions are not implemented yet: For PVM I can't find the code for either conversion. Is this actually implemented in the compiler? |
All storage deposits deducted in a frame should be returned when the frame reverts. Is this the case? |
Correct. This will be a follow up PR with the "on chain gas"/
You mean they should be reverted? Yeah. This PR doesn't touch this logic. |
d3ed520
to
3d803a0
Compare
3d803a0
to
4d3a1f9
Compare
Sorry for the force push. This was the last one. I will now address the comments from #9740 with individual commits. |
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.
In line 1554 we must not call T::Currency::transfer
but charge_deposit
as every deposit should come from the hold/imbalance created in the preparation step of pallet-transaction-payment.
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.
Good catch. Fixed.
All GitHub workflows were cancelled due to failure one of the required jobs. |
Replacement of #9740.
Build on top of the new tx payment changes: #9780
Started a new PR because due to the rebase on top of the new tx payment changes this PR is substantially different and I don't want to invalidate the existing comments on #9740 which are not implemented, yet.
TODO
dry_run_eth_transact
eth_*
transactions. Otherwise they can set an arbitraryeffective_gas_price
. Probably using custom origins.pallet_revive
from consuming too much balance from the tx payment hold