-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support blockHash in getLogs (EIP-234) #412
Conversation
Is this widely supported? I don’t see it in the JSON-RPC specification: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter |
It's for |
Oh! That makes way more sense! :) Thanks, I had not seen EIP-234. I’ll look into it and get back to this PR this week. |
Awesome, thanks! For context, I am working on a project which injects ether.js into https://github.com/ethereumjs/ethereumjs-blockstream , which detects when new blocks come in and manually fetches their logs by blockHash (to avoid a race conditions during re-org where a different block's logs are returned) |
p.s. the CI is failing just 'cause the dist hash changed and wasn't updated in the test (until we're sure you like this change). |
Oh yes, no worries. I expect those test cases to fail for normal humans. :) They are there for me after I make changes so I don’t accidentally publish a package that fails verified deterministic building (could mean the code was maliciously modified by me or a script on my computer, or more likely, that I forgot to run Today I have time to get back to some ethers issues. I’ll check this out this afternoon. :) |
I have added the changes necessary to get this working for getLogs. I've modified your suggestions a little bit, to prevent the I've also updated Etherscan to throw if it is attempted, since their blockchain API does not support blockHash. |
Try out Thanks! :) |
Yep, totally works, thanks!!! |
Brilliant thanks!
…On Fri, Feb 8, 2019, 7:50 PM Scott Bigelow ***@***.*** wrote:
Yep, totally works, thanks!!!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#412 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFP-uJ-a0TiqCYAhmPmXRmfR5uK0Rifks5vLkWNgaJpZM4af0Mv>
.
|
Relevant snippet from v5, looking for some feedback:
Thanks! :) |
Simple change to allow blockHash through
checkFilter()
. The type union isn't strictly necessary, but it is more descriptive.