Skip to content

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

@enlight

Description

@enlight

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions