mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-10-20 10:46:18 +00:00
main
* Move vulnerable dependencies to patched versions
Backend (Cargo.lock): openssl 0.10.55 -> 0.10.81, bytes 1.12.1, h2 0.3.27,
tokio 1.26 -> 1.47.1 (mio 1.x), url 2.3.1 -> 2.5.7 (idna 1.1), rand 0.8.8,
spin 0.9.9, time 0.3.55, ring 0.17.14.
Three alerts needed manifest changes:
- tokio-rustls 0.23 -> 0.26 (rustls 0.20 -> 0.23), which is what moves
ring off 0.16. The ring provider is selected explicitly instead of the
default aws-lc-rs, so the image build needs no cmake/C toolchain; roots
still come from webpki-roots (now 1.0). Checked against live hosts: a
valid certificate connects, an expired one and a name mismatch are
refused.
- maxminddb 0.23 -> 0.27: lookup() now returns a result that is decoded,
and the City model's fields are no longer Options. The existing
locate_random_ip test (12.5.56.25 -> "Gardena") passes.
- structopt (clap 2, which pulled atty) -> clap 4 derive in telemetry_core,
telemetry_shard and the soak tests; criterion 0.4 -> 0.5 for the same
reason. Both binaries' arguments were parsed before and after for the
docker-compose invocations and a set of other cases: identical results,
except that `--feed-timeout` given without a value is now an error where
structopt silently used the default. --denylist keeps taking every value
up to the next flag (num_args = 1..), as its help text describes.
Frontend: npm audit fix within ranges, and webpack-dev-server 4 -> 5.2.6
(no devServer options are configured, so nothing to migrate). Left:
sockjs -> uuid 8 inside webpack-dev-server 5; the fix is 6.0, which needs
Node 22 while CI runs 20, and it is the local dev server only.
Checked: backend cargo test (58 passed), clippy, fmt; frontend lint,
prettier, test and build.
* Reject an invalid byte size instead of panicking
ByteSize::from_str called expect("all ascii digits") on the numeric part,
so a value with no digits ("abc", "k") or one too large for usize
aborted the shard at startup with a panic instead of a usage error, and
the suffix multiplication could overflow silently in release builds.
Parse errors now return Err and the multiplication is checked.
The new test fails on the old code (panic) and passes on this one.
Pezkuwichain Telemetry
Overview
This repository contains the Telemetry server for Pezkuwichain nodes. It includes:
- Backend: Rust-based ingestion server (
telemetry_shardandtelemetry_core) - Frontend: React/TypeScript dashboard for monitoring network nodes
Pezkuwichain nodes can connect to Telemetry using the --telemetry-url flag.
Messages
Nodes send telemetry messages depending on the verbosity level:
Verbosity 0 (default):
system.connected
system.interval
block.import
notify.finalized
Verbosity 1 (includes validator address):
afg.authority_set
Getting Started
Prerequisites
- Rust (via rustup): https://rustup.rs/
- Node.js (LTS version)
Backend
cd backend
cargo build --release
# Terminal 1 - Core server
./target/release/telemetry_core
# Terminal 2 - Shard server
./target/release/telemetry_shard
Default ports:
telemetry_core: 127.0.0.1:8000telemetry_shard: 127.0.0.1:8001
Frontend
cd frontend
npm install
npm run start
Access the UI at http://localhost:3000
Connect a Node
pezkuwi --dev --telemetry-url 'ws://localhost:8001/submit 0'
Note: The "0" is the verbosity level (0-9).
Docker
Build Images
# Backend
cd backend
docker build -t pezkuwichain/telemetry-backend .
# Frontend
cd frontend
docker build -t pezkuwichain/telemetry-frontend .
Docker Compose
docker-compose up
Manual Docker Setup
# Create network
docker network create telemetry
# Backend core
docker run -d --network=telemetry --name backend-core \
-p 8000:8000 --read-only \
pezkuwichain/telemetry-backend \
telemetry_core -l 0.0.0.0:8000
# Backend shard
docker run -d --network=telemetry --name backend-shard \
-p 8001:8001 --read-only \
pezkuwichain/telemetry-backend \
telemetry_shard -l 0.0.0.0:8001 -c http://backend-core:8000/shard_submit
# Frontend
docker run -d --network=telemetry --name frontend \
-p 3000:8000 \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
pezkuwichain/telemetry-frontend
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
SUBSTRATE_TELEMETRY_URL |
WebSocket URL for frontend to connect | ws://localhost:8000/feed |
Links
- Website: https://pezkuwichain.io
- Telemetry: https://telemetry.pezkuwichain.io
- Discord: https://discord.gg/Y3VyEC6h8W
License
GPL-3.0
Credits
Based on substrate-telemetry by Parity Technologies.
Maintained by Dijital Kurdistan Tech Institute.
Languages
Rust
62.6%
TypeScript
31.7%
CSS
4.6%
JavaScript
0.6%
Dockerfile
0.3%
Other
0.1%