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

Feature/clean crawler #167

Merged
merged 14 commits into from
Oct 31, 2022
Merged

Feature/clean crawler #167

merged 14 commits into from
Oct 31, 2022

Conversation

hawyar
Copy link
Contributor

@hawyar hawyar commented Oct 24, 2022

The crawler now has a stream option which allows streaming new blocks in a separate child process. Before every crawler cycle we find the last processed block height (start) and the current chain height (end). As long as the new block from stream is not in that range (start - end) for that cycle then we are able to process it.

@hawyar hawyar requested a review from shanejearley October 24, 2022 16:30
Copy link
Contributor

@shanejearley shanejearley left a comment

Choose a reason for hiding this comment

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

Looks awesome. Do you mind removing the contracts/ethereum/build folder? Not sure why .gitignore missed this, maybe an out of date file. Then I'll take a deeper look, since there will be less scrolling through changes.

@shanejearley
Copy link
Contributor

Did you find a good solution for the fetch/stream ranges?

@hawyar
Copy link
Contributor Author

hawyar commented Oct 26, 2022

One solution might be adding inserted_at to the event schema. Before starting, the crawler would query for the last inserted event rather than the highest block height in the event table.

@shanejearley
Copy link
Contributor

That sounds like a good idea to consider.

Copy link
Contributor

@shanejearley shanejearley left a comment

Choose a reason for hiding this comment

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

Great work 👏

@hawyar hawyar merged commit 98d00b5 into develop Oct 31, 2022
@shanejearley shanejearley deleted the feature/clean-crawler branch October 31, 2022 21:06
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