// bzminer configuration (config.txt), JSON. Every field is optional; the
// values below are the defaults. Override any of them on the command line
// with:  --set <path>=<value>
{
  // Default named OC preset. CLI: --oc-profile NAME; per-card selection: --oc-profile PCI=NAME. Both fixed mining and profit switching use it
  "oc_profile": "",
  // Reusable presets: {"eco":{"oc":{"power_limit":"200"},"oc_algos":{"pearl":{"lock_memory_clock":"810"}}}}. Selected preset fields override global oc/oc_algos; explicit devices[] knobs win
  "oc_profiles": {},
  // Per-algorithm OC defaults, also used outside profit switching. Example: {"pearl":{"power_limit":"200"}}. CLI: --oc-algo pearl power=200
  "oc_algos": {},
  "log": {
    // Log verbosity: network, debug, info, warn, or error (network = the exact pool/stratum wire messages). `trace` is developer detail and is reached only with --internal-log; a config that still says trace is read as network
    "level": "info",
    // Write the log to this file instead of bzminer.worker.log. There is always a file log; this only changes its name/path
    "file": "",
    // Verbosity of the LOG FILE, when it should differ from the console. Same names as `level`. Empty = follow `level`, INCLUDING live changes from the [+/-] keys. Set this to pin the file: e.g. file_level debug with level info keeps the screen readable while still capturing a file worth sending to support (CLI: --logfile-level)
    "file_level": "",
    // What to do with an existing log file: append (default - what bzminer has always done), overwrite (truncate, so the file is only this run), or timestamp (leave it and open bzminer.worker.<date>_<time>.log, keeping every run). A watchdog RESTART never truncates - it would delete the crash that caused it - so overwrite appends from the second worker onwards. CLI: --logfile-mode
    "file_mode": "append",
    // Write the MONITOR screen's sensor table to this file, one block per sample. Only while that screen is being viewed - on any other output there is nothing of its to record. Empty (default) = no monitor log. CLI: --monitor-logfile
    "monitor_file": "",
    // The same three choices as `file_mode`, for the monitor log. Separate so a rolling appended miner log can sit beside a timestamped file per monitoring session. CLI: --monitor-logfile-mode
    "monitor_file_mode": "append",
    // Longest single field kept in a `network`-level wire log line, in characters. Anything longer becomes "<elided, N chars>" and runs of unprintable bytes become "<binary, N bytes>" - the rest of the frame is logged exactly as it went over the wire, so a Pearl share's ~140 KB proof no longer buries the frames either side of it. 0 prints raw frames with nothing removed. CLI: --log-wire-max
    "wire_max": 256
  },
  "network": {
    // Pool / network socket timeout, in milliseconds
    "timeout_ms": 30000,
    // Delay before reconnecting after a disconnect, in milliseconds
    "reconnect_ms": 5000,
    // Seconds between primary-pool probes while using a fallback pool; values below 5 use 300
    "primary_probe_s": 300,
    // Route all pool connections through a SOCKS5 proxy: socks5://[user:pass@]host:port (empty = direct). CLI: --proxy
    "proxy": ""
  },
  "plugins": {
    // Auto-download/update plugins from the manifest: auto|on|off (auto = on for the lite build, off for the full build). CLI: --plugin-update
    "update": "auto",
    // Override the plugin manifest URL (empty = built-in GitHub default + bzminer.com fallback). CLI: --plugin-manifest
    "manifest_url": ""
  },
  "backends": {
    // Enable the CPU compute backend
    "cpu": true,
    // Enable the CUDA compute backend
    "cuda": true,
    // Enable the OpenCL compute backend, including legacy AMD GPUs with compatible kernels
    "opencl": true,
    // Enable the Metal compute backend
    "metal": true,
    // Expose OpenCL devices normally owned by CUDA or Metal; disable the other backend to avoid mining a GPU twice
    "opencl_include_owned_devices": false
  },
  "quantus": {
    // CUDA hashes per launch; null selects the device default
    "cuda_batch": null,
    // CUDA block size; null selects the kernel default
    "cuda_block": null,
    // Custom CUDA kernel layout (0 generic, 1 affine, 2 prepared affine); use null for bundled images
    "cuda_affine": null,
    // Custom OpenCL kernel layout (0 generic, 1 affine, 2 prepared affine); use null for bundled images
    "opencl_affine": null,
    // CUDA double buffering; null selects the qualified RTX 4090 default
    "double_buffer": null,
    // CUDA speculative cancellation; null selects the qualified RTX 4090 default
    "cancel_speculative": null,
    // CUDA current-work cancellation; null selects the qualified RTX 4090 default
    "cancel_current": null,
    // QUIC authentication token file; takes precedence over auth_token
    "auth_token_file": "",
    // QUIC authentication token; empty uses the configured wallet
    "auth_token": "",
    // QUIC server certificate SHA-256 pin file; takes precedence over tls_pin
    "tls_pin_file": "",
    // QUIC server certificate SHA-256 pin in hex
    "tls_pin": ""
  },
  "safety": {
    // Pause a GPU (mining stops on that card only, auto-resumes when it cools) when its core or hotspot temp exceeds this, in C. 0 = off
    "max_temp_c": 0,
    // Pause a GPU when its board power exceeds this, in W. 0 = off
    "max_power_w": 0,
    // Pause a GPU when its 12VHPWR CONNECTOR current (aggregate of all pins, not per-pin) exceeds this, in A. NVIDIA Blackwell on Windows only. 0 = off
    "max_current_a": 0,
    // Pause a GPU when its WORST SINGLE 12VHPWR pin exceeds this, in A - the connector failure mode the aggregate cannot see. Needs per-pin shunts: ASUS ROG Astral RTX 5080/5090 on Windows only. 0 = off
    "max_pin_current_a": 0,
    // Pause a GPU when the difference between its highest- and lowest-current 12VHPWR pins exceeds this, in A. ASUS ROG Astral RTX 5080/5090 on Windows only. GPUProbe's sample alarm uses 5.5 A. 0 = off
    "max_pin_imbalance_a": 0,
    // How long a card must stay over a limit before it is paused, in seconds (rejects transient spikes)
    "sustain_s": 15,
    // Resume only once the value drops to (limit - this), in the tripped limit's unit (C/W/A) - hysteresis so it does not flap
    "resume_margin": 5,
    // And stayed under the resume point this long, in seconds
    "resume_s": 5
  },
  "stall_guard": {
    // Restart mining (device implementations rebuilt, pools reconnected) when the rig is connected and reporting a hashrate but the pool credits no shares, or a card stops adding hashes (worker_hang_s). false = off: mining is never restarted for a stall. Every restart line names the setting that caused it. CLI: --stall-guard on|off
    "enabled": true,
    // Never act before this long without an accepted share, in seconds - the floor under gap_multiple. CLI: --stall-min-idle-s
    "min_idle_s": 900,
    // Nor before this many times how long a share SHOULD take here - the measured mean interval between this algorithm's shares, or what the difficulty predicts (the est. tbs under the table) until two shares exist to measure one - whichever wait is longer. Shares are Poisson-distributed, so a genuine gap this long has probability e^-20. Lower it to detect a stall sooner on a rig whose shares are hours apart, at the cost of restarting a merely unlucky one. CLI: --stall-gap-multiple
    "gap_multiple": 20,
    // Minimum seconds between two recoveries
    "cooldown_s": 1800,
    // Give up after this many recoveries in a row that produced no accepted share - a restart loop mines less than a stall. 0 = never give up
    "max_ineffective": 3,
    // The OTHER signal: a device thread that has stopped hashing at all (no completed batch, so not one hash added) while the rig is mining and that card is not parked. Try a restart after this many seconds. Must clear the longest legitimate silence a device can have, which is a BUILD - a DAG, a kernel load, a PCIe probe - not a search. Counts HASHES, not shares: a healthy card adds some every batch at any pool difficulty, so unlike the share rule this window does not grow with the expected share time. When the power tuner is running, the point in force when the card stopped is counted as a fault. 0 = off. CLI: --worker-hang-s
    "worker_hang_s": 300,
    // And if that did not help, or did not finish - a thread wedged inside a driver call cannot be joined, so the restart itself blocks on it - stop answering the process watchdog after this many seconds so it kills and restarts the miner. That is the only thing that clears such a thread. 0 = off. CLI: --worker-kill-s
    "worker_kill_s": 900
  },
  // Signed executable update on launch: off, latest, or a GitHub version tag (e.g. v100.21). CLI: --auto-update
  "auto-update": "off",
  // Device-monitor mode: telemetry + web UI only, no mining (CLI: --dmon)
  "dmon": false,
  // Serve the monitoring web UI + JSON API (needs the webui plugin; no plugin = no HTTP server)
  "http_enabled": true,
  // Web server bind address ("0.0.0.0" allows LAN access)
  "http_address": "127.0.0.1",
  // Web server TCP port
  "http_port": 4014,
  // Stop this rig announcing itself on UDP 4014 and stop it listening for other bzminers. That announce is what fills the web UI's farm view - every instance on the network, their combined hashrate and power, and a link to each one's dashboard. It carries the rig name, web port, version and this rig's totals, and nothing else; turn it off on a network you do not control. CLI: --disable_udp
  "disable_udp": false,
  // Address the proxy listener (pools[].proxy_port) binds: "0.0.0.0" for every interface, or one interface's address. Rig-wide - a farm has one network. CLI: --proxy_bind
  "proxy_bind": "0.0.0.0",
  // Password every instance connecting to this proxy must present (its --pass). Empty accepts any instance that can reach the port - fine on a private LAN, not elsewhere. CLI: --proxy_pass
  "proxy_pass": "",
  // On startup, write the resolved config to config.effective.json
  "save_effective": false,
  // Apply bzminer's built-in, measured overclock to the few cards that have one, only when nothing (oc, oc_algos, an oc_profile or a devices[] knob) asks an overclock of that card. Today: Pearl on the RTX PRO 6000 Blackwell Workstation Edition, fan 100% with the core locked at 2700 MHz and a +1000 MHz offset. It is logged when applied and reset at exit like any startup overclock. CLI: --oc-card-defaults 0
  "oc_card_defaults": true,
  // Mine each algorithm's in-process bench job instead of a pool: no network, no wallet. Benches the active pools' algorithms without dialling their URLs, or xelis when no pool is active. CLI: --bench (or --test), which benches xelis unless -a names another algorithm
  "bench": false,
  // Run a local stratum server and mine it over real TCP through each algorithm's own pool client: no pool, no wallet. Share difficulty: benchmark_diff. Benchmarks the active pools' algorithms without dialling their URLs, or xelis when no pool is active. CLI: --benchmark [difficulty], which benchmarks xelis unless -a names another algorithm
  "benchmark": false,
  // The --benchmark share difficulty, in each algorithm's POOL units - what its pools mean by a difficulty, which is not the same work for every algorithm (each plugin's README gives its unit). 0 = none given: every algorithm serves the share target of its --bench job, so the two modes do the same work. Above 0 also turns benchmark mode on. A difficulty an algorithm's pool client cannot use is replaced by one it can (its plugin's README says which), and the log says so. Algorithms of the sha256d, cn, randomx, quantus and bramring plugins have no benchmark server: they mine their --bench job and ignore this. 0 or more. CLI: --benchmark <difficulty>
  "benchmark_diff": 0,
  // How long --benchmark keeps one deterministic job, in ms (1000 or more). A persistent job makes fixed-difficulty share accounting honest for memory-hard kernels. Ignored by --bench, whose job sources keep a fixed cadence of their own, and by the algorithms with no benchmark server. CLI: --benchmark-job-interval
  "benchmark_job_interval_ms": 600000,
  // How often the 'log' output reprints the device/pool table, in ms. Separate from --interval, which is how often the engine PUBLISHES a snapshot (the web UI and metrics want that fast). 0 = print on every snapshot. CLI: --log-table-interval
  "log_table_interval": 30000,
  // How often the 'tui' dashboard redraws, in ms. A keypress redraws immediately regardless. CLI: --tui-interval
  "tui_interval": 400,
  // Columns on the MONITORING sensor table (--dmon, and the monitoring screen of the tui/log outputs). Comma- or space-separated. Takes single columns (memused, memfree, memtotal, util, memutil, core, mem, temp, memtemp, hotspot, toptemps, power, fan), sensor GROUPS that expand to everything present (temps, clocks, powers, fans, volts, currents, pcie, memory, utilization, performance, all), and any vendor metric key this rig's backends emit (pcie.tx, temp.vr_core, ...). Empty = memused,memfree,util,memutil,core,mem,temp,memtemp,hotspot. Run 'bzminer --list-columns' for every name available on THIS machine. CLI: --metrics
  "metrics": "",
  // Columns on the mining screen's DEVICE table (the hardware box above the algorithm box). Same vocabulary as metrics above. Empty = memfree,memtotal,core,mem,fan,power,toptemps - toptemps is the two hottest of core/hotspot/memory on each card, each tagged with its sensor ("78C hot, 70C mem"). Run 'bzminer --list-columns' for the full list. CLI: --device-columns
  "device_columns": "",
  // Columns on the MINING table (the algorithm box: shares, hashrate, pool). Its own vocabulary - id, name, cfg, shares, accepted, rejected, pending, stale, errors, eff, poolhr, hr, avghr, power, temp, fan, core, mem, tbs, status, poolinfo. Empty = id,cfg,tbs,shares,eff,poolhr,hr,status,poolinfo. `tbs` is the MEASURED average time between shares found - what a device delivers, as opposed to the `est. tbs` its difficulty predicts. `poolinfo` is the pool's own column - height, difficulty, est. tbs and latency, one per row. Warthog leaves it out by default, because its status column carries the rig summary and wants the width; name it explicitly to get it there too. Drop it and those four pack into 'status' instead. Drop 'status' as well and the per-device status text goes with them - nothing is left wide enough to hold it. Run 'bzminer --list-columns' for the full list. CLI: --mining-columns
  "mining_columns": "",
  // Collect CPU telemetry (per-core clocks, temperatures, usage, CCD sensors). Set false on a GPU rig that does not want them, or where the reads need a privileged driver - GPU metrics are unaffected. CLI: --cpu-metrics 0
  "cpu_metrics": true,
  // Reserve a private slice of the last-level cache for each CPU mining thread (Linux, root, and a CPU with cache allocation - AMD Zen 2 and newer, or Intel with RDT). RandomX's 2 MiB scratchpads add up to exactly the L3 on a typical rig, so left alone they evict one another; fencing them off measured +1.15% on a Threadripper PRO 9955WX (Zen 5), and -0.86% on Zen 4 - which is why it is only applied on Zen 5. Machine-wide while mining and restored on exit. CLI: --cache-qos 0
  "cache_qos": true,
  // Read the motherboard's sensor chip directly for fan speeds when no kernel driver publishes them (Linux, x86, and only as root). Many boards - mini-PCs especially - carry an ITE or Nuvoton chip that Linux has no driver for, and then nothing reports a CPU fan at all. Reads only, and never runs where hwmon already has fans. Set false to leave that chip alone. CLI: --superio-fans 0
  "superio_fans": true,
  // Console width in characters. 0 = use the terminal's own width and follow a resize, which is the default and is what you want. Set it to pin the width - for a terminal that misreports, or output being captured with no tty to ask. Pinning it LARGER than the real window makes every row wrap and the dashboard scroll, so measure before setting it. CLI: --tui-width
  "tui_width": 0,
  // Console height in rows. 0 = use the terminal's own height and follow a resize. Independent of tui_width: pinning one leaves the other tracking the window, and where there is no window to ask the unpinned one falls back to 80x25 rather than discarding both. CLI: --tui-height
  "tui_height": 0,
  // Seconds the reported hashrate averages over. A GPU's hash counter advances one batch at a time, so an un-averaged rate reads 0, 0, 0, BURST, 0; this window is what makes it steady. Raise it for a calmer number on a bursty rig, lower it to see an intensity or thread change take effect sooner. Does not affect the 'avg' figure, which is always since start. CLI: --hashrate-window
  "hashrate_window": 30,
  // Behave as if this CPU had no SSE4.1/AES/PCLMUL, nor anything built on them. For measuring a narrower path than the hardware has - here, the portable fallback. CLI: --disable_sse
  "disable_sse": false,
  // Behave as if there were no AVX/AVX2. VAES and AVX-512 go with it, since both need AVX: a CPU with AVX-512 and no AVX2 does not exist, and pretending otherwise would select a path you meant to exclude. This is the switch for measuring the AVX2 path most Zen3-and-older rigs actually run. CLI: --disable_avx2
  "disable_avx2": false,
  // Behave as if there were no AVX-512. AMX goes with it, riding on the same register state. CLI: --disable_avx512
  "disable_avx512": false,
  // Behave as if there were no VAES/VPCLMULQDQ. CLI: --disable_vaes
  "disable_vaes": false,
  // Behave as if there were no AMX. CLI: --disable_amx
  "disable_amx": false,
  // AMD BC-250 only; ignored on every other machine. The board ships deliberately cut down - the shader array locked to 1500 MHz, 2 of its 8 CPU cores and 16 of its 40 compute units switched off - and none of it is a fuse. `gpu` lets bzminer manage the shader clock: with `gpu_mhz` 0 the clock is left to the OS (an mmpOS/HiveOS overclock or a governor applies as set) and only a clock a previous bzminer run left forced is released; a value 500-2000 pins that clock, below stock included, with `gpu_mv` (700-1000) overriding the voltage the curve would give it. Measured on a BC-250 at 1800, warthog's janus score gains 6.8% for 10% more power, while xelis gains nothing, being bound by memory rather than compute. `cpu` enables all 8 cores and takes effect on the NEXT boot, the core mask being read when the OS enumerates CPUs. `cu` is OPT-IN: it enables all 40 compute units LIVE at startup with no reboot or driver reload - Pearl measured 2.105 -> 3.451 T MAC/s - and needs root. It is off by default because the 16 extra CUs were switched off at the factory and on some boards they are defective, faulting only under load; stress test a board before trusting it. All of it is volatile - a cold power cycle restores the factory setup. CLI: --no-bc250-gpu / --no-bc250-cpu / --bc250-cu / --bc250-gpu-clock / --bc250-gpu-mv
  "bc250": {"gpu": true, "cpu": true, "cu": false, "gpu_mhz": 0, "gpu_mv": 0},
  // Disable 1 GB huge pages while retaining smaller huge pages
  "disable_1gb_huge_pages": false,
  // Allocate with ordinary pages rather than huge ones. Huge pages are meant to help - a large ring is far fewer TLB entries at 2 MB than at 4 KB - but on a working set that already fits the TLB they buy nothing while still needing privileges. This is how a rig owner finds out which case theirs is. CLI: --disable_huge_pages
  "disable_huge_pages": false,
  // Active pool(s) from pools[]: an index (0 or "0"), an array ([0, 2] = multiple pools), or [] for monitoring mode. Omit = all pools (first primary, rest failover). CLI: --pool
  "pool": [],
  // Override the algorithm on the configured pools, whatever wrote them. One algorithm ("warthog") sets pool 0; a list sets one pool each, in order - either JSON (["warthog", "xelis"]) or comma separated ("warthog,xelis"). It is TOP-LEVEL, not a field inside pools[], because a mining OS rewrites the pool block from its own algorithm list - so an algorithm bzminer gained after that front-end shipped cannot be selected in its UI, and an override placed inside pools[] would be overwritten by it. CLI: --force_algo
  "force_algo": "",
  // Which GPUs mine, as a comma- or space-separated list of device numbers and/or pci ids ("0,2", "29:0", "0000:29:00"). Bare entries are an ALLOWLIST - only those cards mine - and entries prefixed '!' a DENYLIST ("!1" = every GPU but device 1). The two cannot be mixed, since "0,!1" has two readings and neither is obviously right. Empty = every GPU mines. This is the one-line form of devices[].enabled and the two are ANDed, so a card disabled in either place does not mine. GPUs only: the CPU is governed by device_types.cpu / cpu_threads. RIG-WIDE - to keep a card out of ONE algorithm of several, name it in that algorithm's pools[].devices ("!1") instead. CLI: --devices
  "device_select": "",
  // How many times the watchdog restarts a crashed or hung worker before giving up. Counts only crashes that come close together: a worker that ran for 10 minutes or more resets the count, so a rig that crashes once in a while keeps being restarted. 0 = never give up. CLI: --watchdog-restarts
  "watchdog_restarts": 5,
  // Additional independent mining instances per CPU/GPU (0..63). 0 means no copies; 1 means two instances. devices[].duplicates overrides this per physical device. CLI: --duplicate-devices
  "duplicate_devices": 0,
  // Mining intensity for every GPU that does not name its own in devices[]: how much work one launch is asked for, in units of 65536 nonces (1-4096). 0 = auto, which lets the algorithm choose. devices[].intensity is addressed by enumeration index and still wins where it is set, so this is the one to use for a whole rig. Shown as i<n> in the mining table's cfg column. CLI: --intensity
  "intensity": 0,
  // How many CPU threads mine. 0 = auto, which holds back one processor on a small machine and two above 8 threads, so the miner's own threads - and yours - are not competing with workers. A negative value leaves that many available logical processors free for other work (-4 uses 28 of 32), with at least one mining thread. Set it to the full thread count to mine on everything. Caps every CPU pool the run starts, including an algorithm's own - Pearl's share prover used to size itself from the machine and ignore this. Movable while mining with the console's [t]/[T] keys. CLI: --cpu_threads
  "cpu_threads": 0,
  // Which processors mine, as a list: "0-7,16,18". Takes PRECEDENCE over cpu_threads, since it names the processors outright. Everything not listed is left for the miner's management threads. CLI: --cpu_affinity
  "cpu_affinity": "",
  // Measure each GPU's host<->device PCIe bandwidth once at startup, for algorithms that stream results off the GPU and use it as a hard ceiling (warthog); other algorithms skip it. Costs ~1s per GPU. CLI: --bandwidth-test
  "bandwidth_test": true,
  // Per-copy buffer size for that measurement, in MiB. Large enough to measure throughput rather than launch latency
  "bandwidth_test_mb": 64,
  // Dev-fee TEST CYCLE: mine for you this many seconds, then for the algorithm's author, and repeat. 0 = off, the normal schedule. The real one pays the fee as a time debt, so its first slice is five minutes into a run and its second an hour later - correct, and impossible to sit and watch. This makes the whole cycle visible in a minute: the switch, the dev pool's subscribe, the switch back, your own work resuming. A diagnostic, not a tuning knob - the cycle can only ever pay MORE than the declared fee, never less. CLI: --test-dev-fee <user_s>[:<dev_s>]
  "test_dev_fee_user_seconds": 0,
  // How long each dev leg of that cycle runs. 0 = the same as test_dev_fee_user_seconds, so a bare `--test-dev-fee 30` is 30 seconds each way. Raised automatically if the split you asked for would come to less than the declared fee
  "test_dev_fee_dev_seconds": 0,
  "pools": [
    {
      // Pool URL (CLI: -p / --pool / --url; stratum+ssl:// for TLS). Repeat the flag for backups - the first is the primary and the rest are rotated through on disconnection
      "url": "stratum+tcp://us.pearl.herominers.com:1200",
      // Payout wallet address (CLI: -w / --wallet)
      "wallet": "<your wallet address>",
      // Worker / rig name; sent to the pool as wallet.worker (CLI: --worker)
      "worker": "rig",
      // Password (CLI: --pass; note -p is the POOL URL, as in bzminer 1.x)
      "pass": "x",
      // Algorithm (CLI: -a / --algo). Active pools are grouped by algorithm and every algorithm mines AT ONCE, each on its own devices: entries sharing an algorithm are one group, primary first, the rest its failovers
      "algo": "pearl",
      // stratum+ssl: verify the pool's TLS certificate chain + hostname (CLI: --ssl-verify)
      "ssl_verify": false,
      // LEGACY combined login, sent verbatim instead of wallet.worker. Only for a pool that wants something other than that shape - set wallet and worker instead (CLI: -u / --user)
      "user": "",
      // WHICH devices mine this pool's algorithm when the rig runs more than one: device numbers, pci ids, '!' exclusions, and the types cpu, gpu, nvidia, amd, intel, none. Bare entries = only those ("nvidia", "0,2"), '!' entries = everything but those ("!cpu" = this algorithm stays off the CPU and the others keep it; "!1" = all but device 1), "none" = nothing on this rig (an algorithm this rig only PROXIES). This is the per-algorithm form of device_types / device_select, which are rig-wide. Empty = every device this algorithm can use. Any device mines any number of algorithms side by side (one context each, or a plugin's dual-mining route for a pair that has one), and the CPU's threads are split among them; to keep algorithms on different cards, give each its own list. Two entries of the same algorithm naming DIFFERENT devices are two groups (CLI: --devices<N>, or --cpu<N> 0 / --nvidia<N> 0 / --amd<N> 0 / --intel<N> 0 for one type)
      "devices": "",
      // How many of the rig's CPU threads this algorithm gets when it shares the CPU with another. 0 = an even share of the rig-wide cpu_threads budget. Placed on unused processors first; counts that add up to more than there are overlap and share (CLI: --cpu_threads<N>)
      "cpu_threads": 0,
      // ...or the processors this algorithm mines on, named outright ("0-7,16"). Wins over cpu_threads and is honoured exactly, overlaps included (CLI: --cpu_affinity<N>)
      "cpu_affinity": "",
      // Serve this algorithm's work to OTHER bzminer instances on this TCP port: this instance keeps the one pool connection, and every bzminer started with -p bzproxy://<this host>:<port> mines the same jobs through it. Their shares go upstream from here, and each instance is shown here as one light-blue row with its hashrate, power and devices. The port is TLS. Each rig keeps its own dev fee and pays it through a tunnel this proxy opens to the algorithm's fee pools, so the rigs need no internet of their own; this proxy signals its own slice so the farm pays in one window. A proxy may mine on its own devices as well, or on none (--devices none). 0 = off. Per algorithm, like devices (CLI: --proxy_port<N>)
      "proxy_port": 0,
      // Algorithms THIS pool offers when algo is mo. Empty uses mo.algos above. Two mo pools are two connections in the one miner: the pool picks one algorithm per connection, so the GPUs and the CPU each get their own list and their own devices. cn is cn/gpu. Clocks for each algorithm are oc_algos.<algo> (CLI: --mo-algos<N>, --oc-algo)
      "mo_algos": ""
    }
  ],
  "devices": [
    {
      // WITHOUT pci: the enumeration ordinal this entry configures (counts EVERY device enumerated, so disabling one does not renumber the others). WITH pci: the device NUMBER that card is given - what --devices and pools[].devices select it by, and the order the mining table lists devices in; cards not renumbered keep enumeration order and fill the numbers left over. Omitted (-1) = this entry addresses whatever pci says and nothing else, so an entry that only names a card cannot also configure device 0
      "index": -1,
      // Mining intensity: how much work one GPU launch is asked for, in units of 65536 nonces (1-4096). 0 = auto, which is 64. Higher keeps the card busy longer per launch; lower picks up a new job sooner. Shown as i<n> in the mining table's cfg column
      "intensity": 0,
      // Additional copies of this physical device (0..63); -1 inherits duplicate_devices. Copies have separate selection IDs and mining state, sharing physical sensors and clocks
      "duplicates": -1,
      // Whether to mine on this device. To turn off a whole vendor or the CPU instead, use device_types below
      "enabled": true,
      // WHICH card this entry is, as "domain:bus:device" - written by bzminer on first run, and the field entries are matched on. Preferred over index, which moves when a card is added or removed
      "pci": "",
      // The card's name, written by bzminer so the file says what it means without the rig in front of you. Not read back - pci is the key
      "name": "",
      // The card's architecture ("Ampere", "RDNA3"), written by bzminer. Not read back
      "architecture": "",
      // The board's PCI subsystem pair, "vendor:device" - written by bzminer. The device id alone names the CHIP, which is the same on a reference card and a partner's; this names the board. Not read back
      "pci_subsystem_id": "",
      // This card's core VF-curve offset in MHz. Empty = use the global oc.core_clock_offset
      "core_clock_offset": "",
      // This card's memory VF-curve offset in MHz. Empty = use the global oc.memory_clock_offset
      "memory_clock_offset": "",
      // This card's board power cap in watts. Empty = use the global oc.power_limit. Outside the card's own range it is set to the card's minimum or maximum, and the log says which
      "power_limit": "",
      // Pin THIS card's core clock in MHz (0 = unlock). Empty = use the global oc.lock_core_clock. A lock pins the clock where an offset shifts the curve and still lets it boost - a card can carry both
      "lock_core_clock": "",
      // Pin THIS card's memory clock in MHz (0 = unlock). Empty = use the global oc.lock_memory_clock. Only accepted at one of the board's own supported clocks; bzminer says which one you will get if you ask for another
      "lock_memory_clock": "",
      // Run THIS card's locked core clock at this voltage, in mV (0 = release). Empty = use the global oc.lock_core_voltage
      "lock_core_voltage": "",
      // AMD: THIS card's core voltage offset in mV, negative = undervolt (0 = stock). Empty = use the global oc.core_voltage_offset
      "core_voltage_offset": "",
      // This card's fan: a fixed duty ("70") or a temperature curve, same syntax as oc.fan_speed. Empty = use the global one
      "fan_speed": "",
      // Named oc_profiles entry for this card. Includes its base oc and oc_algos settings, in both switching and fixed mining. Explicit card knobs win. CLI: --oc-profile <device>=<name>
      "oc_profile": ""
    }
  ],
  "device_types": {
    // Mine on NVIDIA devices. RIG-WIDE: false keeps them out of EVERY algorithm the rig mines; to keep them out of one algorithm of several, put "!nvidia" in that algorithm's pools[].devices (CLI: --nvidia, or --nvidia2 0 for algorithm 2 alone)
    "nvidia": true,
    // Mine on AMD devices. Rig-wide, as above: "!amd" in pools[].devices is the per-algorithm form (CLI: --amd, or --amd2 0)
    "amd": true,
    // Mine on Intel devices. Rig-wide, as above: "!intel" in pools[].devices is the per-algorithm form (CLI: --intel, or --intel2 0)
    "intel": true,
    // Mine on integrated GPUs (a CPU's built-in graphics). A filter across the vendors, not a vendor: false keeps every integrated GPU out and leaves the discrete cards alone; "!igpu" in pools[].devices is the per-algorithm form (CLI: --igpu 0, --igpu2 0, or --devices !igpu). Naming it on the command line (--igpu) mines on the integrated GPUs only
    "igpu": true,
    // Written by the command line's bare --igpu: integrated GPUs mine whatever their vendor flag says. Leave it alone in a config file unless you mean it
    "igpu_named": false,
    // Mine on the CPU. RIG-WIDE: false takes the CPU away from EVERY algorithm. A rig mining two algorithms that wants the CPU on only one of them leaves this true and puts "!cpu" in the OTHER algorithm's pools[].devices (CLI: --cpu, or --cpu2 0 for algorithm 2 alone)
    "cpu": true
  },
  "oc": {
    // Board power cap in watts. One value for every card, or a per-device list ("160,180"). A value outside a card's own range is set to that card's minimum or maximum rather than ignored, and the log says so. NVIDIA only. Like every setting in this block it needs bzminer running as administrator (Windows) or root (Linux); without that each one is refused, with a warning (CLI: --oc-power-limit)
    "power_limit": "",
    // Core VF-curve offset in MHz (CLI: --oc-core-clock-offset)
    "core_clock_offset": "",
    // Memory VF-curve offset in MHz (CLI: --oc-memory-clock-offset)
    "memory_clock_offset": "",
    // Pin the core clock in MHz instead of letting boost wander; 0 = unlock (CLI: --oc-lock-core-clock)
    "lock_core_clock": "",
    // Pin the memory clock in MHz; 0 = unlock (CLI: --oc-lock-memory-clock)
    "lock_memory_clock": "",
    // Run the LOCKED core clock at this voltage, in mV - what Afterburner calls locking a voltage to a frequency, and an undervolt when the voltage is below what the card would use. Needs lock_core_clock, and replaces core_clock_offset: bzminer reads the card's voltage/frequency curve and sets the offset that puts this voltage at the locked clock, then says which voltage it landed on (the curve moves in steps, so it can be one step off). Windows only; 0 = release. NVIDIA: by moving the core offset. Intel Arc: by rewriting the card's voltage curve (the whole curve moves so the locked clock lands on this voltage, within -150..+60 mV of the card's own), which Intel refuses until YOU accept its overclock waiver - set accept_intel_waiver. Console: oc clock=2400 voltage=800 (CLI: --oc-lock-core-voltage)
    "lock_core_voltage": "",
    // AMD (RDNA2 and newer): offset the WHOLE core voltage/frequency curve by this many mV, negative = undervolt - AMD's voltage offset, the one LACT and Adrenalin set. Needs no clock lock: the card keeps boosting, at less voltage for every clock. Clamped to the card's own range (RDNA3 -450..0, RDNA4 -200..0) and never above 0. One value or a per-device list (CLI: --oc-core-voltage-offset)
    "core_voltage_offset": "",
    // Fixed duty ("60") or a temperature curve: t:<target>[<min>-<max>] for CORE temp, th:... for HOTSPOT, tm:... for MEMORY, e.g. "t:60[25-75] tm:80[50-100]". With several clauses the one demanding the most cooling wins. The fan moves about a point per second toward the target, so it settles instead of hunting. NVIDIA and AMD; an Intel card reports its fan but exposes no way to drive it (CLI: --oc-fan-speed)
    "fan_speed": "",
    // Apply the whole startup overclock this many milliseconds AFTER the pool connects, instead of at startup. A card clocked before it has a job can crash on its first launch, and a rig that never reaches its pool is never clocked. Mining only - monitoring mode has no pool and applies immediately. 0 = at startup (CLI: --oc-delay-ms)
    "delay_ms": 0,
    // null = on an algorithm switch, reset a card this run overclocked (a card with no OC asked of it is never touched); false = preserve external OC; true = reset before applying OC (CLI: --oc-reset [true|false])
    "reset": null,
    // Intel Arc: accept Intel's overclock waiver, which Intel requires before any VOLTAGE change (lock_core_voltage). Intel records that YOU accept a shorter life for the card; bzminer never accepts it for you, and without this the voltage knob stays refused (CLI: --oc-accept-intel-waiver)
    "accept_intel_waiver": false,
    // NVIDIA: undervolt each mining card at its locked core clock (lock_core_clock is required), giving up at most power_tuner_loss percent of its rate for power. bzminer measures the starting point, raises the core offset a VF step at a time until the card faults or slows, then lowers the lock while the rate stays within the budget, and keeps the best TH/W point one step clear of any fault. Faults restart the worker and tuning resumes; expect 15-30 minutes per card, best done one card at a time. The result is saved per card, algorithm and starting overclock in power-tuner.json and reused on later starts; a fault in service moves it down a step (CLI: --oc-power-tuner)
    "power_tuner": false,
    // Most rate the power tuner may give up, in percent of the starting point, 0.1-25 (CLI: --oc-power-tuner-loss)
    "power_tuner_loss": 4.5,
    // Forget the saved power tuner result for the current setup and tune again (CLI: --oc-power-tuner-reset)
    "power_tuner_reset": false
  },
  "utilities": {
    // Allowlisted utility IDs to complete before mining starts; any failure stops startup. CLI: --startup-utility ID (repeatable). List IDs with --list-utilities; run once with --utility ID. Empty by default.
    "startup": []
  },
  "mo": {
    // Algorithms a MoneroOcean connection offers when that pool leaves mo_algos empty. Comma-separated registry names. Empty offers kawpow, ergo, etchash, cn/gpu, pearl and c29. randomx is not in that list; a pool that should mine it names randomx in its own mo_algos. A password of worker~algo is a pin and is removed, because a pin disables switching (CLI: --mo-algos)
    "algos": "",
    // Where measured hashrates are kept, per PCI id per algorithm, so the next start can log in without measuring again (CLI: --mo-cache)
    "cache": "mo-perf.json",
    // How long to hash each uncached algorithm before the login. The wait for the first hash is extra, up to three minutes. 0 uses the cache only and skips anything it does not cover (CLI: --mo-benchmark-seconds)
    "benchmark_seconds": 30,
    // algo-min-time sent to the pool: how long it should stay on an algorithm before picking another. The miner switches when the job's algorithm changes (CLI: --mo-min-time)
    "min_time_seconds": 120,
    // Ignore the cache and measure every offered algorithm this start (CLI: --mo-rebenchmark)
    "rebenchmark": false,
    // Opt-in measured dual switching: 0 disables; 2..6 shortlists the most profitable solo algorithms and tests each unordered pair. Fresh solo/pair calibration is required every start. GPU-only connections with matching device rosters. CLI: --mo-dual [2..6] (bare means 2)
    "dual_top": 0,
    // Measured seconds per solo or pair after algorithm-specific warmup (30..3600). Each pair also runs solo controls before and after. CLI: --set mo.dual_seconds=30
    "dual_seconds": 30,
    // MoneroOcean public pool_statistics profitability endpoint; quotes rank expected payout after existing fees, before electricity costs
    "profit_url": "https://api.moneroocean.stream/pool/stats",
    // Profitability refresh interval (10..3600 seconds)
    "profit_refresh_seconds": 60,
    // Maximum quote age, from refresh interval through 86400 seconds. Stale quotes disable pairs and select measured solo operation
    "profit_max_age_seconds": 300,
    // Minimum expected payout improvement (0..100 percent) before entering a pair or switching modes. min_time_seconds also controls local residence time
    "dual_gain_percent": 3,
    // JSON benchmark report with concurrent rates, solo controls, clock owner and OC signature. Report is never reused as fresh calibration. Empty disables writing
    "dual_report": "mo-dual-perf.json"
  }
}
