Commit Graph
39 Commits
Author SHA1 Message Date
Nikolaus Heger ffc5b8f83c GPU batch size automatically adjusts to target duration 2026-01-05 15:53:14 +08:00
Nikolaus Heger 3b5f759fbd refactored and unified gpu devices number logic
use all GPUs by default, handle the parameter, disallow more GPU devices than available
2025-12-27 11:40:03 +08:00
Nikolaus Heger b79a9368e0 fmt 2025-12-26 13:45:18 +08:00
Nikolaus Heger f0aa971326 remove gpu feature, rename to gpu-devices
rename gpu-workers flag to devices, also check user doesn't specify more than they have (degrades performance)
2025-12-26 13:44:59 +08:00
Nikolaus Heger 23c617bda9 remove some AI dust 2025-12-26 13:10:46 +08:00
Nikolaus Heger a548f74f7d fmt 2025-12-26 12:47:42 +08:00
Nikolaus Heger 97ec1350de Fix for #39
Fix GPU worker crash, enable GPU default, and improve benchmark output
2025-12-26 12:46:57 +08:00
Nikolaus Heger ac87758996 Fix GPU contention, benchmarking 2025-12-26 10:53:00 +08:00
illuzenandNikolaus Heger a97d79632e Hybrid engine (#30)
* hybrid works with one gpu

* handle multiple gpus

* taplo

* fix clippy issues

* refactor to remove unnecessary abstraction layer

* update readme

* fix tests

* clippy

* delete hybrid engine

---------

Co-authored-by: Nikolaus Heger <nheger@gmail.com>
2025-12-22 21:05:31 +08:00
Nikolaus Heger 3ca29b6d8a throw errors when there's no GPUs detected 2025-12-19 16:40:54 +08:00
Nikolaus Heger c276a1173e clean up options 2025-12-19 15:26:43 +08:00
Nikolaus Heger 6ae4658209 add benchmark command
so we can easily compare CPU and GPU without having to run cargo bench.
2025-12-19 15:22:24 +08:00
illuzen 1509e2283b clean up documentation 2025-12-09 23:07:57 +08:00
illuzen ccca629c49 improved logging 2025-12-08 14:55:47 +08:00
illuzen aa1cf2bb46 gpu runs but doesn't mine 2025-12-01 15:11:07 +08:00
illuzen 50958ef4da ok wgpu runs hello world 2025-11-17 16:37:38 +08:00
Nikolaus Heger e92c4f0769 update comment 2025-11-07 14:40:13 +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
Cezary Olborskiandczareko abc3fcfcd3 chore: RM - refreshed (#15)
* chore: Proper version distribution

* chore: version based on tags

---------

Co-authored-by: czareko <czareko@users.noreply.github.com>
2025-09-23 17:22:49 +08:00
Cezary Olborski c820e0bd84 chore: Lock update + logs warn fix (#9) 2025-09-23 12:48:51 +08:00
rob thijssen 1103eb3efe Add miner-telemetry crate and integrate telemetry support
- Introduce miner-telemetry crate for WebSocket-based telemetry
reporting - Add telemetry configuration options to miner-cli CLI - Pass
telemetry CLI args as environment variables for miner-service - Enable
miner-service to bootstrap telemetry from env vars and emit events -
Emit periodic system.interval telemetry with mining stats and metadata -
Add miner-telemetry as dependency to miner-service and workspace member
2025-09-17 14:26:51 +08:00
rob thijssen 05a51fe5df Simplify short SHA extraction in build script 2025-09-17 00:12:26 +08:00
rob thijssen 058a287dcd Use if let Ok instead of if let Some for GITHUB_SHA check 2025-09-17 00:11:54 +08:00
rob thijssen 8f051f543c Add build.rs to embed version with git SHA in miner-cli binary 2025-09-16 12:24:24 +08:00
rob thijssen fbd63b580f revert all --version semver changes 2025-09-15 09:38:50 +08:00
rob thijssen e899709f72 Revert "Add build script to append git SHA to version info"
This reverts commit 7674e3141f.
2025-09-15 09:29:11 +08:00
rob thijssen 7674e3141f Add build script to append git SHA to version info 2025-09-15 09:14:40 +08:00
rob thijssen 5867ddefe9 append short git sha to the semantic version returned by the cli when
invoked with `--version`
2025-09-15 09:01:27 +08:00
rob thijssen 222890dc92 cuda scaffold
- Add engine-gpu-cuda crate with basic CUDA kernel (qpow G1) - Implement
CUDA build.rs compiling .cu to PTX when "cuda" feature enabled -
Integrate GPU engine into miner-service with runtime CUDA availability
check - Add fallback to CPU engine in gpu-cuda until full GPU kernel
support is ready - Enable optional "cuda" feature in miner-cli and
miner-service crates
2025-09-11 18:51:52 +08:00
rob thijssen 68c5835fc6 clippy cleanup 2025-09-11 09:19:07 +03:00
rob thijssen 7ec802ee24 feat: montgomery-optimized cpu mining engine
- introduce new `engine-montgomery` crate implementing a 512-bit
fixed-width montgomery multiplication backend for qpow mining. - mirror
`cpu-fast` engine behavior and metrics for direct comparison. - add
runtime backend selection with portable and x86_64 bmi2/adx kernels. -
expose `--engine cpu-montgomery` cli option in miner-cli. - integrate
engine and metrics support in miner-service with feature gating. - add
engine backend info metric for observability and a/b testing.
2025-09-10 22:52:04 +08:00
rob thijssen 7cbeb43b39 pr-cleanup 2025-09-10 11:08:39 +08:00
rob thijssen 49efb4ebc5 07: stable toolchain, rust validations
- Switch toolchain to stable with clippy and rustfmt components - Clean
up Clippy warnings with inline format args and hygiene fixes - Add GPU
engine placeholders (gpu-cuda, gpu-opencl) in CLI and service - Return
clear runtime error and exit for unimplemented GPU engines - Format all
TOML files with Taplo and ensure taplo fmt --check passes - Improve
mining nonce partitioning for safe range splits - Update tests to pass
cleanly on stable without warnings
2025-09-09 21:39:01 +08:00
rob thijssen 242bbe71f6 06: manipulator and difficulty
- Introduce ChainManipulatorEngine using fast incremental hashing path -
Throttle mining speed per solved block using sleeps after nonce batches
- Add CLI/env options to control base delay, batch size, throttle cap,
and resume state - Wire engine selection and parameters through
miner-service and miner-cli - Add debug logs for throttle state at job
start and on block found - Add new Grafana panel showing robust
difficulty median per chain for visibility
2025-09-09 19:41:38 +08:00
rob thijssen d0382f875a 05: workers and dashboard sync
- Replace `--cores`/`--num-cores` with `--workers` to clarify intent
(logical CPU threads) - Detect cpuset-aware default for workers, leaving
~50% headroom on shared hosts - Clamp user-specified workers to
effective cpuset size - Update logs, configs, and APIs accordingly
2025-09-09 12:18:04 +08:00
rob thijssen b69832bb4a 04: metrics chunking and dashboards
Improve mining metrics with chunked progress updates and dashboards

- Emit periodic per-thread progress updates by chunking search ranges,
enabling fresher and more accurate job/global hash rates. - Smooth
per-thread hash rates with EMA; derive per-job and global rates from
thread aggregates. - Remove job/thread rate series on
completion/cancellation to avoid scrape-timing zero artifacts. - Add
service-level metrics: `miner_active_jobs` gauge and
`miner_mine_requests_total` counter with result labels. - Introduce
CLI/env knob `--progress-chunk-ms` to control progress update frequency
(default 2000ms). - Update Grafana dashboards for trend-friendly
queries, cleaned labels, 24h/1h peak views, and job-level filtering. -
Add detailed documentation summarizing metrics improvements, usage, and
operational guidance.
2025-09-08 17:01:43 +08:00
rob thijssen ea40fdf6e5 03: engine comparability 2025-09-07 21:34:44 +08:00
rob thijssen 6cd53557d7 02: cpu fast engine and metrics 2025-09-07 20:48:01 +08:00
rob thijssen 0d5adf583b 01: soc and metrics
Convert repository into Cargo workspace with modular crates

- Split code into workspace members: miner-cli, miner-service, pow-core,
engine-cpu, engine-gpu-cuda, engine-gpu-opencl, metrics - Moved QPoW
math logic into local pow-core crate with compatibility API and
incremental helpers - Defined MinerEngine trait and baseline CPU engine
in engine-cpu crate - Rewrote service layer in miner-service: job
management, HTTP API, engine orchestration - Added CLI binary crate
miner-cli with flags: --port, --num-cores, --metrics-port, --engine -
Implemented runtime toggle for Prometheus metrics exporter enabled only
when --metrics-port provided - Deprecated root src/lib.rs and
src/main.rs with notices pointing to new CLI/workspace entrypoints
2025-09-07 20:21:10 +08:00