Skip to content

feat: EngineValidator#11144

Merged
klkvr merged 3 commits intomainfrom
klkvr/engine-validator
Sep 24, 2024
Merged

feat: EngineValidator#11144
klkvr merged 3 commits intomainfrom
klkvr/engine-validator

Conversation

@klkvr
Copy link
Member

@klkvr klkvr commented Sep 23, 2024

ref #11054

Adds new node component EngineValidator and moves validation methods from EngineTypes and PayloadAttributes to it, making those traits independent of ChainSpec

@mattsse mattsse added C-enhancement New feature or request A-sdk Related to reth's use as a library labels Sep 24, 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, one nit

@onbjerg for vis re alphanet, smol api change

Comment on lines +44 to +45
/// Type that validates the payloads sent to the engine.
pub trait EngineValidator<Types: EngineTypes>: Clone + Send + Sync + Unpin + 'static {
Copy link
Collaborator

Choose a reason for hiding this comment

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

very nice

Comment on lines 34 to 45
/// Validator for the ethereum engine API.
#[derive(Debug, Clone)]
pub struct EthereumEngineValidator {
chain_spec: Arc<ChainSpec>,
}

impl EthereumEngineValidator {
/// Instantiates a new validator.
pub const fn new(chain_spec: Arc<ChainSpec>) -> Self {
Self { chain_spec }
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we move this below the trait impls on EthEngineTypes

EthereumNetworkBuilder,
EthereumExecutorBuilder,
EthereumConsensusBuilder,
EthereumEngineValidatorBuilder,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is fine for now, I think we'd like to not have this as a component because this is engine API specific, but for now this is totally fine since it unblocks things and the change is not invasive

@klkvr klkvr added this pull request to the merge queue Sep 24, 2024
Merged via the queue into main with commit c851a17 Sep 24, 2024
@klkvr klkvr deleted the klkvr/engine-validator branch September 24, 2024 11:37
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-sdk Related to reth's use as a library C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants