Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Duplicate data occasionally inserted during statediffing #245

Closed
2 tasks done
prathamesh0 opened this issue Jun 17, 2022 · 0 comments
Closed
2 tasks done

Duplicate data occasionally inserted during statediffing #245

prathamesh0 opened this issue Jun 17, 2022 · 0 comments
Assignees
Labels

Comments

@prathamesh0
Copy link
Collaborator

prathamesh0 commented Jun 17, 2022

The indexer object in the statediffing service holds a block number as a field. Since the same indexer is used in regular statediffing (WriteLoop) as well as to serve writeStateDiffAt API calls, the block number field sometimes gets overwritten in the middle of statediffing.

This was discovered while running a watcher against the v4 endpoints. On making multiple writeStateDiffAt API calls through ipld-eth-server to a head-tracking geth node for a missing block (12948382), it indexed data belonging to the missing block at two different heights (at 12948382 and at head 14972625). The same scenario happened with few other blocks as well (5 blocks out of ~100 older blocks).

image (4)

Relevant code change: https://github.com/vulcanize/go-ethereum/pull/211/files#diff-94d8d9065b029905674a053b6f9eb87f9fa49dc82ff8191e7c899e35fd2fd66eR58

Tasks:

  • Fixes in statediffing code
  • Fix ipld-eth-db schema and update core services
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants