Minimal Rust implementation that receives Solana shreds from a DoubleZero edge multicast feed via standard kernel UDP sockets, parses shred headers, and displays live statistics.
- Rust toolchain (stable, 1.75+)
- Linux with a configured
doublezero1GRE tunnel interface libclang(required by thesolana-ledgerdependency for RocksDB)
On Ubuntu/Debian:
apt install libclang-devOn macOS (for development/cross-compilation only — the tool targets Linux):
# libclang ships with Xcode Command Line Tools
# You may need to set:
export DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/libcd rust/kernel-receiver
cargo build --releaseThe binary is at target/release/edge-multicast-receiver.
With defaults (interface doublezero1, multicast group 233.84.178.1, shred port 7733):
./edge-multicast-receiver./edge-multicast-receiver \
--interface doublezero1 \
--multicast-group 233.84.178.1 \
--shred-port 7733 \
--mode tuicp config.example.toml config.toml
# edit config.toml as needed
./edge-multicast-receiver --config config.tomlCLI arguments override config file values.
TUI mode (default) — live dashboard with slot table and aggregate stats:
./edge-multicast-receiver --mode tuiPress q or Esc to quit.
Log mode — machine-parseable streaming output:
./edge-multicast-receiver --mode logOutput format:
slot=312345678 sig=d88e..202a data=67 coding=34 fec_sets=3 age_ms=412
[stats] shreds/sec=8432 data=5621 coding=2811 errors=0 heartbeats=47 (last: 230ms ago)
See config.example.toml for all options:
| Section | Key | Default | Description |
|---|---|---|---|
network |
interface |
doublezero1 |
Network interface to bind to |
network |
multicast_group |
233.84.178.1 |
Multicast group address |
network |
shred_port |
7733 |
UDP port for shred packets |
network |
heartbeat_port |
5765 |
UDP port for heartbeat packets |
network |
recv_buffer_size |
8388608 |
Socket receive buffer (bytes) |
display |
mode |
tui |
Display mode: tui or log |
display |
refresh_hz |
4 |
TUI refresh rate |
display |
log_interval_secs |
5 |
Log mode print interval |
stats |
max_slots |
32 |
Number of recent slots to track |
┌─────────────────────────┐
│ doublezero1 (GRE) │
│ multicast 233.84.178.1 │
└──────┬──────────┬────────┘
│ │
port 7733 port 5765
shreds heartbeats
│ │
┌──────┴──────────┴────────┐
│ Receiver Thread │
│ poll() on 2 UDP sockets │
│ parse shreds via │
│ solana-ledger │
└──────────┬───────────────┘
│
Arc<RwLock<Stats>>
│
┌──────────┴───────────────┐
│ Main Thread │
│ TUI (ratatui) or │
│ Log (stdout) │
└──────────────────────────┘
Two threads:
- Receiver thread — tight
poll()loop reading from two UDP sockets, parsing shred headers, updating shared stats - Main thread — runs the display (TUI or log mode), handles shutdown signals
- Per-slot: data/coding shred counts, FEC set count, highest shred index, signature prefix, arrival timestamps
- Global: total shreds (data + coding), heartbeat count + recency, parse errors, shreds/sec rate
- Ring buffer of 32 most recent slots (configurable)
- Receive-only — does not send heartbeats (the DoubleZero client handles this)
- No FEC recovery — tracks shred inventory only, does not reconstruct missing data shreds
- No deshredding — does not reassemble shreds into Solana entries/transactions
- Leader identity — uses signature prefix as a proxy identifier (full leader schedule lookup is out of scope)