johnnynuuma / poa-simple-notification-service

Lightweight nodejs infrastructure for propagating POA contract events to interested parties
0 stars 1 forks source link

poa-simple-notification-service

Problem statement:

POA Networks is the first public blockchain that supports Ethereum contracts built using PoA ( Proof of Authority ) by independant individuals, known as Validators. Additionally POA provide an online governance model to manage both the set of Validators participating in the Consensus protocol aa well as the underlying contracts managing Governance, i.e. the ballot and voting processes.

Currently, there is no well-defined way for the set of Valiators to be notified when a Ballot. Ad hoc methods are being used to notification, email, Telegram, SMS which is undesirable and a vulnerability to the Governance model.

See the following for more information regarding POA Network:

Solution proposal

This project is an first cut attempt to build a light weight notification framework in nodejs as there is existing code and scripts written in Javascript that can be leveraged and provides an efficatious implementation path. This general infrastucture will be publish/subscribe, where by Publisher are responsible for querying contracts for new BallotCreated events and publish to a persistent store ( sqlite3 ). The Subscriber will be responsible for consuming the events, sending notification ( via email initially ) and managing the persistent queue.

This infrastructure can be run as centralize service where all Validators contact information is stored or can be installed and configured by a willing Validator ( if they are uncomfortable with a centralized approach and have technical capabilities to install, monitor & maintain ).

Dependencies:

DB -- persistent store sqlite3 -- ( http://www.sqlite.org/download.html )

Node Resources

Current state

Publisher:

Subscriber:

Service infrastructure

nodejs job-config.js

Final notes:

Individual components are here and exercised: