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

Go contract events should be persisted to disk more reliably #1604

Open
enlight opened this issue Jan 23, 2020 · 0 comments
Open

Go contract events should be persisted to disk more reliably #1604

enlight opened this issue Jan 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@enlight
Copy link
Contributor

enlight commented Jan 23, 2020

Currently Application.EventHandler persists Go contract events to disk via the EventDispatcher at the same time as it notifies websocket subscribers of these events. The problem is there's no check when the node starts up that events have been successfully persisted to events.db for the last persisted block, which means that some events may get lost if the loom process dies for any reason mid-way through writing out those events. We need to make event persistence more reliable by keeping track of the last block for which events were written out (in events.db) and replaying blocks to regenerate the missing events if necessary.

@enlight enlight added the bug Something isn't working label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant