Notifier v2.1.0 Release Notes
Blockchain development team announces the Notifier v2.1.0 version release. This version includes the new feature that provides replaying the notify-nodes using snapshots.
Terminology used
Notifier utility — an event-engine component that receives messages on events from smart contracts and transmits them to the NATS message broker.
NATS message broker — an event-engine component that is an open source messaging system.This service ensures that received information on events is stored on a hard drive with ability to access this information.
Problem description
All events occurring in smart contracts are naturally sent to NATS utility. In case of a replay it was impossible to restore all the nodes using the snapshots. In this case the duplicated events appeared in NATS, which caused confusion in the order of I / O data. This led to the errors in the event history.
It took about 4 days to replay a node if an error occurred in NATS. The notifier node recovery was impossible using snapshots, as in that case the NATS event history was distorted. There was a need to implement a feature that would provide replay of the nodes using snapshots.
Solution (#49, #50)
The new feature has been implemented into the cyberway.notifier component. The meaning of improvement is as follows.
A data filtering mode was added for the blocks that are already committed and successfully sent to NATS. When starting up, Notifier requests NATS about the last messages sent and finds the information about the last irreversible block automatically (CommitBlock event). Using this information, it filters messages and continues to send events to NATS from the moment when a break was made.
This mode allows to :
- save the events history correctly;
- recover Notifier node using snapshots.