-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: port filters to EDR provider #4747
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Thanks, Rust part LGTM! There is just one small thing that we could potentially improve where I left a comment, but feel free to merge without it as it was there prior.
CacheableLogFilterRange::Hash(_) => Some(Self::finalize(hasher)), | ||
CacheableLogFilterRange::Range { to_block, .. } => { | ||
// TODO should we check that to < from? | ||
Self::needs_safety_check(hasher, to_block) |
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.
I'm not sure what's the expected behavior if to < from
, but to be safe, we could potentially check the safety of the max of to
and from
. Wdyt?
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 Alchemy, if to < from
, you get this error:
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"One of the blocks specified in filter (fromBlock, toBlock or blockHash) cannot be found."}}
so using the maximum of those two wouldn't resolve the issue, I think. We might just have to prohibit caching if this occurs?
Sorry, one more thing: I think the |
packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts
Outdated
Show resolved
Hide resolved
The @fvictorio can you shine some light on how we'd want to implement |
No description provided.