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: consensus trait generic over NodePrimitives #13026

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Nov 29, 2024

This PR adds FullConsensus<N: NodePrimitives> trait which has a single method validate_block_post_execution moved from Consensus trait with arguments generic over block and receipt.

This allows to still use Consensus trait in components that do not need to deal with entire NodePrimitives (primarily networking code) while FullConsensus is only used by the engine code requiring validation of the blocks after they were executed

@klkvr klkvr force-pushed the klkvr/full-consensus branch from 4f1960a to f24571c Compare November 29, 2024 21:07
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

I see, this makes sense, the entire primitives are only required when using block + receipt

@klkvr klkvr added the A-sdk Related to reth's use as a library label Nov 29, 2024
@klkvr klkvr added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit 5d71150 Nov 29, 2024
42 checks passed
@klkvr klkvr deleted the klkvr/full-consensus branch November 29, 2024 22:41
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants