-
Notifications
You must be signed in to change notification settings - Fork 20.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
eth_getFilterChanges returns empty output #28838
Comments
May I clarify that you can getFilterChanges after events emitted when filter is created afterwards? From our test, logs are returned if filter is created before events emitted which is opposite to your description. |
Thanks for your response @mmsqe sorry if I haven't been clear, you are correct, if the filter is created before the events are emitted all works fine. But if the filter (with I would expect that, if the filter is created with In the docs I see that |
Hey @fgimenez, The documentation mentioned that Also, To get the logs |
System information
Geth version:
CL client & version: none
OS & Version: Linux 6.6.11-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 10 19:25:59 UTC 2024 x86_64 GNU/Linux
Expected behaviour
A local Clique node returns old logs when queried with
eth_newFilter
+eth_getFilterChanges
Actual behaviour
When the logs are queried right after emitted they are available, a bit after they are no longer available, meaning, creating the filter and requesting filter changes ~60s after the events were emitted.
Steps to reproduce the behaviour
Run a local geth node with this genesis file:
and start command:
After deploying a smart contract that emits events I create a filter with:
then I query the updates
If these actions are done right after the event is emitted all works fine and the logs are returned, if they are done a bit time later
eth_getFilterChanges
returns an empty array.Note: this works fine with anvil.
The text was updated successfully, but these errors were encountered: