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

fix(levm): fix call stipend in CALL, CALLCODE #1562

Merged
merged 18 commits into from
Dec 26, 2024
Merged

Conversation

LeanSerra
Copy link
Contributor

@LeanSerra LeanSerra commented Dec 23, 2024

Motivation

There is a miscalculation in the new callframe gas_limit because of the 2600 STIPEND in value transfer calls

Description

  • Group the calculation of the gas_cost and the gas_limit for the new subcontext in the gas_cost module as this values are closely related.
  • The gas_cost now includes the gas for the subcall
  • When we reach the function generic_call in case of REVERT_FOR_CALL we return only the value of gas_limit
  • After executing the new_call_frame we return the remaining gas from the new_call_frame

@LeanSerra LeanSerra added the levm Lambda EVM implementation label Dec 23, 2024
@LeanSerra LeanSerra self-assigned this Dec 23, 2024
@LeanSerra LeanSerra marked this pull request as ready for review December 26, 2024 16:56
@LeanSerra LeanSerra requested a review from a team as a code owner December 26, 2024 16:56
Copy link
Contributor

@JereSalo JereSalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@JereSalo JereSalo added this pull request to the merge queue Dec 26, 2024
Merged via the queue into main with commit 201e7bd Dec 26, 2024
4 checks passed
@JereSalo JereSalo deleted the levm/fix_call_stipend branch December 26, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants