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

chore(sdk): SealedBlock generic over header and body #11430

Closed
wants to merge 20 commits into from

Conversation

emhane
Copy link
Member

@emhane emhane commented Oct 2, 2024

Makes SealedBlock type definition generic over header and body type, which is a necessary first step to use SealedBlock in Block trait method signatures

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-sdk Related to reth's use as a library labels Oct 2, 2024
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize, Deref, DerefMut)]
pub struct SealedBlock {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Deref, DerefMut)]
pub struct SealedBlock<H = Header, B = BlockBody> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

having to generics here is likely not convenient, ideally this should use the Block trait

Copy link
Member Author

Choose a reason for hiding this comment

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

SealedBlock is a return type in signature of Block trait

@mattsse
Copy link
Collaborator

mattsse commented Oct 3, 2024

please link the other prs, it's easy to miss

@emhane
Copy link
Member Author

emhane commented Oct 3, 2024

end goal is to move to alloy_primitives::Sealed. hence pr just adds this to the type def, to unblock other prs.

@Rjected
Copy link
Member

Rjected commented Oct 3, 2024

to unblock other prs

Is this blocking any PRs or issues right now? If so, what's being blocked?

Base automatically changed from emhane/sealed-header to main October 4, 2024 13:43
@emhane
Copy link
Member Author

emhane commented Oct 4, 2024

to unblock other prs

Is this blocking any PRs or issues right now? If so, what's being blocked?

yes, it isn't possible to plug in the Block trait into reth-node-types, if the types in the signatures of the trait methods of Block aren't supported, ref #11399

Makefile Outdated Show resolved Hide resolved
@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Oct 30, 2024
@github-actions github-actions bot closed this Nov 7, 2024
@emhane emhane deleted the emhane/sealed-block branch November 20, 2024 22:50
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 C-debt Refactor of code section that is hard to understand or maintain S-stale This issue/PR is stale and will close with no further activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants