31 Commits

Author SHA1 Message Date
Nikolaus Heger
8d0c9f8023 docs: update systemd example for the serve CLI with required node auth (#86)
* docs: update systemd example for the serve CLI with required node auth

The unit and readme still described the old HTTP-API miner (MINER_PORT,
MINER_ENGINE, no subcommand). Update ExecStart to 'serve' and document the
now-required MINER_AUTH_TOKEN_FILE / MINER_TLS_CERT_SHA256_FILE, including
how to copy the node's miner-auth-token and miner-tls-cert-sha256 files
past ProtectHome=true, and refresh the env var reference to the current
CLI.

* docs: fix env-file example and CPU-worker claims per review

- Move inline comments off the env assignments: systemd EnvironmentFile=
  keeps inline '# ...' text as part of the value, so the copied example fed
  Clap unparseable values and the unit crash-looped under Restart=always.
- Describe the real worker behavior: CPUs are counted via the process
  affinity mask (num_cpus); unset MINER_CPU_WORKERS auto-detects ~50%, and
  an explicit value is used as-is — there is no clamp or warning.
- Drop the 'logs the detected cpuset mask' claim from the unit and override
  comments; no such logging exists in the miner.

* docs: metrics exporter is always on; purge-chain does not rotate credentials

- The Prometheus exporter starts unconditionally and binds plaintext HTTP on
  0.0.0.0:9900 by default; MINER_METRICS_PORT only changes the port. Say so
  everywhere instead of 'when metrics are enabled', and add a hardening note
  to firewall the port.
- Rephrase the credential-rotation pitfall: purge-chain removes only the
  database, so the node reloads the same miner-auth-token and TLS cert;
  rotation only happens when the base path changes or the files themselves
  are deleted.
2026-08-14 11:46:35 +08:00
illuzen
5a6de314ab add wgpu support (#28)
* ok wgpu runs hello world

* toy hasher

* separate wgsl file

* kinda poseidon2

* test vectors

* closer

* a bit of debug

* closer

* sort of almost

* fixed gf_mul

* merge gf_mul back into mining, clean up tests

* fix bytes_to_field_elements

* linear layer fixed

* maybe better?

* mds tests

* cleanup debug output

* found gf_mul bug

* fixed gf_mul bug

* efficient sbox again

* mds matches

* cleanup

* test internal layer

* cleaner

* external linear passes

* external layer tests

* fixed the constants

* moar tests

* more cleaning

* actually test just internal

* fairly clean tests now

* removed another pointless test

* more cleanup

* gf_from_const tests

* testing

* fixed permutations

* double hash tests, but they fail

* moar tests!

* hash-twice works, thanks Gemini 3 Pro!

* gpu runs but doesn't mine

* better logging

* lock workers to gpu

* send target to gpu not difficulty

* fix verify_nonce

* double hash failures

* double hash matches

* tests pass and it mines now

* fix benches

* a bit faster now

* improved logging

* fix benches

* simplified gpu code

* further simplification

* a bit simpler

* slight simplification

* a bit faster

* dynamic thread allocation and work coarsening

* more benching

* faster

* faster

* faster

* clean up documentation

* a bit faster

* simplify

* simplify

* optimized mds

* almost par with cpu now

* fmt

* clippy

* support multiple gpus

* clippy

* unused

* fixed some logs

---------

Co-authored-by: Nikolaus Heger <nheger@gmail.com>
2025-12-19 19:25:14 +08:00
illuzen
63d7e114c2 Support new pow algo on cpu, not gpu (#22)
* support new pow algo, remove montgomery

* format

* remove redundant check

* use local poseidon until we release

* back to release

* remove unnecessary fxn

* comment out cuda for now

* comment out open-cl

* fix more tests

* remove cuda jobs
2025-11-03 16:23:18 +08:00
rob thijssen
3730f79094 Add stable config for NVIDIA RTX 5090 CUDA miner 2025-09-16 23:48:23 +08:00
rob thijssen
b4e9bf0c42 Add FoundOrigin enum to track candidate source in engine results 2025-09-16 23:09:25 +08:00
rob thijssen
f3af50acac Update CUDA miner debug environment for RTX 5090 2025-09-16 22:07:03 +08:00
rob thijssen
8c4934b8f6 Enable and configure CUDA miner settings for RTX 5090 debug environment 2025-09-16 22:03:41 +08:00
rob thijssen
cdf197cd15 Add extensive debug and info logging to CUDA engine initialization and
kernel launches

Include detailed logs for device info, context creation, buffer
allocations, kernel resolution and launch parameters, and data transfers
to help diagnose CUDA behavior and failures. Also add fallback and error
logging enhancements.
2025-09-16 21:02:32 +08:00
rob thijssen
7e6eee8c72 Add watchdog logging and improve result channel handling in miner
service
2025-09-14 18:33:50 +03:00
rob thijssen
6ca3d236ab Increase CUDA threads to 7168 and disable host verification 2025-09-14 18:04:45 +03:00
rob thijssen
0c3617c9e1 Adjust MINER_CUDA_VERIFY to 2048 in debug config 2025-09-14 17:44:21 +03:00
rob thijssen
2596e62003 Limit counted CUDA attempts to covered nonces for accuracy 2025-09-14 16:03:34 +03:00
rob thijssen
1a2d5e459d Update CUDA miner example profiles to use auto-tuned G2 kernel settings
Refactor all NVIDIA GPU profiles for mixed-load (lower) and dedicated
(upper) configurations. Enable auto-tuning of per-batch iterations (do
not set desired iters). Adjust thread/block counts, iteration budgets,
and enable/disable sampling and verification to balance responsiveness
and overhead for each profile. Add usage tips and logging level
guidance.
2025-09-14 16:00:19 +03:00
rob thijssen
0d81f3a346 Autotune CUDA desired_iters and improve logging
Add dynamic tuning of desired_iters based on coverage and thread count.
Enhance info logs with attempts and utilization metrics. Update example
config.
2025-09-14 15:43:36 +03:00
rob thijssen
f37e70e1b1 Fix nonce advancement logic and update CUDA miner env settings 2025-09-14 15:31:46 +03:00
rob thijssen
456742e425 fix kernel indexing and use correct digest bytes in qpow CUDA kernel
enable sampler in miner config and increase verify iterations to 2048
2025-09-14 14:47:44 +03:00
rob thijssen
05217dc516 Add MINER_CUDA_VERIFY to cuda-miner debug env file 2025-09-14 14:34:47 +03:00
rob thijssen
6d9e5ab89b Add engine health dashboard for Grafana monitoring 2025-09-14 13:29:36 +03:00
rob thijssen
d6f98398ed Update Grafana engines comparison dashboard JSON formatting and widgets 2025-09-14 13:16:00 +03:00
rob thijssen
ca9f97a265 adjust active thread count based on desired iterations in CUDA kernel
launch
2025-09-14 12:18:43 +03:00
rob thijssen
3fa3b60b20 Disable CUDA sampler in 3060 debug example env file 2025-09-14 10:56:43 +03:00
rob thijssen
0d3d3c50e3 Reduce CUDA threads and increase batches in miner config 2025-09-14 10:54:47 +03:00
rob thijssen
06629e85b7 Add MINER_CUDA_BATCHES to cuda-miner-3060-debug env file 2025-09-14 10:42:41 +03:00
rob thijssen
ce749eebc3 Add RUST_LOG settings to cuda-miner debug environment file 2025-09-14 09:22:09 +03:00
rob thijssen
2a2bc1f60b debug and warn logs for CUDA G2 winner diagnostics
Update cuda-miner-3060-debug.env with optimized thread and iteration
settings
2025-09-14 05:46:26 +03:00
rob thijssen
060a851300 Bump CUDA ABI version to 2 and use sentinel values for winners
Use u32::MAX as invalid sentinel for winner coordinates to improve
result validation. Also update ABI version constant to reflect this
change.
2025-09-13 13:17:48 +03:00
rob thijssen
16057a8e20 Add optional CUDA sampler readback and parity check
Enable sampler debugging via MINER_CUDA_SAMPLER env var to verify
host/device parity of sampler outputs, logging warnings on mismatch

Add example env file for RTX 3060 debug configuration
2025-09-13 06:24:28 +03:00
rob thijssen
b7f56fb05a Add CUDA miner environment presets for various NVIDIA GPUs
Provide example .env files targeting typical block/thread configurations
for RTX 3060/3080/3090/4080/4090/5090 and A5000/A6000.

Include guidance on tuning iterations, pinned buffers, and kernel modes.
Document usage with systemd and manual export for ease of deployment.
2025-09-12 17:19:23 +03:00
rob thijssen
1b4771ebc3 pr-cleanup: scrubbed references to implementation docs 2025-09-10 11:34:32 +08:00
rob thijssen
7cbeb43b39 pr-cleanup 2025-09-10 11:08:39 +08:00
rob thijssen
cff7a3284b 08: cpuset metric and systemd units
- Detect effective CPUs with cpuset awareness (cgroup v2/v1 fallback) -
Log detected cpuset mask or fallback info at startup (debug) - Expose
miner_effective_cpus Prometheus gauge (metrics feature) - Add
production-ready systemd unit and example CPU affinity overrides -
Include documentation for installation, overrides, and validation
2025-09-10 09:57:42 +08:00