Design: TollGate capacity advertisement vs client measurement + reputation model
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- go
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Go
- スター
- 12
- フォーク
- 14
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 217
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenTollGate/tollgate-module-basic-go のほかの issue
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)対応中かも @Amperstrand が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenTollGate/tollgate-module-basic-go#726 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)対応中かも @Amperstrand が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
OpenTollGate/tollgate-module-basic-go#768 ·
メンテナーはふだん 1 日以内に返信
-
Four drift fences for tests/contract/ (+ test.yml clean-container lane + pre-commit wiring)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
OpenTollGate/tollgate-module-basic-go#767 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
OpenTollGate/tollgate-module-basic-go#763 ·
メンテナーはふだん 1 日以内に返信
OpenTollGate/tollgate-module-basic-go の issue をすべて見る
似ている issue
-
enhancement exporter/awss3 needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-telemetry/opentelemetry-collector-contrib#51905 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/docs theme/validation
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
a11y P1-significant
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[correctness][missing-coverage][sort] Strict uniqueness checks lack numeric-key equivalence coverageオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
infiniflow/ragflow#20625 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信