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): fixes several bugs found when running the EF tests #1085

Merged
merged 126 commits into from
Nov 12, 2024
Merged

Conversation

ilitteri
Copy link
Contributor

@ilitteri ilitteri commented Nov 6, 2024

Motivation

The main idea of ​​this PR is to leave the setup of the EF tests at a point where the parallelization of tasks for resolving the remaining failed tests is possible.

Base automatically changed from levm_ef_tests to main November 8, 2024 19:47
maximopalopoli and others added 4 commits November 8, 2024 17:07
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->
- The objective is to run ef tests without panicking, so that they don't
interrupt execution.

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->
Some reasons tests panicked:
- Trying to resize memory to a very high number that the system doesn't
tolerate
- This was fixed by just resizing only if the gas limit allows it. The
EVM doesn't have a "max" memory size, this max is limited by the gas
avaiable. Opcodes that didn't have gas implemented were a problem so I
partially implemented gas costs for them, just for their memory
expansion cost.
- Trying to add with overflow 
- For this error normal addition was replaced for `checked_add` and
returned an error if it overflowed.

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

Closes #issue_number

---------

Co-authored-by: ilitteri <[email protected]>
**Motivation**

The address generation in create2 was being done wrong, the goal is to
correct it.

**Description**

The implementation is inspired in [the implementation in
deployer.rs](https://github.com/lambdaclass/lambda_ethereum_rust/blob/main/crates/l2/contracts/deployer.rs#L221)
of L2 crate. One way to compare it is to compare the outputs of both
functions.

Closes #1091
@ilitteri ilitteri added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit 88b0750 Nov 12, 2024
19 checks passed
@ilitteri ilitteri deleted the levm_fixes branch November 12, 2024 21:37
github-merge-queue bot pushed a commit that referenced this pull request Nov 15, 2024
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

To add edge case tests suggested by [Fuzzing
Labs](#1085).

**Description**

- Adds test from
#1171
- Adds test from
#1156
- Adds test from
#1155
- Adds test from
#1154
- Adds test from
#1153
- Adds test from
#1152
- Adds test from
#1147
- Adds test from
#1146
- Adds test from
#1145
- Adds test from
#1144
- Adds test from
#1143
- Adds test from
#909
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.

5 participants