paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.85k stars 1.1k forks source link

Make EthEngineTypes generic #8331

Closed mattsse closed 6 hours ago

mattsse commented 4 months ago

Describe the feature

currently the associated types for enginetypes are fixed

https://github.com/paradigmxyz/reth/blob/5100ddd28e3ae0396aa97633d6f700d77aefb50f/crates/ethereum/engine-primitives/src/lib.rs#L32-L38

which makes it harder to configure a custom payload/builder etc

we should make the relevant payload types generic here, this should happen after:

https://github.com/paradigmxyz/reth/issues/8330

Additional context

No response

leontiad commented 4 months ago

can look at it

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 21 days with no activity.

sergerad commented 3 months ago

@mattsse which of these Eth* and Exec* types do you want to become generic? All of them?

impl PayloadTypes for EthEngineTypes {
    type BuiltPayload = EthBuiltPayload;
    type PayloadAttributes = EthPayloadAttributes;
    type PayloadBuilderAttributes = EthPayloadBuilderAttributes;
}

impl EngineTypes for EthEngineTypes {
    type ExecutionPayloadV1 = ExecutionPayloadV1;
    type ExecutionPayloadV2 = ExecutionPayloadEnvelopeV2;
    type ExecutionPayloadV3 = ExecutionPayloadEnvelopeV3;
    type ExecutionPayloadV4 = ExecutionPayloadEnvelopeV4;

And I'm assuming you mean that EthEngineTypes becomes generic and EngineTypes and PayloadTypes do not

nkysg commented 1 month ago

If I have the capacity, I will try.

FredCoen commented 3 weeks ago

Hey @mattsse is this the right way to go? https://github.com/paradigmxyz/reth/pull/10779 thanks!

mattsse commented 6 hours ago

closing because this is no longer feasible