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: Declared EthBlockBody trait #2085

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

PoulavBhowmick03
Copy link
Contributor

Motivation

Fixes #2083

Solution

  • Added a BlockBodyTrait in crates/consensus/src/block/traits.rs and it's implementations and then imported it in
    crates/consensus/src/block/mod.rs and crates/consensus/src/lib.rs

  • I have not implemented the transaction associated type, after reading the comment in the issue page

  • All the tests pass

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@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 is a good start,

will need to think about this a bit longer before I'll merge this

@@ -12,3 +12,21 @@ impl<T, H> EthBlock for Block<T, H> {
self.body.withdrawals.as_ref()
}
}

/// A trait for Ethereum block body utilities.
pub trait BlockBodyTrait {
Copy link
Member

@mattsse mattsse Feb 19, 2025

Choose a reason for hiding this comment

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

can we name this EthBlockBody perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

@PoulavBhowmick03 PoulavBhowmick03 changed the title Feat: Declared BlockBody trait Feat: Declared EthBlockBody trait Feb 19, 2025
@yash-atreya yash-atreya added c-consensus Pertaining to the consensus crate P-low Low Priority labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-consensus Pertaining to the consensus crate P-low Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Declare BlockBody trait
3 participants