Design: TollGate capacity advertisement vs client measurement + reputation model
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- go
- Lĩnh vực
- backend-api-design, networking
Hướng nghiên cứu
Start by reading the UpstreamManager, which the issue says already tracks bytes transferred during active sessions, and review #312 for the related discovery logger work. The issue leaves key decisions open about capacity measurement, reputation signals, and storage, so first clarify and agree on those choices. Done means an agreed design for how measurements and reputation will be collected and used.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Open Questions
1. Self-advertised capacity vs client-measured
Should a TollGate self-report its uplink speed, or should the client measure it?
Self-advertised (push model):
- TollGate includes
uplink_speed_mbpsin itsGET /advertisement response - Pro: client knows before committing to a connection
- Con: nothing prevents lying — a TollGate could claim 100 Mbps on a 5 Mbps DSL line
- Mitigation: client verifies after connecting and adjusts trust
Client-measured (pull model):
- Client does a timed download from the TollGate backend after connecting
- Pro: ground truth, can't be faked
- Con: only available AFTER connection (too late for pre-connection scoring)
- Con: small downloads are inaccurate for high-bandwidth links
Hybrid (likely best):
- TollGate advertises expected capacity (from config or self-test)
- Client measures actual throughput after connecting
- Discrepancy logged → feeds reputation score
- Future scoring weights measured > advertised
2. TollGate reputation
How do we track whether a TollGate is trustworthy and performs well?
Signals to collect:
- Price accuracy: advertised price vs actual charge per step
- Throughput delivery: advertised speed vs measured speed (ratio)
- Uptime: what fraction of probes succeeded over time?
- Payment reliability: did Cashu tokens work? Any meltdowns/errors?
- Session stability: did sessions get cut prematurely?
Storage options:
- Local JSONL per-TollGate (by npub) — simple, no infrastructure
- Nostr reputation event (kind 1984 or custom) — shared across the network
- Stake-based: TollGates lock sats as collateral, slashed for bad behavior
Trust bootstrapping:
- New TollGate starts at neutral reputation (score 0)
- Reputation accrues from client measurements over time
- Social trust: follow npubs of known operators (profit_share identities)
- Network effects: TollGates recommended by trusted TollGates get a boost
3. Measurement methodology
If we measure throughput from the client side:
- HTTP GET to
/: Already exists, returns advertisement (~500 bytes). Too small for throughput estimation. - Timed file download: Would need a dedicated endpoint serving a known-size payload (e.g.,
/speedtest?size=1000000). More accurate but adds backend complexity. - iperf3: Most accurate but requires installation on every TollGate.
- Ongoing session throughput: The UpstreamManager already tracks bytes transferred during active sessions. This is "free" data — no extra probes needed. The session manager knows exactly how many bytes flowed through per second.
Proposal: Use ongoing session bytes/second as the primary throughput signal. The session manager already measures this for data-metered sessions. We just need to log it alongside the TollGate identity.
Related
- #311 — WiFi AP selection algorithm roadmap
- #312 — Discovery logger (Phase 1-2 implementation)
- Ngôn ngữ chính
- Go
- Star
- 12
- Fork
- 14
- Merge trung bình
- 4 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 213
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenTollGate/tollgate-module-basic-go
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
OpenTollGate/tollgate-module-basic-go#1159 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Degraded-mode hygiene follow-ups: dead walletNotInitializedError() + main.go's startup log still over-promises mint recoveryCó thể đã có người làm @Amperstrand đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenTollGate/tollgate-module-basic-go#1135 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portalCó thể đã có người làm @Amperstrand đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenTollGate/tollgate-module-basic-go#1122 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của OpenTollGate/tollgate-module-basic-go
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug raised-by:verifier
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
medici-finance/assay#5697 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sonatype-nexus-community/terraform-provider-sonatypeiq#101 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: metrics area: tracing contribfest enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
open-telemetry/opentelemetry-ebpf-instrumentation#4188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
blinklabs-io/dingo#6074 ·
Maintainer thường phản hồi trong vòng 1 ngày