Skip to content

client: reject ProbeResponse / StreamResponse with rate_per_mb == 0 on receive #252

Closed

Description

@alpergundogdu

Follow-up to #234 / #251.

#251 rejects a zero `rate_per_mb` at node-side config resolution, so an honest operator can't start a node that advertises a zero rate. It does not defend the receiver side: a malicious peer can still craft a `ProbeResponse { rate_per_mb: 0, … }` or `StreamResponse { rate_per_mb: 0, … }` at the wire.

When `cdn/client/v1` selection logic lands (ADR 001, ADR 012), it needs its own check: reject (or clamp) `rate_per_mb == 0` on received probe / stream responses before feeding the value into the selection score or voucher arithmetic. The score formula in ADR 001 (`rate_per_mb × rtt_ms × (1 / max(reputation, 0.1)²)`) produces a degenerate zero with `rate_per_mb = 0` that would always win selection while earning no revenue.

Scope

  • Client-side receiver check on `ProbeResponse.rate_per_mb`
  • Client-side receiver check on `StreamResponse.rate_per_mb`
  • Matching selection-score clamp or rejection so a non-conforming peer is dropped from the candidate set, not elevated by zero-score preference

Status

Blocked on client selection logic / `cdn/client/v1` handler not existing yet.

labels: technical, blocked

Activity

  1. added
    status:blocked
    on Apr 15, 2026
  2. alpergundogdu commented on Apr 27, 2026

    @alpergundogdu
    ContributorAuthor

    Folding into #317 — the receive-side rate==0 check belongs alongside the response decode/verify path being introduced there. See #317 for the combined scope.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:blocked

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions