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 GetPayloadV4 #2067

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

JulianVentura
Copy link
Contributor

@JulianVentura JulianVentura commented Feb 24, 2025

Description

This PR implements the new Prague endpoint GetPayloadV4.

Note

No EF nor hive tests were found for this endpoint. This should be tested using a localnet.

Warning

This PR introduces breaking changes on the Payload database table by adding a new field.

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

github-actions bot commented Feb 24, 2025

| File                                                                       | Lines | Diff |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/payload.rs               | 570   | +1   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/mod.rs                 | 20    | +1   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/payload.rs             | 56    | +56  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/requests.rs            | 153   | +12  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/engine/mod.rs        | 47    | +1   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/engine/payload.rs    | 600   | +33  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/types/payload.rs     | 250   | +2   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/api.rs                | 185   | -10  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/rlp.rs                | 91    | +3   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/store.rs              | 1263  | -6   |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/store_db/in_memory.rs | 468   | -13  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/store_db/libmdbx.rs   | 876   | -14  |
+----------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/store_db/redb.rs      | 862   | -11  |
+----------------------------------------------------------------------------+-------+------+

Total lines added: +109
Total lines removed: 54
Total lines changed: 163

@JulianVentura JulianVentura marked this pull request as ready for review February 25, 2025 16:16
@JulianVentura JulianVentura requested a review from a team as a code owner February 25, 2025 16:16

let response = ExecutionPayload::from_block(payload_bundle.block);

serde_json::to_value(response).map_err(|error| RpcErr::Internal(error.to_string()))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused here. Are we returning an ExecutionPayload now instead of ExecutionPayloadResponse?

Copy link
Contributor

@avilagaston9 avilagaston9 left a comment

Choose a reason for hiding this comment

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

Nice 🚀

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.

2 participants