Skip to content
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

writeStateDiffAt writes all statediffs even when watching specific addresses in direct indexing #261

Closed
prathamesh0 opened this issue Jul 25, 2022 · 0 comments
Assignees

Comments

@prathamesh0
Copy link
Collaborator

prathamesh0 commented Jul 25, 2022

  • Statediff APIs (like writeStateDiffAt) take statediff params as an argument. If WatchedAddresses field in these params argument is not set when making the API call, statediffs for all the addresses are written out even when direct indexing is restricted to a list of addresses.
  • If a watcher for some contract is running near chain head (with direct indexing configured to watch that contract), it may make writeStateDiffAt calls before direct indexing for that block is completed. As a consequence, statediffs for all the addresses get indexed unnecessarily.
  • When WatchedAddresses is not explicitly set in the passed arguments, use watched addresses from direct indexing params while serving statediff API calls.
@prathamesh0 prathamesh0 self-assigned this Jul 25, 2022
@prathamesh0 prathamesh0 changed the title writeStateDiffAt API call writes statediffs for all addresses writeStateDiffAt API call writes statediffs for all addresses Jul 25, 2022
@prathamesh0 prathamesh0 changed the title writeStateDiffAt API call writes statediffs for all addresses writeStateDiffAt writes all statediffs even when watching specific addresses in direct indexing Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant