Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

SmartNet Tracker

A lightweight, standalone Rust (axum) bootstrap directory for WAN dApp discovery. It lets SmartNet nodes find each other over the internet when LAN mDNS is not enough.

The tracker is stateless on disk: it keeps only an in-memory registry of signed app announcements with a TTL heartbeat. It never stores blobs — the actual dApp content still moves peer-to-peer over iroh-blobs.

Trust model

Every announced app is verified with the exact SmartHoldem / ARK crypto used by the client. A spoofed announcement is rejected:

  1. id == base58check(0x3F ‖ ripemd160(secp256k1 compressed pubkey))
  2. The ECDSA signature over sha256(id|name|description|merkle) must verify against that public key.

Build & run

cd tracker
cargo build --release
./target/release/smartnet-tracker

Defaults: binds 0.0.0.0:7374, announcement TTL 120s.

Override via env:

SMARTNET_TRACKER_PORT=7374 \
SMARTNET_TRACKER_TTL=120 \
SMARTNET_TRACKER_LOG_ANNOUNCE=1 \
./target/release/smartnet-tracker
  • SMARTNET_TRACKER_LOG_ANNOUNCE — log every accepted (INFO) / rejected (WARN) announce. On by default; disable with 0 (also false/off/no). Stats counters in /stats keep counting even when logging is off.

The client ships these public seed trackers by default (configurable in Settings → P2P → WAN TRACKERS):

http://159.69.188.60:7374
http://91.99.119.119:7374

API

MethodPathPurpose
GET/HTML status dashboard (auto-refreshes /stats) — open in a browser
POST/announceHeartbeat: register/refresh the apps a node serves
GET/appsAll known apps (deduped) with seed counts + providers
GET/app/:idProviders for a single app id
GET/seedsDistinct live nodes (endpoints) seen recently
GET/statsAggregate stats: live apps/providers/endpoints, lifetime accept/reject totals, top-10 apps by seeds
GET/healthLiveness + registry stats

POST /announce

{
"node": "S...", // announcing node's SmartHoldem address (info)"endpointId": "<iroh node id>", // how peers reach this provider"apps": [{
"id": "S...", // == address(publicKey)"name": "App",
"description": "...",
"tags": ["demo"],
"merkle": "<blake3 root>",
"hash": "<iroh-blobs tar hash>",
"signature": "<ecdsa compact hex>",
"publicKey": "<secp256k1 compressed hex>"
}]
}

Response: { "ok": true, "accepted": N, "rejected": M, "ttlSecs": 120 }.

Tests

cargo test# crypto verify unit tests
cargo run --example gen_announce # print a VALID announce → accepted
cargo run --example gen_announce tamper # mutated after signing → rejected
cargo run --example gen_announce badid # id != pubkey address → rejected

About

A lightweight, standalone Rust (axum) bootstrap directory for WAN dApp discovery

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages