17 Commits

Author SHA1 Message Date
illuzen
a47db3d1a2 Fix windows again (#72)
* handle lost device correctly

* Update lib.rs

* allow-integrated flag otherwise exclude

* DeviceLost is a status

* Integrated GPU skipped when discrete init fails

* nits
2026-06-30 16:30:11 +08:00
illuzen
157aa6fb5c Address v12 issues (#65)
* don't accept zero difficulty jobs

* bound job queue

* synchronous emit_payload

* cleaner gpu_batch_size type

* remove build script

* distance_threshold -> difficulty

* enable pq-cert checking with miner

* clearer logs

* Revert "enable pq-cert checking with miner"

This reverts commit 7a7f5394352b60d8c946f547f77a057504b29c44.

* update versions of relevant deps, including rand
2026-06-12 10:48:01 +08:00
illuzen
d7bf27854f GPU fixes (#58)
* improve logging

* don't let the queue spill, just drain it

* move cancellation out of the shader, since it doesn't work

* simplify batch size mechanism, improve logs

* fmt

* address review items
2026-04-22 13:42:01 +08:00
illuzen
443f0f9f89 QUIC miner (#49)
* implement quic

* simpler names

* simplify worker logic

* simplify gpu configuration logic

* miner initiates and picks random start nonce

* remove mining service

* clean up logs and remove unused engines

* clean up metrics

* metrics fix

* shared worker pool, cpu driven cancellation

just 10x the gpu thru-put, no more batch-size on gpu

* fmt

* non-local git

* taplo derp

* fix the benches

* handle stale results correctly in gpu

* more accurate gpu hashrate

* fmt

* remove unused

* handle duplicate solutions, cli controls gpu cancel frequency

* put plonky2 back

* demote noisy log
2026-02-02 16:38:21 +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
Nikolaus Heger
3466eff8b0 fmt 2025-10-16 16:01:10 +08:00
illuzen
c0bfca592d added benchmarks 2025-10-13 23:10:41 +08:00
illuzen
aa1204bab9 switch to poseidon
pow-core updated, checked that it is compatible with chain/main
2025-09-25 22:27:17 +08:00
Cezary Olborski
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
rob thijssen
b4e9bf0c42 Add FoundOrigin enum to track candidate source in engine results 2025-09-16 23:09:25 +08:00
rob thijssen
b5cfa06ffe 09: unit tests
- Verify Baseline and Fast CPU engines produce matching results - Test
Exhausted and Cancelled engine states with precise hash counts - Cover
miner-service request validation error branches - Test miner-service
HTTP endpoints for expected status codes - Confirm chunked mining sends
progress and completion messages
2025-09-10 10:46:36 +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
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