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: Add version to BeaconEngineMessage FCU #12089

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

0xOsiris
Copy link
Contributor

@0xOsiris 0xOsiris commented Oct 26, 2024

This PR addresses #12071.

Trying to get this over the finish line. Debating whether Option<EngineApiMessageVersion> would be more appropriate as there are some places where we have no access to the EngineApiMessageVersion without changing other interfaces, and the version is only relevant when starting a build process on Optimism.

I have defaulted to EngineApiMessageVersion::V3 in these places, but happy to change. Open to any feedback on the approach

@0xOsiris 0xOsiris changed the title Osiris/fix payload Osiris/fix payload id optimism Oct 26, 2024
@0xOsiris 0xOsiris changed the title Osiris/fix payload id optimism fix(op): payload id Oct 26, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is great tysm

but I'd like to introduce all payload id changes separately

crates/ethereum/engine-primitives/src/payload.rs Outdated Show resolved Hide resolved
crates/optimism/payload/src/payload.rs Outdated Show resolved Hide resolved
Comment on lines 328 to 337
#[cfg(test)]
mod tests {
use super::*;
use crate::OpPayloadAttributes;
use alloy_primitives::{address, b256, bytes, FixedBytes};
use alloy_rpc_types_engine::PayloadAttributes;
use std::str::FromStr;

#[test]
fn test_payload_id_parity_op_geth() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these are great though, so please open this as a separate one.

Comment on lines 329 to +343
/// Version 1
V1,
V1 = 1,
/// Version 2
///
/// Added in the Shanghai hardfork.
V2,
V2 = 2,
/// Version 3
///
/// Added in the Cancun hardfork.
V3,
#[default]
V3 = 3,
/// Version 4
///
/// Added in the Prague hardfork.
V4,
V4 = 4,
Copy link
Collaborator

Choose a reason for hiding this comment

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

yep we can solve this like this

@0xOsiris
Copy link
Contributor Author

this is great tysm

but I'd like to introduce all payload id changes separately

Sounds good, @mattsse Just reverted the changes related to the payload id

@0xOsiris 0xOsiris marked this pull request as ready for review October 26, 2024 19:21
@0xOsiris 0xOsiris changed the title fix(op): payload id feat: Add version to BeaconEngineMessage FCU Oct 26, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm,

next pr would be, adding the version as additional to

/// Creates a new payload builder for the given parent block and the attributes.
///
/// Derives the unique [`PayloadId`] for the given parent and attributes
fn try_new(

then we can finally get the other pr over the line

@mattsse mattsse merged commit 0d07d27 into paradigmxyz:main Oct 28, 2024
40 checks passed
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.

3 participants