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

Rearchitect exporter to use BullMQ as a background job queueing system #5

Merged
merged 35 commits into from
Oct 2, 2023

Conversation

NoahSaso
Copy link
Member

@NoahSaso NoahSaso commented Oct 1, 2023

This moves the brunt of the exporting work to a background job system called BullMQ which uses Redis.

This makes the exporter script itself very lightweight, now only responsible for reading the trace events in the FIFO, detecting which state events are relevant, and queueing them for export in batches by block. This ensures that the exporting does not get in the way of the node running, such that it is safe to run an indexer on top of a validator without missing blocks.

This is also more fault tolerant AND debuggable, since queued jobs can be replayed when they fail with their data persisted. If the indexer errors, the events are no longer lost to time, so events should not be missed.

@NoahSaso NoahSaso merged commit eba771d into main Oct 2, 2023
1 check failed
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