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

LEVM memory: Functions that calculate costs are returning usize instead of u64. #1547

Closed
lima-limon-inc opened this issue Dec 20, 2024 · 0 comments · Fixed by #1568
Closed
Labels
levm Lambda EVM implementation tech debt Refactors, cleanups, etc

Comments

@lima-limon-inc
Copy link
Contributor

File: ethrex/crates/vm/levm/src/memory.rs

The following functions:

  • expansion_cost
  • cost

Return usize when they should be returning u64 since they calculate gas costs.

This is somewhat related to #1499, and could be fixed in #1528 but that PR is already too big

@lima-limon-inc lima-limon-inc added the levm Lambda EVM implementation label Dec 20, 2024
@lima-limon-inc lima-limon-inc added the tech debt Refactors, cleanups, etc label Dec 20, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 27, 2024
**Motivation**

After 2bb8fa9 , the gas cost type
changed from U256 to u64. However, _some_ functions did not update their
return values to u64; this patch makes them return u64.
 

**Description**

Make the following functions return u64:
- expansion_cost
- cost


<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #1547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation tech debt Refactors, cleanups, etc
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant