Skip to main content

Synopsis

cowboy container submits instructions to the CIP-10 Container Registry system actor (0x13) and reads back what is registered. Image registration is permissionless: any account may register a digest whose bytes it hosts in a public CIP-9 volume it owns. Binding a reserved (cby-) image name and defining resource classes require a genesis.system_deployers key. Every write subcommand accepts the global --private-key and --rpc-url, resolved with key auto-discovery (--private-key file, then COWBOY_PRIVATE_KEY_FILE, COWBOY_PRIVATE_KEY, then the keystore key the selected environment names).

Subcommands

cowboy container register-image

Register a container image: its composed-rootfs digest plus the CBFS locator a runner fetches its bytes from. Behavior:
  1. Parse the 32-byte digests and build a RegisterImage instruction. An omitted --name encodes as the empty name (an ordinary, unprivileged registration).
  2. Sign with the discovered key (resource limits from the node’s estimate), print the transaction hash, and POST /submit.
  3. Print the node response.
A digest may carry up to four locators, one per publisher (CIP-10 §5.5 check 1, §5.6). Each publisher’s locator is create-only: the registry refuses a digest for which the signer already holds a locator, live or tombstoned. Registering a digest another publisher already registered adds a mirror of the same bytes, and a job resolves through the first locator that is serving. A fifth publisher is refused while four locators, tombstoned ones included, remain unreaped. Flags: Example:

cowboy container deregister-image

Retire your own locator for a registered digest. Two-phase under this one command: the first call tombstones the locator (admission stops immediately; in-flight jobs can still resolve it); a second call at least 600 blocks later reaps it and frees the volume’s registration slot. Tombstoning the digest’s last live locator is refused while a persistent workload still references the digest. Flags:

cowboy container images

Show registered images with every locator per digest and each locator’s live volume status. Read-only; no signing key. Behavior:
  1. Collect the digests named with --digest. With none, scan the registry’s il: image listing index in bounded pages (up to 20 pages of 500 digests; a warning is printed if more remain).
  2. For each digest, read its ordered locator list from the registry via the exact-key storage RPC, then read each locator’s volume status from the Storage Manager (0x0A).
  3. Print one line per digest (name=, admissible= and locators=) followed by one indented line per locator. A digest with no locators prints NOT REGISTERED. With --json, print a JSON array with one entry per digest instead.
Flags: Example:

cowboy container register-class

Operator: define a resource class. Its name is the resource_tier a container job selects. Flags: Example:

cowboy container deregister-class

Operator: remove a resource class. Flags:

cowboy container register-workload

Register a persistent workload — a container whose lifetime is governed by its registry record — signed by the owning actor’s controller. An unreserved workload escrows a refundable 10 CBY deposit. It registers unclaimed: a runner in its host pool claims it and names its serving endpoint. Behavior:
  1. Derive the workload id from the owning actor and --name, and build a WorkloadRecord with observed status provisioning, no serving endpoint, and the given fields (the chain assigns the generation).
  2. Validate each --mount (<volume_id_hex>:<mount_path>:<ro|rw>:<principal_address>; the path must be canonical and absolute, at most 256 bytes; no volume twice and no overlapping paths) and the host pool.
  3. Sign and submit RegisterWorkload, then wait for a committed successful receipt.
Flags:

cowboy container update-workload

Change a workload record, signed by the owning actor’s controller (a system_deployers key may stop any workload). Only --desired-state stopped alone applies to a live workload; every other change needs the record already stopped and its last attempt no longer live. Waits for a committed successful receipt. Flags:

cowboy container deregister-workload

Remove a stopped, not-live workload record: by the owning actor’s controller, refunding its deposit, or by any system_deployers key. Flags:

cowboy container begin-workload-attempt

Reporter: commit the next attempt and its volume recipients before key release. Flags:

cowboy container report-workload-status

Reporter: publish the workload’s observed status for a generation. Flags:

cowboy container dispute

Submitter: dispute a container job’s billing attestation inside the dispute window. A dispute forfeits the refund (the full pre-locked maximum is charged) and lowers the runner’s reputation; it does not adjudicate the true usage. Flags:

Edge Cases

  • --delta-bytes and --rootfs-bytes must be non-zero; a zero value describes an image a runner can never stream.
  • --name on register-image with a cby- name requires a genesis.system_deployers key. A name already bound to another controller is refused; when its controller (or, for a cby- name, a system_deployers key) names it again under a new digest, the name entry points at the new digest and the superseded digest stays registered (CIP-10 §5.11).
  • deregister-image acts only on your own locator; other publishers’ mirrors of the same digest are untouched. A locator registered under a cby- name also requires a system_deployers key to retire. Deregistration never deletes a name entry.
  • --clear-mounts and --mount together are rejected before submission.
  • Every write signs with resource limits from the node’s estimate.
  • The settlement split (UpdateContainerSettlementConfig) is governance-gated and is intentionally not exposed here.