Skip to content

drtp: gate config-blob transfer behind a clone-only want flag (pull receives+discards it) #270

@friedenberg

Description

@friedenberg

Observation

RFC 0005 config seeding (merged, #268): the drtp fetch server unconditionally sends drtp-config-v1 and folds the source's config-log-head blob into the transferred blob set. But a network pull is also a fetch — so a drtp pull receives the config blob (when it doesn't already hold it) and then discards the descriptor, because seeding is clone-only.

Effect: a minor, harmless inefficiency — an extra blob transferred to the puller's store on pull (skipped by have-negotiation when already held; otherwise it's a dangling, GC-able config blob). No correctness or test impact (the full suite is green).

Note the HTTP backend does not have this issue: the http client only issues GET /config on clone, so http pulls never fetch config. The asymmetry is drtp-only.

Suggested fix

Make config transfer genuinely negotiated (which RFC 0005's abstract already calls it): add a want-config (clone-only) flag to drtp-want-v1; the fetch server folds the config blob + sends drtp-config-v1 only when the client requested it. Clone sets the flag; pull doesn't. This matches RFC 0004's "MUST NOT assume a feature unless advertised" model and brings drtp to parity with the http client's clone-gating. Update RFC 0005's drtp §Server obligations accordingly (currently specifies unconditional send on fetch).

Environment

amarbel-llc/dodder master; drtp config seeding in sierra/remote_proto (sendClosure / drtp-want-v1), RFC docs/rfcs/0005-config-seeding-over-remote-transfer.md.

🤡 Filed with Clown 0.3.11+1a69402 (amarbel-llc/clown@1a69402)

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds triage / scoping before work begins

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions