Skip to content

Keep event count to avoid duplicates and syncer fixes#458

Merged
ginesdt merged 5 commits intomasterfrom
syncer-fixes
Jun 26, 2025
Merged

Keep event count to avoid duplicates and syncer fixes#458
ginesdt merged 5 commits intomasterfrom
syncer-fixes

Conversation

@ginesdt
Copy link
Contributor

@ginesdt ginesdt commented Jun 26, 2025

Processing an event twice could lead to accounting errors and miscalculations.
To prevent this, we introduce a table in the DB which keeps track of the block number and index of an event so the syncer won't process events if they have been processed already.

This simplifies the management of the syncer, and error handling with the web3 server, as we could always go safely re-fetch some blocks back in case of some disconnect.

@ginesdt ginesdt merged commit 8e047cf into master Jun 26, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant