-
Notifications
You must be signed in to change notification settings - Fork 299
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
fix: get_filter_changes return type #448
base: master
Are you sure you want to change the base?
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.
This is a good start, but we want to be verifying all data returned by the filter is valid. The current standard we hold ourselves to is that an RPC should be able to withhold parts of the data, but should not be able to insert additional incorrect data (we'd like to check for exhaustiveness at some point too but there are some unfortunate blockers there for a few of the rpc methods like log fetching).
It looks like we aren't checking validity for the non-log filter return types. We should be able to do this by checking if any returned block, blockhash, transaction, or transaction hash has actually been seen by Helios. All of the data to perform these checks should be accessible from the State
type.
So the For now, have added comments in the code with these notes. |
Oh this is a good point. How that I think about it we should probably be managing more of the filter logic ourselves rather than farming it out to the RPC. We should keep track of what filters we have, and only use the RPC to manage log and pending transaction filters. For new block filters we don't really need to use the rpc at all. We can just keep track of those filters in Helios and implement the logic directly for returning all the heads that helios has seen. |
Closes #447.