-
Notifications
You must be signed in to change notification settings - Fork 561
imp(evm): update move gas functions to a new file #1299
Conversation
* release: v0.17.0 changelog * rm newline * update link
res.Logs = types.NewLogsFromEth(receipt.Logs) | ||
res.GasUsed = receipt.GasUsed |
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.
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.
I see, so now hooks can increase the gas used, but it needs to be careful to not increase beyond the gas limit.
Then should we update the leftoverGas
?
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.
the main issue is that the gas used in the hooks is not considered in the transaction. Gas estimation would also need to be updated to reflect this change.
Not sure if it's worth it...
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.
yeah, precompiles has an RequiredGas
method though, which is better in this regard.
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.
@fedekunze increasing the gasUsed by how much gas was used during Post-Processing is out of scope of this PR and should be treated as an extra ticket.
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.
yup, agree
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1299 +/- ##
=======================================
Coverage 55.86% 55.86%
=======================================
Files 108 109 +1
Lines 10017 10022 +5
=======================================
+ Hits 5596 5599 +3
- Misses 4140 4142 +2
Partials 281 281
|
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.
Is this something that we still think is needed? Based on the conversation https://github.com/evmos/ethermint/pull/1299/files#r953968127
temporaryGasUsed := msg.Gas() - leftoverGas | ||
|
||
// gasUsed = max(gasUsed, gasLimit * minGasMultiplier) |
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.
Remove comment
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.
@fedekunze moving the gas functions LGTM
It sounds like there are more changes required to account for gas used during post processing. Can you add a ticket for this please?
@fedekunze the integration tests are breaking. Can you add a description to the PR? Are there any expected changes in the amount of gasUsed? |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs. |
Closes: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)