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): implement EIPs 7685 and 6110 #1921

Merged
merged 28 commits into from
Feb 14, 2025
Merged

feat(l1): implement EIPs 7685 and 6110 #1921

merged 28 commits into from
Feb 14, 2025

Conversation

avilagaston9
Copy link
Contributor

@avilagaston9 avilagaston9 commented Feb 11, 2025

Motivation

In order to support the Prague update.

Description

This PR implements EIP-7685 and EIP-6110.

Observation

Two ef_tests from vectors/prague/eip6110_deposits where excluded since we need the latest version of the evm to pass them.

Closes #1787
Closes #1789

@JulianVentura JulianVentura self-assigned this Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

| File                                                                              | Lines | Diff |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex_l2/src/commands/test.rs                | 209   | +2   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/blockchain.rs                   | 208   | +26  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/error.rs                        | 97    | +2   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/payload.rs                      | 668   | +6   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/block.rs                      | 700   | +51  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/mod.rs                        | 19    | +1   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/requests.rs                   | 93    | +93  |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/zkvm/interface/risc0/src/main.rs | 48    | +4   |
+-----------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/prover/zkvm/interface/sp1/src/main.rs   | 49    | +4   |
+-----------------------------------------------------------------------------------+-------+------+

Total lines added: +189
Total lines removed: 0
Total lines changed: 189

Copy link
Contributor

@fborello-lambda fborello-lambda left a comment

Choose a reason for hiding this comment

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

Looks good, left a fix for the prover 😉

@@ -129,6 +130,7 @@ async fn transfer_from(
retries += 1;
sleep(std::time::Duration::from_secs(2));
}
sleep(Duration::from_millis(3));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is used to generate the l2-loadtest.rlp. It was generating to many transactions in one block and making it tedious to regenerate the file.

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be easier to regenerate the file in the future if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've regenerated this file to work with the validate_prague_block_header function

@avilagaston9 avilagaston9 marked this pull request as ready for review February 14, 2025 03:38
@avilagaston9 avilagaston9 requested a review from a team as a code owner February 14, 2025 03:38
Copy link
Contributor

@JulianVentura JulianVentura left a comment

Choose a reason for hiding this comment

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

LGTM, just a small suggestion

pub fn to_bytes(&self) -> Vec<u8> {
match self {
Requests::Deposit(deposits) => {
let mut deposit_data = vec![];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let mut deposit_data = vec![];
let deposit_data = deposits.iter().flat_map(|d| d.to_summarized_byte_array());
std::iter::once(DEPOSIT_TYPE).chain(deposit_data).collect()

@avilagaston9 avilagaston9 added this pull request to the merge queue Feb 14, 2025
Merged via the queue into main with commit 89b1c5d Feb 14, 2025
23 checks passed
@avilagaston9 avilagaston9 deleted the feat/eips-7685-6110 branch February 14, 2025 19:01
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.

EIP-7685: General purpose execution layer requests EIP-6110: Supply validator deposits on chain
4 participants