-
Notifications
You must be signed in to change notification settings - Fork 40
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
WEB3-282: feat: Allow querying blocks by hash #416
Conversation
crates/steel/src/host/builder.rs
Outdated
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.
For the (unstable) history feature we only have the method commitment_block(self, BlockNumberOrTag).
Should we make this consistent with block_number
, block_number_or_tag
, block_hash
for the execution block? Or would that complicate the API unnecessarily (related to WEB3-272)
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.
It's a balance for sure, but if possible that would be beneficial. Block hashes may be preferred in some situations, since they are unambiguous (incl in contexts where multiple chains may be referred to, or in a context where reorgs must be handled). It's also not the end of the world to say they need to get the block number and pass that in instead 🤷
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.
Added the missing methods in cca36da
crates/steel/src/host/builder.rs
Outdated
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.
It's a balance for sure, but if possible that would be beneficial. Block hashes may be preferred in some situations, since they are unambiguous (incl in contexts where multiple chains may be referred to, or in a context where reorgs must be handled). It's also not the end of the world to say they need to get the block number and pass that in instead 🤷
Co-authored-by: Victor Snyder-Graf <[email protected]>
Fixes #384 and WEB3-282