-
Notifications
You must be signed in to change notification settings - Fork 791
feat: add support for eth_getBlockReceipts
#365
Conversation
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.
Hey thanks for the contribution!! Do you think there might be a way to have the client check whether it's connected to an Erigon or Parity node and abstract away the 2 methods and only have one? That'd be a nice upgrade. Otherwise I'm OK with merging this as-is, as long as you add one small comment that this method is not available on Geth (the PR looks stale, given that there has been no EIP for the RPC call AFAICT)
Sounds good! There is a way to check this directly using the
Does this sound reasonable? |
Yes that SGTM. I think the overhead of having an additional RPC request per each of these calls might be fine. Alternatively, I think we could also just cache the node-type inside the |
Hey @gakonst, I tried to add a cached
I can think of a couple options:
None of these are super clean, what would be best? Or is it even just better to stay simple and keep the two separate functions for |
@ekzhang Another approach:
If you think these are a bit out of scope, I'm happy to merge the PR as-is and we can consider it for another PR. |
Amazing, thanks for the help! I'm not sure I understand the implications of such a change |
Sounds good! Merged, and we'll track separately. |
Thanks for the great library, here's a small PR for a bump that I ran into while trying to modify
mev-inspect-rs
to work on an Erigon archive node.Motivation
The Erigon node does not support
parity_getBlockReceipts
, but it does supporteth_getBlockReceipts
. This is listed on the RPC interface at https://github.com/ledgerwatch/erigon/blob/devel/cmd/rpcdaemon/README.md.Also worth mentioning that this is an open PR at ethereum/go-ethereum#19721 as well.
Solution
Add a few function to the
Middleware
trait that invokeseth_getBlockReceipts
.