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

Avoid missing events #1820

Merged
merged 2 commits into from
Oct 28, 2022
Merged

Avoid missing events #1820

merged 2 commits into from
Oct 28, 2022

Conversation

muhamadazmy
Copy link
Member

@muhamadazmy muhamadazmy commented Oct 28, 2022

The code improves chain events processing by making sure all blocks are processed. This is accomplished by

  • Wait for new blocks
  • Once a block is created, the block height is checked against the last processed block.
  • All blocks from last processed block to current height is processed.
  • Last processed block is stored in a temp file.
  • On boot the system always uses the current block number as last processed block

Services that processes events still can be down when an event is received hence it doesn't also get a chance to handle the event. The recommended solution is that a service on start need to start listening to events then synchronize with the chain

@muhamadazmy muhamadazmy merged commit 0c4a4e2 into main Oct 28, 2022
@muhamadazmy muhamadazmy deleted the rework-events branch October 28, 2022 07:45
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