Purpose
This page is a high-level technical overview of Cowboy’s runner system and its data boundaries. It answers the questions that come up most often:- What do runners actually do?
- Which parts of a job end up on-chain?
- Are runner answers public?
- What stays in CBFS or CBSS?
- How do performance, incentives, verification, and crypto fit together?
This is an architecture overview, not the normative spec. For exact protocol
rules, see CIP-2, CIP-9, CIP-11, CIP-23, CIP-24, and CIP-31. It also calls
out current implementation behavior where it differs from the target CIP-2
aggregator design.
Short Answers
Mental Model
Cowboy separates deterministic chain execution from non-deterministic external work.Main Components
Job Lifecycle
1. Actor submits a job
An actor or client submits a job request. The node normalizes it into a canonicalJobSpec and stamps protocol-owned fields such as job_id,
submitter, and submitted_at.
Typical JobSpec content includes:
- job type:
Llm,Http,Mcp,Custom,Agent, or chain-root publication - resource bounds
- verification mode, runner count, and threshold
- price cap and tip
- timeout
- callback actor and handler
- optional runner pool requirement
- optional CBFS volume attachments
JobSpec, they are chain-visible. Do not put plaintext secrets
or private payloads directly in JobSpec.
2. Dispatcher filters runners
Candidate filtering is an on-chain deterministic state transition. The dispatcher can filter by:- registered and healthy runner state
- minimum stake and dynamic stake relative to declared max job value
- reputation threshold
- advertised job type and executor capabilities
- TEE capability, if required
- rate card and price cap
- current capacity / active job count
- entitlement / runner pool membership
- CBFS storage support and
encryption_pubkey, if the job mounts volumes
3. Dispatcher selects the committee
Runner selection is deterministic and verifiable. The current design uses a weighted Fisher-Yates draw, with weight based on effective stake and reputation (stake * sqrt(reputation), with a cold-start floor). Anyone with the same
state and seed can recompute the selection.
Single-runner jobs can be assigned immediately. Multi-runner jobs use the
delayed seed / pending-selection machinery described by CIP-2 and CIP-11 so the
committee cannot be steered by the block proposer.
4. Runner receives and executes
Current implementation: runners poll the chain/RPC for jobs assigned to their address. CIP-11 target: selected runners keep authenticated connections to validators, receive pushedJobAssignment frames, and self-rebroadcast their signed result
transactions if inclusion is not observed.
The actual job execution is off-chain. Runners may:
- call an LLM provider or local model
- make HTTP requests
- call MCP tools
- run a custom executor
- mount CBFS volumes for reads and writes
- request just-in-time secrets or volume keys through CBSS
- produce TEE attestations for TEE-gated modes
5. Result submission and reveal
Forverification.runners == 1, the runner can submit JobResultSubmit
directly. The verifier accepts the result under the selected single-runner
verification model.
For multi-runner jobs, current code uses commit-reveal:
JobResultCommit on-chain. Later, during
the reveal window, each runner submits JobResultSubmit with the result bytes
and salt. The verifier recomputes the commitment and rejects mismatches.
The CIP-2 target design additionally describes a designated aggregator that
collects reveals off-chain and submits an evidence bundle. That is a gas and
coordination optimization. The trust boundary is the same: the verifier judges
submitted evidence on-chain; the aggregator is not the source of truth.
6. Verification and callback
The Result Verifier does not re-run the LLM/API/MCP job. It verifies over the already-submitted result data:None: single result accepted without consensusEconomicBond: single runner with economic accountabilityMajorityVote: largest matching bucket wins if it meets thresholdStructuredMatch: schema/field/range/tolerance checksDeterministic: byte match for reproducible resultsSemanticSimilarity: model-pinned similarity clustering- DNS checks: specialized pass/fail aggregation for TXT/CNAME checks
VerifiedResult, marks the job completed,
removes it from runner assignment queues, and schedules the actor callback.
The callback payload is also chain-visible. If the callback stores the result
in actor state or emits it as an event, that result remains public chain data.
Data Visibility
On-chain and public
Treat this as public to validators, RPC nodes, indexers, and later chain observers.Off-chain but not inherently private
Off-chain and designed for confidentiality
Confidential does not mean invisible to the selected runner. If the job needs a
runner to call an API with a secret, that runner process receives the secret or
derived credential at execution time. TEE mode can reduce host/operator exposure,
but the protocol still needs a runtime that can use the value.
CBFS Boundary
CBFS is Cowboy’s durable blob/data plane. It stores objects as shards across relay nodes and gives Cowboy a way to keep large or private data out of chain state. For private volumes:- the client/runner encrypts data before sharding
- relay nodes see only opaque shard IDs and ciphertext
- manifests are encrypted
- the chain stores commitments, roots, policy, and billing state
- object and manifest data are plaintext
- anyone can read and verify against the committed root
- writes still require authorization
- large runner outputs
- agent workspace state
- tool outputs and intermediate artifacts
- datasets and model artifacts
- private files mounted into runner jobs
- callback payloads where the chain should only see a pointer and hash
answer.json to CBFS and then also submits the same answer in
JobResultSubmit.result, the answer is public.
CBSS Boundary
CBSS is the secret-release system. It is not a general result store. CBSS exists so actors and accounts can use credentials without writing plaintext secrets into actor code, transaction payloads, or chain state. The intended flow is:- Owner stores an encrypted secret in a private CBFS volume.
- Chain records secret metadata, policy, key hash, wrapped DEK, and release key/committee state.
- At job time, an authorized runner requests release.
- A threshold of CBSS proxies returns release material.
- The runner combines the material, unwraps the DEK, and uses the secret in memory for that job.
0x04 actor is the registry and accounting surface for this flow,
not a place where validators decrypt or execute with secret plaintext. CBSS
proxy daemons and the runner-side secrets client do the threshold release work
off-chain. If an implementation routes the secret through JobSpec,
JobResultSubmit.result, callback args, actor storage, or logs, that specific
flow has opted out of confidentiality.
Performance Model
Cowboy keeps slow or non-deterministic work off the validator hot path. Validators do:- execute deterministic PVM and system instructions
- write job and runner state
- compute deterministic selection
- verify submitted result bytes
- update account/state roots
- schedule callbacks and settle payment
- call LLMs
- make HTTP requests for a job
- run MCP tools
- read private CBFS blobs during block execution
- decrypt CBSS secrets during block execution
- one
JobSubmittransaction - one assignment write per selected runner
- for multi-runner jobs, one
JobResultCommitper runner - one
JobResultSubmitreveal per runner, unless the aggregator path is used - verifier work over submitted bytes
- callback execution
- result payload size in cells
- CBFS read/write latency and erasure-coding overhead, if mounted volumes are used
- block inclusion and finalization
- current polling interval, until CIP-11 push delivery replaces polling on the hot path
- runner execution time
- commit and reveal windows for multi-runner jobs
- callback scheduling
- CBFS relay latency for attached volumes
Incentives
Runner economics are built around stake, price caps, reputation, settlement, and slashing. Registration and eligibility:- runners stake CBY to register
- the minimum self-stake floor is 10,000 CBY, represented in chain units by the active code constants
- stake must also cover at least 1.5x the runner’s declared max job value
- runners advertise rate cards, job types, regions, TEE support, storage support, DNS capability, and other capabilities
- selection weight uses effective stake, including active delegated stake, and reputation
max_price + tipis escrowed at job submission when positive- default job settlement split is 89% runner share, 10% burn, 1% treasury
- the split is governance-configurable
- when the aggregator bonus path applies, the default bonus is 150 bps (1.5% of gross job payment), carved out of the runner share
- delegation can split a runner’s base payout with its delegators
- timeouts reduce reputation and can trigger replacement selection
- repeated timeouts can put a runner on probation
- minority or invalid results can be slashed
- commit-without-reveal can be classified as operational failure if a valid crash attestation exists; otherwise it is slashable dishonesty
- deregistration is blocked while assigned jobs, active delegation, or dispute cooldowns remain
- CBFS relays earn storage and transfer fees
- storage fees default to a 10% burn, 1% challenge pool, 89% relay split
- proof-of-retrievability misses or fraud can slash relay stake
- a payer escrows a session ceiling once
- payer and runner exchange cumulative vouchers off-chain
- runner settles the latest voucher on-chain periodically or at close
- the chain stores the session state, not every micro-call
Crypto and Trust Boundaries
Cowboy uses several cryptographic mechanisms for different jobs:
The chain is the public settlement and verification layer. CBFS and CBSS provide
private data and secret-management layers around it. Runners are the execution
layer that crosses between both worlds.
Current vs Target Behavior
The docs and CIPs describe both implemented behavior and target protocol shape. When answering design questions, separate these:Practical Design Rules
- If it must be private, do not put it directly in
JobSpec,JobResultSubmit.result, actor state, or event logs. - Use CBFS for large outputs, private artifacts, workspace state, and mounted files.
- Use CBSS for API keys, credentials, and volume DEK release.
- Keep secret-dependent branching inside the runner when the branch condition itself is confidential.
- Return a pointer plus hash on-chain when the full answer should stay off-chain.
- Use multi-runner verification when the result is public and independently reproducible or checkable.
- Use TEE modes when the runner must process confidential data and an attestation policy is acceptable.
- Keep callbacks compact. A callback that writes or emits the full answer makes it public again.

