Skip to content

cli: decdn publish ./dir publishes a directory to a namespace in one command #2591

Description

@thiras

Component

cli (decdn binary)

Who it affects

publisher (someone importing content or sponsoring downloads)

Problem

Everything built so far is supply-side. Publishing a directory today is four steps and a human in the loop:

  1. decdn origin import --input <path> --to <dir> encodes the blobs and outboards into an origin store.
  2. The publisher either runs a node with decdn config init --origin file://<dir>, or aws s3 syncs the store to a bucket an operator serves from.
  3. decdn publish namespace create, then decdn publish assign <namespace-id> <0xOPERATOR>... seats origins.
  4. assign reverts until a VETTER_ROLE holder has vetted the publisher's wallet under ManualVettingPolicy. The README says this "happens out-of-band, not through the CLI": the publisher emails info@ and waits.

A small team shipping a release on a known date (the customer the flash-crowd post names) does not get through that. There is no link they can paste in a release note at the end of it.

Proposed solution

One command, done:

decdn publish ./dir
→ https://<namespace>.decdn.link/

What it chains, in order:

  • Import. Encode ./dir with the existing origin import writer (bao-range::encode_outboard, {H}.obao4 layout) into a local staging store, or a bundle when the directory has more than one entry (appendix-bundles).
  • Upload. Push the store to an origin the publisher does not run. Default: origin nodes Labs runs and seats for every new namespace (fleet work, tracked outside this repo). A --origin s3://… or --origin file://… flag keeps the self-hosted path for publishers who want it.
  • Namespace. namespace create if the publisher has none, otherwise reuse the one in config.
  • Seat. assign the default origin set.
  • Print the URL. https://<namespace>.decdn.link/<path> for each entry, served by the hosted gateway (separate issue, linked below). Until the gateway exists, print the decdn:<hash>/<path>?ns=<id> URI.

Vetting stops being a human step for small publishers: an automated policy vets any wallet up to a small quota (bytes per namespace, namespaces per wallet) and routes only above-quota requests to a VETTER_ROLE holder. That is a contract-surface change under ADR 011 § Vetting policies, so it has its own design issue (linked below) and lands first.

Keystore, Sepolia ETH and USDC stay a prerequisite for the publisher wallet in this issue. Removing them is the dashboard issue (linked below).

Alternatives considered

  • Keep four steps, document them better. Does not remove the human from the loop, and still needs a wallet that holds three currencies before the first byte is published. Rejected.
  • Publisher runs their own origin node. That is the current path and the reason the only guide is "run a node". It stays available behind --origin; it must not be the default.
  • Make origin import itself upload. Conflates encoding with seating and ownership. publish is the publisher's verb already (namespace create, assign, revoke), so the one-shot belongs under it.

Design scope

  • This proposal changes the protocol, the economics, or the contract surface.

The CLI command itself does not. The automated vetting policy it depends on does, and is tracked separately.

Related

Activity

  1. added
    kind:feature
    prio:high
    area:cli
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
  3. modified the milestone: v0.3 on Oct 28, 2026
  4. self-assigned this
    on Oct 29, 2026
  5. modified the milestone: v0.3 on Oct 29, 2026
  6. removed their assignment
    on Oct 30, 2026
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

    area:clikind:featureprio:high

    Fields

    Priority

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions