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

OP specific beacon consensus crate #7648

Closed
Tracked by #7649
emhane opened this issue Apr 15, 2024 · 1 comment
Closed
Tracked by #7649

OP specific beacon consensus crate #7648

emhane opened this issue Apr 15, 2024 · 1 comment
Labels
A-op-reth Related to Optimism and op-reth C-debt Refactor of code section that is hard to understand or maintain D-good-first-issue Nice and easy! A great choice to get started

Comments

@emhane
Copy link
Member

emhane commented Apr 15, 2024

Describe the feature

A new crate op-beacon-core should be made with a new type OptimismBeaconConsensus. The crate should live alongside the beacon-core crate. The type OptimismBeaconConsensus should impl reth_interfaces::consensus::Consensus trait. The goal with this is to remove the optimism feature from the beacon-core consensus crate.

How this new type should be plugged into the node, needs design. Possibly by replacing usage of the BeaconConsensus type with a Consensus trait object. However since this requires a lot of changes, for the scope of this PR, let's just bring either type into scope with a feature gate here

pub use reth_beacon_consensus_core::BeaconConsensus;

as such

#[cfg(not(feature = "optimism"))]
pub use reth_beacon_consensus_core::BeaconConsensus;
#[cfg(feature = "optimism")]
pub use reth_beacon_consensus_core::OptimismBeaconConsensus;

Additional context

No response

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-op-reth Related to Optimism and op-reth labels Apr 15, 2024
@mattsse mattsse added the D-good-first-issue Nice and easy! A great choice to get started label Apr 23, 2024
@rupam-04
Copy link
Contributor

Will OptimismBeaconConsensus be a struct?

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 C-debt Refactor of code section that is hard to understand or maintain D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

No branches or pull requests

3 participants