-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 SealedBlock in reth-primitives-traits #13735
feat: add SealedBlock in reth-primitives-traits #13735
Conversation
…ck-in-reth-primitives-traits
pub block: Arc<SealedBlock<N::Block>>, | ||
/// Block's senders. | ||
pub senders: Arc<Vec<Address>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be simplified in a next step
216ac40
to
2fe6d51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! looks good to me, only have nits
hash: BlockHash, | ||
/// Block hash | ||
#[cfg_attr(feature = "serde", serde(skip))] | ||
hash: OnceLock<BlockHash>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this type completely replace Header
usage eventually? given that we now have OnceLock
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think so
I'm hesitant to integrate this into the actual header object because for this type we want all fields pub but I don't want to expose this lock as pub.
imo this helper type isn't too bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I don't think we should add it to actual alloy header, just using SealedHeader
as NodePrimitives::Header
and avoiding additional conversions where possible
closes #13626
closes #13747
This unifies
BlockWithSenders
andSealedBlockWithSenders
intoRecoveredBlock
adds various constructors and conversion between
SealedBlock <-> RecoveredBlock
Changes overview
BlockWithSenders
andSealedBlockWithSenders
intoRecoveredBlock
SealedBlock
generic overB: Block
, but keep the header,body fieldsSealedHeader
I've kept the aliases but these are now marked as deprecated