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

Declare PayloadValidator::ExecutionPayload #14084

Closed
emhane opened this issue Jan 29, 2025 · 2 comments
Closed

Declare PayloadValidator::ExecutionPayload #14084

emhane opened this issue Jan 29, 2025 · 2 comments
Labels
A-op-reth Related to Optimism and op-reth A-sdk Related to reth's use as a library

Comments

@emhane
Copy link
Member

emhane commented Jan 29, 2025

Describe the feature

ExecutionPayload needs to be set to OpExecutionPayload in impl of trait for OpEngineValidator

/// Type that validates an [`ExecutionPayload`].
pub trait PayloadValidator: fmt::Debug + Send + Sync + Unpin + 'static {
/// The block type used by the engine.
type Block: Block;
/// Ensures that the given payload does not violate any consensus rules that concern the block's
/// layout.
///
/// This function must convert the payload into the executable block and pre-validate its
/// fields.
///
/// Implementers should ensure that the checks are done in the order that conforms with the
/// engine-API specification.
fn ensure_well_formed_payload(
&self,
payload: ExecutionPayload,
sidecar: ExecutionPayloadSidecar,
) -> Result<SealedBlock<Self::Block>, PayloadError>;
}

Additional context

This is blocking the withdrawals root feature in isthmus, since l1 computes the withdrawals root from a list of withdrawals as opposed to serialise the root and send it over the network. OP doesn't use the withdrawals list in the block body. Instead, from isthmus on, the withdrawals root is the storage hash of L2ToL1MessagePasser.sol, so it reflects the copy of the state of the node who sends the payload.

@emhane emhane added A-op-reth Related to Optimism and op-reth A-sdk Related to reth's use as a library labels Jan 29, 2025
@emhane
Copy link
Member Author

emhane commented Jan 29, 2025

possibly I misunderstood and it's intended that the execution payload validator for OP should have access to the db and should compute the withdrawals root locally, as fixed here ethereum-optimism#56? @tynes @protolambda

@emhane
Copy link
Member Author

emhane commented Feb 12, 2025

closed in #14179

@emhane emhane closed this as completed Feb 12, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth A-sdk Related to reth's use as a library
Projects
Status: Done
Development

No branches or pull requests

1 participant