Skip to content

Un-saturate and tune the speed component of reputation for large-file selection #1658

Closed

Description

@alpergundogdu

Problem

Reputation's speed component is saturated: speed_score = min(1, actual_bps / expected_bps) with expected_bps = 10 MiB/s (~80 Mbps) — crates/reputation/src/interaction.rs, crates/reputation/src/local.rs:17. Any node above ~80 Mbps scores exactly 1.0, so an 80 Mbps node and a 10 Gbps node are indistinguishable. Speed is 40% of the interaction score (0.4·speed + 0.4·correctness + 0.2·reachability), but above baseline the clamp erases all ranking information.

For large-file delivery (the model-delivery wedge) transfer time is throughput-dominated — 10 GB is ~1000 s at 80 Mbps vs ~8 s at 10 Gbps, while the RTT delta between a 5 ms and a 50 ms node is ~0.045 s — so selection is blind to the variable that actually matters.

Scope (deliberately small)

Everything stays inside the existing reputation framework. No separate throughput store, no structural split, no gate, and the ADR 001 selection formula is unchanged — all changes are inside crates/reputation (ADR 008).

Rationale for staying small: a persisted throughput metric only helps single-source selection. Multi-source (#1164) measures each source's rate live during the fetch and needs no stored prior; small blobs are latency-bound (RTT). So the stored-throughput niche is single-source throughput-bound pulls — real (it is the only path today, and today's large-file path) but narrow, and shrinking as multi-source lands. Not worth new machinery.

Change

  1. Un-saturate the speed sub-score — replace min(1, bps/expected_bps) with a curve spanning [0,1] across realistic throughputs (a much higher configurable reference, or a log normalization). Stays a [0,1] component of the weighted reputation EWMA.
  2. Client-configurable weights — expose speed / correctness / reachability (default unchanged 0.4/0.4/0.2). Reputation is local, so a speed-caring client sets e.g. 0.8/0.1/0.1 with no new storage. The existing 1/rep² already amplifies whatever weight speed carries.
  3. Faster, configurable decay (sub-weekly) — for decentralization: a transiently-dinged node returns to selection quickly instead of being exiled for weeks, and no node coasts on stale reputation while idle. Reachability failures ride this decay as a normal negative sample — no hard crater (a single unreachable event can be the client's own network blip).

Acceptance criteria

  • Saturation gone: a ≥2× baseline node is distinguishable from a baseline node in the speed sub-score.
  • Weights are client-configurable; defaults reproduce today's behavior; a higher speed weight shifts ranking toward faster nodes.
  • Decay is sub-weekly and configurable; a dinged node returns to neutral on the new timescale; an actively-serving node keeps its score.
  • ADR 008 updated; ADR 001 unchanged.

Relationship to other issues

Deferred (recorded, not in this issue)

Activity

  1. added
    kind:feature
    design:adr
    prio:high
    rust
    on Aug 12, 2026
  2. changed the title [-]Throughput as a first-class measured signal: unclamp the speed score, split performance from reliability reputation[/-] [+]Un-saturate and tune the speed component of reputation for large-file selection[/+] on Aug 12, 2026
  3. alpergundogdu commented on Aug 12, 2026

    @alpergundogdu
    ContributorAuthor

    Post-merge disposition of the deferrals

    Revisiting the deferrals recorded in the spec — most we don't actually need.

    Pacing "confound" — dropped (by design, not a bug to fix). The original worry: BudgetPacer throttles a transfer to the buyer's deposit cadence, so observed bytes/elapsed could understate a node's raw ceiling and "defame" a fast node we happened to pay slowly. On reflection that's not worth correcting — speed is speed. The paced throughput is the client-relevant quantity: it's what that client will experience again, because its future transfers are gated the same way. A node's ceiling above the rate you ever pace to is irrelevant to you.

    Mechanism note for accuracy: the pacer gates on the buyer's own deposit (crates/client-pull/src/pacer.rs — "gates on the buyer's OWN deposit"), not on reputation directly. But the effect the intuition points at is real: deposit / working balance with a node grows with repeated use, so a node you transact with more gets paced faster and gets to show its speed — observed throughput already tracks the real, usage-weighted relationship, no special-casing needed. Only residual risk is a cross-node measurement asymmetry from a transient early-session low deposit; bounded, since you're pace-limited anyway and switching between nodes is cheap.

    Fluid / decaying-max speed reference — YAGNI. The fixed 1 GiB/s log reference already self-differentiates across the realistic range. Revisit only if the fixed reference proves fiddly; not planned.

    Operator TOML-configurability of the knobs — YAGNI. The fields are already library-configurable; TOML plumbing is additive polish. Wire it when an operator actually needs to tune these.

    Size-aware transfer-time model — genuinely later, gated on #1164. This one is not "don't need it" — it's "not applicable yet." It needs blob size at ranking time, which only arrives when #1164 (or #1506) brings it. When that lands, rtt + size/throughput supersedes the current fixed-weight speed term. Tracked with #1164.

    Net: three of four deferrals are effectively closed (by-design or YAGNI); only the transfer-time model remains as real future work, and it belongs to #1164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:adrkind:featureprio:highrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions