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

Add dedicated dev/local launcher #14064

Open
mattsse opened this issue Jan 29, 2025 · 1 comment · May be fixed by #14154
Open

Add dedicated dev/local launcher #14064

mattsse opened this issue Jan 29, 2025 · 1 comment · May be fixed by #14154
Assignees
Labels
A-sdk Related to reth's use as a library C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jan 29, 2025

Describe the feature

we currently have an unfortunate restriction for the --dev mode (LocalPayloadBuilder):

because of this bound

+ EngineValidatorAddOn<NodeAdapter<T, CB::Components>>,
LocalPayloadAttributesBuilder<Types::ChainSpec>: PayloadAttributesBuilder<
<<Types as NodeTypesWithEngine>::Engine as PayloadTypes>::PayloadAttributes,
>,

we require that this struct

pub struct LocalPayloadAttributesBuilder<ChainSpec> {

is: PayloadAttributesBuilder

which made this workaround necessary

/// A temporary workaround to support local payload engine launcher for arbitrary payload
/// attributes.
// TODO(mattsse): This should be reworked so that LocalPayloadAttributesBuilder can be implemented
// for any
pub trait UnsupportedLocalAttributes: Send + Sync + 'static {}

we can fix this problem by

  1. not require the struct and instead operate on the trait: PayloadAttributesBuilder
  2. however this then requires that we need to obtain an instance of this somehow, so we need to provide this
  3. I think the best solution here would be that this becomes another trait smth like trait MaybeDevLauncherAddOn, similar to:
    /// Helper trait that provides the validator for the engine API
    pub trait EngineValidatorAddOn<Node: FullNodeComponents>: Send {
    /// The Validator type to use for the engine API.
    type Validator: EngineValidator<<Node::Types as NodeTypesWithEngine>::Engine, Block = BlockTy<Node::Types>>
    + Clone;
    /// Creates the engine validator for an engine API based node.
    fn engine_validator(
    &self,
    ctx: &AddOnsContext<'_, Node>,
    ) -> impl Future<Output = eyre::Result<Self::Validator>>;
    }
    that returns a trait instance on demand

this way we can make the dev mode launcher smarter.

cc @Bisht13

ref #14062

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Jan 29, 2025
@mattsse mattsse added A-sdk Related to reth's use as a library and removed S-needs-triage This issue needs to be labelled labels Jan 29, 2025
@Bisht13
Copy link
Contributor

Bisht13 commented Jan 29, 2025

Cool, can you assign this to me?

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
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants