Graphcast Listener Radio

Docs

Introduction

This radio monitors Graphcast network through subscribing to gossip network topics. The radio will not send messages to the network, but it will record the messages and generate basic metrics for network monitoring.

Quick Start

Motivation

Graphcast network is a complex system with numerous nodes and connections, and monitoring it is crucial for maintaining its performance, identifying potential issues, and ensuring its robustness and reliability.

Basic functions

Future functions - Error Detection: Detect and log errors in the network. - Alerting: Send alerts when certain conditions are met, such as when the network's performance drops below a certain threshold. - Advanced Analytics: More advanced analytics capabilities for more in-depth analysis of the network's performance. - Integration with Other Tools: Compatibility with other tools in the network for more comprehensive network monitoring. - UI Improvements: Generally more user-friendly and intuitive.

Database

The tool comes with auto-migration for the database, but requires the user to create a valid DB connection. Make sure the database url passed in is valid.

Incoming message type constraints: - satisfy GraphQL output type - Serializeable and Deserializeable json object

Example message table

| id | message | |----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 | {"nonce": 1686182179, "network": "mainnet", "payload": {"content": "0x3f...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj"}, "signature": "dff1...", "blockhash": "276e...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj", "blocknumber": 17431860} | | 2 | {"nonce": 1686182183, "network": "goerli", "payload": {"content": "0xc0...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB"}, "signature": "dbd2...", "blockhash": "0198...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB", "blocknumber": 9140860} | | ...| ...

🧪 Testing

To run unit tests for the Radio. We recommend using nextest as your test runner. Once you have it installed you can run the tests using the following commands:

cargo nextest run

Contributing

We welcome and appreciate your contributions! Please see the Contributor Guide, Code Of Conduct and Security Notes for this repository.