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

feat(l1) add receipt fetching to snap [waiting for bases to be merged] #1534

Merged
merged 41 commits into from
Dec 19, 2024

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Dec 19, 2024

Based on #1432 + #1505
Motivation
Fetch receipts for blocks before the pivot during snap sync

Description

  • Add request_receipts method to PeerChannels
  • Fetch and store receipts for blocks before pivot during snap sync

Closes #issue_number

fkrause98 and others added 30 commits November 26, 2024 16:16
**Motivation**

This PR aims to implement the ecrecover precompile.

**Description**

There are some cases where returning an empty set of bytes makes more
tests pass than returning an error. In those cases I left the match.

---------

Co-authored-by: ilitteri <ilitteri@fi.uba.ar>
Co-authored-by: Jeremías Salomón <48994069+JereSalo@users.noreply.github.com>
**Motivation**

- The `code_deposit_cost` was deducted outside of the callframe that
does the contract creation for CREATE type transactions, this was
incorrect because subtracting `code_deposit_cost` could make the
callfreme revert because of OOG

**Description**
- Unify the contract creation behaviour between the opcodes
CREATE/CREATE2 and transactions of type CREATE.
- After the callframe that does contract creation succeeds do the
following checks:
- Check if the output of this callframe is valid contract (verify length
&& first byte != 0xef")
- Check if the `current_callframe.gas_used + code_deposit_cost <
current_call_frame.gas_limit`
       
       If any of this checks fail revert the callframe
       If the checks pass add the bytecode to the new account address
- Remove the `create_post_execution` function as the functionality is
now done at return in callframe execution
maximopalopoli and others added 11 commits December 18, 2024 14:21
**Motivation**

The goal is to implement the sha2 256 precompile.

**Description**

For this precompile I struggled to add unit tests, but the EF tests
related to sha2 256 precompile are passing.

---------

Co-authored-by: ilitteri <ilitteri@fi.uba.ar>
We should touch precompiles from 1 to 10, including the last one.
Changes the exclusive range for an inclusive one.
#1527)

**Motivation**
The account was not removed when calling selfdestruct in CREATE type
transactions because the new account was not in the accrued_substate

**Description**
- Add the new address to the substate at vm creation time.
@fmoletta fmoletta merged commit b77bdff into snap-fix Dec 19, 2024
20 of 23 checks passed
@fmoletta fmoletta deleted the snap-fix-plus-receipts branch December 19, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants