-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 WithdrawalsProvider::withdrawals_by_block_range
#13877
base: main
Are you sure you want to change the base?
Conversation
/// Returns the withdrawals per block within the requested block range. | ||
fn withdrawals_by_block_range( | ||
&self, | ||
range: RangeInclusive<BlockNumber>, | ||
) -> ProviderResult<Vec<Withdrawals>>; |
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.
is return vec here problematic for pre withdrawals blocks?
17dee72
to
4cfdb9b
Compare
4cfdb9b
to
a8f9e52
Compare
a8f9e52
to
980e4ad
Compare
980e4ad
to
6e86a4f
Compare
e0a84a4
to
26394df
Compare
for ((header, transactions), withdrawals) in | ||
inputs.into_iter().zip(provider.withdrawals_by_block_range(block_range)?) |
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.
ah nice, now we no longer need the shanghai check
26394df
to
7f32447
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.
lgtm
I realize that we only have to do this for eth, so we could add a dedicated chainstorage impl for optimism
Allows using it on
read_block_bodies
with the provider, and not rely solely on DB cursorsfor
StaticFileSegment::BlockMeta
on top of #13894