Skip to content

Latest commit

 

History

History
54 lines (45 loc) · 11.5 KB

README.md

File metadata and controls

54 lines (45 loc) · 11.5 KB

SubVT Backend

SubVT (Substrate Validator Toolkit) backend system implementation.

SubVT is proudly supported by the Kusama Treasury. Please refer to the top-level project repository for more information.

Architecture

Complete details can be found in the system architecture document.


Crates

Name Info
subvt-app-service Application REST service with such endpoints as user registration, notification rule definitions, etc. OpenAPI YAML specification document here, viewable here.
subvt-block-processor Block processor and indexer. Stores in the PostgreSQL database the events and extrinsics of interest, era validator and staker inoformation and more.
subvt-config Configuration component that is used by all SubVT executables for runtime configuration.
subvt-governance Contains the functions to fetch open referenda list and referendum details from the Polkassembly public API.
subvt-logging Log configurator that is used by all crates.
subvt-metrics Common crate that contains Prometheus helper functions. Used by all other crates that export Prometheus metrics data.
subvt-network-status-server Publishes the network status data prepared by the network status updater through WS RPC.
subvt-network-status-updater Fetches the network status data from the Substrate node after each finalized block and stores it in the Redis instance.
subvt-nft Contains the functions to fetch NFT records for a stash account using the sub.id public API.
subvt-nofification-generator Processes the indexed block (PostgreSQL), validator list (Redis) and Telemetry time-series (TimescaleDB) data for possible notifications, and persists notifications according to the previously-defined notification rules.
subvt-notification-processor Processes and sends the notifications persisted by the notification generator.
subvt-onekv-updater Fetches the complete candidate data from the 1KV backend (only Polkadot or Kusama) in regular intervals, and Stores the candidate and all related data (ranking events, score, etc.) in the PostgreSQL network database.
subvt-persistence Complete persistence logic for PostgreSQL and Redis (TBD). Contains the full migrations for the network and application PostgreSQL databases.
subvt-plotter Used for server-side generation of report charts. Currently used by the Telegram bot to deliver rewards and payouts reports.
subvt-proc-macro Procedural macros.
subvt-report-service Era and validator report REST service. OpenAPI YAML specification document here, viewable here.
subvt-service-common Contains the service trait implemented by all SubVT services.
subvt-substrate-client Facilitates all of the communication between SubVT and Substrate node RPC interfaces.
subvt-telegram-bot SubVT Telegram bot, currently live for Kusama and Polkadot. View its readme for details.
subvt-telemetry-processor Subscribes to the chain's feed on a Telemetry server, and persists the node data into the TimescaleDB instance for later analysis.
subvt-types Complete SubVT types.
subvt-utility Basic utility functions. Not used a lot at the moment, but more a place for later work.
subvt-validator-details-server Publishes a validator's details through a WS RPC channel. Subscriber send the account id of the validator at the initial connection, receives the full validator data as the first response, then only the changes with the new finalized blocks.
subvt-validator-list-server Publishes through its WS RPC interface the validator list data, which is prepared by the validator list updater.
subvt-validator-list-updater Every few blocks, fetches the complete inactive and active validator data from the Substrate node and the PostgreSQL network instance stores it in the Redis instance and notifies the subscriber services.