You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
EIP-234: Add blockHash to JSON-RPC filter options. EIP-1898: Add blockHash to JSON-RPC methods which accept a default block parameter.
These two EIPs are closely related, and allow for querying the blockchain's state at a specified block hash. I've a draft implementation of these two ready and tested :)
There are two issues I'd like some guidance on, though.
The first is that, the way I was approaching it,EIP-1898 requires changing the signatures of a reasonable amount of methods of the trait etheres_providers::Middleware. Specifically, changing the types of Option<BlockNumber> to Option<BlockId>. Is this reasonable? I've also tried changing the type to something like Option<T> where T: Into<BlockId>. However, this has the downside that every time we pass a None, we have to type annotate the calls. Thoughts?
The second relates to testing. Ganache does not implement EIP-1898 (trufflesuite/ganache#745). It can be tested with geth, however, which is what I did.
How should I proceed? Should I open a PR?
Cheers!
The text was updated successfully, but these errors were encountered:
I personally find the None<()> annotation to be super ugly, so I'd more supportive of this first approach. This would be a breaking change (and that's fine since we're pre-1.0), and would be easily fixable by passing BlockNumber::Latest.into() (or similar) wherever the API is consumed
EIP-234: Add
blockHash
to JSON-RPC filter options.EIP-1898: Add
blockHash
to JSON-RPC methods which accept a default block parameter.These two EIPs are closely related, and allow for querying the blockchain's state at a specified block hash. I've a draft implementation of these two ready and tested :)
There are two issues I'd like some guidance on, though.
The first is that, the way I was approaching it,EIP-1898 requires changing the signatures of a reasonable amount of methods of the trait
etheres_providers::Middleware
. Specifically, changing the types ofOption<BlockNumber>
toOption<BlockId>
. Is this reasonable? I've also tried changing the type to something likeOption<T> where T: Into<BlockId>
. However, this has the downside that every time we pass aNone
, we have to type annotate the calls. Thoughts?The second relates to testing. Ganache does not implement EIP-1898 (trufflesuite/ganache#745). It can be tested with geth, however, which is what I did.
How should I proceed? Should I open a PR?
Cheers!
The text was updated successfully, but these errors were encountered: