- Rewrite NAR URLs in narinfo to route through Iroh peer fetch
- Add
/iroh/nar/{peer_id}/{path}endpoint that fetches viaIrohNode.fetch_nar() - Track which peer provided the narinfo to fetch NAR from same peer
- Integrate
pynaclsigning for narinfo responses - Support
NIX_SECRET_KEY_FILEenvironment variable - Sign fingerprint format:
1;storePath;narHash;narSize;refs... - Add
--private-keyCLI option
- Reuse scan part from
scan_and_publishinipfs_store.py - Skip IPFS publish step - generate NAR on-the-fly when requested
- Add cache for frequently requested NARs (LRU or similar) - deferred, may not be needed
- Track which hashes are available locally for tracker announcement
- Announce local package hashes to tracker
- Use delta sync (only send added/removed hashes)
- Persist announced state to
/var/lib/peerix/announced_state.json - Periodic re-sync (every 5 minutes like IPFS mode)
- Integrate
NixpkgsFilteredStore- only serve packages in cache.nixos.org - Support
FilteredStorewith custom patterns - Add
--no-filterand--filter-modeCLI options
- Integrate
VerifiedStorewrapper - Verify NAR hashes against upstream cache (cache.nixos.org)
- Add
--no-verifyand--upstream-cacheCLI options - TOCTOU protection during streaming - deferred (exists in VerifiedStore but not exposed)
- Port dashboard HTML from
app.py - Adapt for Iroh mode (show Iroh peers instead of IPFS swarm)
- Progress tracking with Kalman filter ETA
- Pause/resume controls for scanning
- Show tracker peers with geo-location - deferred
-
/statusendpoint with full node info -
/dashboard-statsJSON endpoint
- Compress NARs on-the-fly (zstd or xz)
- Add
Compression: zstdheader to narinfo - Make compression level configurable
- Consider caching compressed NARs for frequently requested packages
- Note: Nix supports zstd compression for NARs via
Compression: zstdin narinfo - Reference: cache.nixos.org uses zstd compression, narinfo includes
Compression: zstd - Implementation: use
zstandardPython library for streaming compression
- Investigate IrohError during NAR streaming (connection drops mid-transfer)
- Root cause: Iroh QUIC buffers not fully transmitted before finish() called
- Fix: Length-prefixed protocol with chunked sending and delays
- Length-prefixed protocol: send 8-byte size header, then exact bytes
- Chunked sending: 16KB chunks with 20ms delay every 64KB
- Buffer flush delay: 500ms base + 300ms per MB before finish()
- Tested working with files up to 1.6MB via Iroh relay
- Report upstream bug to Iroh team about stream truncation
- Persistent node identity (Ed25519 secret key)
- Tracker integration for Iroh peer discovery
- NAT traversal via Iroh relay
- Narinfo fetch from peers
- Basic HTTP endpoints (/nix-cache-info, /{hash}.narinfo, /nar/, /status, /peers)
- NAR download from Iroh peers (/iroh/nar/{peer_id}/{path})
- Narinfo signing with pynacl
- Store scanning with package hash tracking
- Delta sync for package hashes
- Nixpkgs filtering (NixpkgsFilteredStore)
- Hash verification (VerifiedStore)
- Filtered hash caching (/var/lib/peerix/filtered_hashes.json)
- Dashboard hash-based change detection (efficient DOM updates)
- Dashboard with Iroh status and controls