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

feat: add Consensus to ExecutionStage #14447

Merged
merged 6 commits into from
Feb 12, 2025
Merged

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Feb 12, 2025

To decouple execution and validation we need to keep separate Consenus instance on ExecutionStage

This also refactors CLI a bit and introduces helper CliNodeComponents trait which can be easily extended later to give access to more chain-specific components to cli commands

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.

this makes sense

Comment on lines +204 to +213
pub trait CliNodeComponents<N: CliNodeTypes> {
/// Block executor.
type Executor: BlockExecutorProvider<Primitives = N::Primitives>;
/// Consensus implementation.
type Consensus: FullConsensus<N::Primitives, Error = ConsensusError> + Clone + 'static;

/// Returns the block executor.
fn executor(&self) -> &Self::Executor;
/// Returns the consensus implementation.
fn consensus(&self) -> &Self::Consensus;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this makes sense, this is likely something we need to integrate in cli trait somehow

cc @fgimenez for vis

@klkvr klkvr enabled auto-merge February 12, 2025 14:35
@klkvr klkvr added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 172369a Feb 12, 2025
44 checks passed
@klkvr klkvr deleted the klkvr/consensus-in-execution-stage branch February 12, 2025 15:02
frankudoags pushed a commit to frankudoags/reth that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants