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

Use the Block Number and Index for Event Sorting #160

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

petersng
Copy link
Contributor

@petersng petersng commented Jul 22, 2019

We sorted by block timestamp and internal ID which sometimes goes awry depending on when we receive events on the watchers from Infura. We should sort by block number and index to ensure no matter what order we receive events into the crawler, it is correct as specified by the log data when we query. This should fix some random ordering issues we have seen, which are mostly on events within the same block.

We could keep the sort by timestamp since it is pulled from the block data, but sorting instead by block number seems reasonable and more stable.

TODO
Update the processor to use the new sorting.

- Ensure we get the correct order as specified on ethereum
@petersng petersng requested a review from dankins July 22, 2019 19:17
Copy link
Member

@dankins dankins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@petersng petersng merged commit 0500540 into master Jul 22, 2019
@petersng petersng deleted the png/ensure-event-ordering branch July 22, 2019 19:31
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.

2 participants