| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Previously, the egress server tracked ingress bytes as a single global counter. This change attributes bytes to individual peers so the data can be consumed by a future reward oracle. Changes: - Add PeerID field to EgressOptions (UUID by default) - Include peer ID in WebSocket subprotocol header alongside consumer session ID (backwards compatible: old clients fall back to CSID) - Replace global nIngressBytes atomic with per-peer sync.Map of atomic counters, shared across all connections from the same peer - Add "ingress-bytes-by-peer" OTel metric with peer_id attribute - Preserve existing "ingress-bytes" total metric for backward compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@noahlevenson and @garmr-ulfr this is just background work that's necessary if we ever did want to integrate a crypto token. |
Sorry, something went wrong.
|
When do you need to land this? My only thought: we have an open ticket to decouple the Lantern-specific parts of Unbounded and refactor them to our own proprietary layer, because when they're tightly coupled, it makes it harder for people to integrate Unbounded into their own projects. The stuff in this PR seems like a prime candidate for the "Lantern proprietary" Unbounded package... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This is the first step toward bandwidth-based compensation for unbounded peers (see getlantern/lantern-token).
Test plan
🤖 Generated with Claude Code