Skip to main content

Overview

Cowboy configuration lives in three layers:
  1. Validator — a per-validator YAML file plus genesis.json, generated by the setup binary (./scripts/run_build.sh for a local devnet)
  2. Node environment variables — runtime knobs for the RPC server
  3. CLI project config.cowboy/config.json in your project, created by cowboy init

Validator config file (YAML)

Generated as test/<validator-pubkey>.yaml on a local devnet. Key fields:

Identity and keys

FieldMeaning
private_keyValidator’s Ed25519 consensus signing key (hex)
share, polynomialBLS12-381 threshold-signature share and network polynomial

Network

FieldDefault (local devnet)Meaning
portfrom --start-port (e.g. 3000)P2P consensus port
metrics_portport + 1Prometheus metrics endpoint
rpc_port4000HTTP RPC port; omit to disable RPC on this validator
localtrueLocal vs authenticated P2P mode
allowed_peers / bootstrappersgeneratedPeer public keys / initial bootstrap subset

Storage, runtime, logging

FieldMeaning
directoryState/block storage directory for this validator
worker_threadsTokio runtime threads
message_backlog, mailbox_size, deque_sizeEngine queue depths (devnet default 16384 / 16384 / 10)
signature_threadsDedicated BLS verification threads (default 2)
log_leveltrace / debug / info / warn / error
log_block_metrics_tableEmit the per-block gas-lane/timer metrics table to the log (default true)

Chain and services

FieldMeaning
genesis_config_pathPath to genesis.json (relative to the config file)
chain_id, networkUsually inherited from genesis; used for replay protection in storage delegation
enable_faucetServe /faucet (also requires a dev chain id — 1 or 100)
indexerOptional indexer URL the validator uploads chain data to (seeds, notarizations, finalizations). For historical-query fallback on the RPC side, use the INDEXER_URL env var instead

Genesis (genesis.json)

FieldMeaning
total_supplyTotal CBY supply in base units
accountsInitial balances (public_key_hex or deterministic seed, balance, nonce)
chain_idChain identifier — 1 local, 100 dev; gates the faucet
networkNetwork name (e.g. canyon, mesa) used in delegation-cert domain separation
system_deployersAddresses allowed to deploy actors with the sys.upgrade entitlement
relay_nodes, auto_drain_policyPre-registered CIP-9 relays and drain-settlement policy
reputation_configCIP-2 runner-reputation EMA parameters (half-life, floor/ceiling, jail-exit floor)

Node environment variables

VariableDefaultEffect
RPC_BIND_ADDRESS127.0.0.1RPC bind host (e.g. 0.0.0.0 to expose; the port comes from rpc_port and must not be included here)
RPC_GLOBAL_RATE_LIMIT_PER_SEC100Global RPC rate limit (cap 10,000)
RPC_SUBMIT_ADMISSION_CONCURRENCY32Concurrent /submit admission permits
FAUCET_RATE_PER_MIN5Faucet rate limit
RAS_EXPLORER_RATE_PER_SEC5Per-IP limit for explorer-facing /ras/* reads
STATE_SYNC_RATE_PER_SEC5Per-IP limit for /state/snapshot & /state/operations
CORS_ALLOWED_ORIGINShttp://localhost:3000CORS allowlist (comma-separated, or *)
COWBOY_DEV_MODEunsetServe Swagger UI (/swagger-ui) + OpenAPI spec — dev only
INDEXER_URLunsetFallback indexer for historical data
RAS_ALLOW_PRIVATE_RELAY_ENDPOINTSunsetPermit private-IP relay endpoints (devnet only; SSRF guard otherwise)
Consensus timing (leader timeout, certification timeout, fetch limits) is compiled into the validator binary and is not file-configurable.

CLI project config (.cowboy/config.json)

Created by cowboy init <network>; supports multiple named environments:
{
  "active": "local",
  "environments": {
    "local": {
      "rpc_url": "http://localhost:4000",
      "key_file": "keys/local",
      "watchtower_registry": null,
      "identity": "0x..."
    }
  }
}
FieldMeaning
activeCurrently selected environment
rpc_urlRPC endpoint for that environment
key_filePath to the secp256k1 key, relative to .cowboy/
watchtower_registryWatchtower registry actor address (optional)
identityNetwork identity (BLS polynomial) for verification (optional)
Resolution order (first match wins):
  • Private key: --private-key flag → COWBOY_PRIVATE_KEY env → key_file of the active environment → legacy .cowboy/key
  • RPC URL: --rpc-url flag → COWBOY_RPC_URL env → active environment’s rpc_urlhttp://localhost:4000
cowboy init local targets a local validator; cowboy init dev targets the hosted devnet. See cowboy init.

Runner daemon

The off-chain runner reads its executor credentials from the environment — OPENAI_API_KEY, ANTHROPIC_API_KEY, and LLM_MODEL for the LLM executor — generates its key material on first run, and registers on-chain with a stake (cowboy runner register --stake 50000, denominated in CBY). Stake gates eligibility twice: registration requires stake ≥ 1.5× the runner’s declared maximum job value, and at dispatch a runner is only a candidate for jobs whose price its effective stake covers at 1.5×. See cowboy runner and CIP-2.

Further reading