paradigmxyz / reth

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

Add Optimism engine API extension trait and impl #12275

Open mattsse opened 2 hours ago

mattsse commented 2 hours ago

Describe the feature

there's an optional extension to the OP engine API:

https://specs.optimism.io/protocol/exec-engine.html#engine_signalsuperchainv1

we currently don't have a way to install this.

so we first need

  1. a new rpc trait for this (e.g. OpEngineApiExt) https://github.com/paradigmxyz/reth/blob/c74d2a06f2d84a96f779e62293ef90b3c984c56a/crates/optimism/rpc/src/lib.rs#L1-L1 see also: https://github.com/paradigmxyz/reth/blob/c74d2a06f2d84a96f779e62293ef90b3c984c56a/crates/rpc/rpc-api/src/engine.rs#L28-L30

TODO

Additional context

No response

hoank101 commented 2 hours ago

hi sir, can i do it?

mattsse commented 1 hour ago

fyi this already exists as client function:

https://github.com/alloy-rs/op-alloy/blob/a0d14dedbd923f5b16609b68471cf79886630e83/crates/provider/src/ext/engine.rs#L306-L309

so the types already exists