No description
  • Rust 55.7%
  • Cuda 14.3%
  • Metal 12.5%
  • C 10.5%
  • Shell 3.2%
  • Other 3.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maxnflaxl 74fa06f804
docs: charts carry a title and one line, not a paragraph
- cards, power and compare charts lose their caption paragraphs and
  footers; the caveats are already in the prose beside each chart
- plot_power and plot_compare take the first four palette slots, which
  98fa404 broke by adding a fifth
2026-10-15 00:31:06 +02:00
.hooks chore: workspace skeleton 2026-08-26 11:35:42 +02:00
api multi-GPU, /summary, thermal pause, watchdog and the rest of what we claim 2026-10-04 16:01:06 +02:00
benchmarks abba: any benchmark graph, and flags for one arm 2026-10-06 18:59:53 +02:00
cli docs: Metal runs slean and honours the --trimming list 2026-10-06 20:25:22 +02:00
config repository links point at git.maxnflaxl.dev 2026-10-04 16:01:06 +02:00
cuckatoo repository links point at git.maxnflaxl.dev 2026-10-04 16:01:06 +02:00
docs docs: charts carry a title and one line, not a paragraph 2026-10-15 00:31:06 +02:00
gpu slean: no node scratch on a card without persisting L2 2026-10-15 00:17:54 +02:00
kernels docs: the Metal kernels README matches what is in the tree 2026-10-06 20:34:00 +02:00
miner miner: keep the tune store in %LOCALAPPDATA% on Windows 2026-10-08 23:28:35 +02:00
mobile feat(gpu): Metal backend from the reference miner's kernels 2026-08-26 16:01:34 +02:00
packaging miner: keep the tune store in %LOCALAPPDATA% on Windows 2026-10-08 23:28:35 +02:00
pow repository links point at git.maxnflaxl.dev 2026-10-04 16:01:06 +02:00
src mxgm: say in --report why a better trimming family was refused 2026-10-14 23:51:40 +02:00
stratum repository links point at git.maxnflaxl.dev 2026-10-04 16:01:06 +02:00
tests opencl: refuse Apple's OpenCL 2026-10-06 21:17:11 +02:00
ui ui: console keys on Windows via _kbhit/_getch 2026-10-14 23:34:57 +02:00
.gitignore docs: performance.md as a user doc, chart at the head of the progress log 2026-08-27 12:20:02 +02:00
Cargo.lock metal: the backend builds on macOS and the solver choice opens it 2026-10-04 17:55:58 +02:00
Cargo.toml mxgm: build Metal by default 2026-10-06 21:17:04 +02:00
CLAUDE.md docs: CUDA runs all three trimming families 2026-10-06 19:53:36 +02:00
LICENSE chore: workspace skeleton 2026-08-26 11:35:42 +02:00
NOTICE windows: bundled NVRTC first, and a 1 GiB VRAM reserve by default 2026-10-04 20:38:29 +02:00
README.md README: sudo for --report's power curve, send reports via socials 2026-10-09 00:01:22 +02:00
rustfmt.toml chore: workspace skeleton 2026-08-26 11:35:42 +02:00

MXGM

An open-source GPU miner for Grin (Cuckatoo32).

A from-scratch Rust implementation of Grin's proof of work, built around how little energy a graph can cost. It mines against a real pool over TLS: live jobs in, CPU-verified solutions out, shares accepted.

Status: working, optimization ongoing. On an RTX 4070 Ti SUPER the CUDA backend does 1.706 g/s at stock and 141 J a graph (1.339 g/s) at its operating point (86a32df, 120 s arms, 2026-10-08).

Quick start

# Build
cargo build --release

# Mine (replace with your own Grin address)
./target/release/mxgm --algo C32 \
                      --pool grin.2miners.com:3030 \
                      --user <your-grin-address>.<worker-name>

A Rust toolchain is the whole build dependency; platform notes are in docs/building.md, and the full command line, config files and API in docs/usage.md.

Lock the clocks. On the reference card the most efficient setting is the memory clock at its lower step with the core locked: sudo mxgm ... --mclk 5001 --cclk 2300 --fan 30. sudo mxgm --tune measures your card's curve instead. Needs root; restored on exit.

How it compares

Every miner on the same card and driver, watts as the GPU reports them (the full table; MXGM's rows 120 s from cold on the energy counter, J from the benchmark's steady-state line (ec756f0's, the previous release, counted over every graph, before the line existed); the other miners at stock on 2026-08-26 from the energy counter, GMiner's best from the 2026-09-06 matched-clock sweep and its 5 Hz power sampler; the wall is modelled):

g/s W J a graph gap to 100 J, board / wall
MXGM 86a32df, --mclk 5001 --cclk 2300 --fan 30 1.339 190.9 141 1.41× / 2.02×
MXGM 86a32df, stock 1.706 280.6 163 1.63× / 2.21×
MXGM ec756f0 (v0.1.164, previous release), --mclk 5001 --cclk 2300 --fan 30 1.316 191.4 146 1.46× / 2.07×
MXGM ec756f0 (v0.1.164, previous release), stock 1.640 280.8 173 1.73× / 2.33×
GMiner 3.44, its best here (--mclk 5001 --cclk 2400) 1.090 174.8 160 1.60× / —
GMiner 3.44, stock 1.29 276.2 214 2.14× / —
lolMiner 1.98a, matched locks performance.md
lolMiner 1.98a, stock 0.93 219.7 236 2.36× / —
Cuckatoo Reference Miner 0.3.3 0.547 217.4 397 3.97× / —

MXGM is the fastest miner measured here at every setting and the most efficient at stock. At GMiner's own best setting GMiner draws less, but MXGM's operating point is 141 J a graph against its 160. The best published GMiner figure for this card, 155 J (hashrate.no), is a third-party number. benchmarks.md has every build, the power curves and the comparisons at matched clocks.

Features

  • Cuckatoo32 on CUDA, slean trimming with every solution verified on the CPU before it is submitted. Metal on Apple Silicon; an OpenCL backend (verified on NVIDIA's driver, refused on macOS) and a CPU reference solver are the fallbacks.
  • Fits the card it finds. Slean splits the graph into K parts; K=2 needs a 16 GB card, and MXGM steps to K=4 or more on its own when that does not fit, so an 8 GB card runs without configuration.
  • Real-pool stratum client: TLS first with a plain fallback, reconnect with backoff, failover across several pools. Verified live against 2Miners.
  • Multi-GPU. One solver, worker thread and nonce lane per card, so no two cards ever build the same graph.
  • Runs unattended: a watchdog that exits with a code a supervisor can restart on when a card stops completing graphs, thermal pause and resume (--tstop, --tstart), and overclock control (--pl, --cclk, --mclk, --coff, --moff, --fan) clamped to the driver's bands and restored on exit.
  • Familiar UX: a lolMiner-shaped console and command line, the Cuckatoo Reference Miner's flags as aliases, and both configuration-file formats.
  • Dashboard and /summary API: --apiport N serves a live browser dashboard (graph rate, shares, power with an optional energy-cost axis, clocks, temperature) and a JSON endpoint, with no CDN, so it works on an isolated rig.
  • Self-contained: pure-Rust TLS, so no system OpenSSL; the CUDA kernels are compiled at run time by the driver's NVRTC.

Developer fee

MXGM takes a 1.0% developer fee: one 36-second round per 60 minutes of mining, about 14.4 minutes a day. It is the rate the closed-source Cuckatoo miners charge, so an open miner costs you no more, and it is what funds development.

It is announced at startup and at each round, reported on its own row of the statistics table and in /summary, and kept in a separate ledger, so it never touches your own share counts, best share or pool-credited rate. Fee rounds log in under your own worker name plus the rate (rig1_1). --dev-fee PCT raises it; it cannot be lowered.

Full terms are in docs/devfee.md.

Donations

The fee funds MXGM by default. To give more, raise it with --dev-fee PCT, or point a rig at the developer's address, an ordinary 2Miners address that any miner can mine to:

./target/release/mxgm --algo C32 \
                      --pool grin.2miners.com:3030 \
                      --user grin142932xhcy0vfdlzz5mcp309plfjhwtf8x727tshwx6e5lzdm06dsc6ew5m.<worker-name>

Documentation

Doc Covers
building.md Building, platform notes, the tests
usage.md The command line, config files, console, multi-GPU
overclocking.md Clocks, fans, power limits, and the settings that pay on Cuckatoo32
api.md The dashboard and the /summary JSON
devfee.md The fee in full
HW_REQUIREMENTS.md VRAM thresholds and what each card class gets
cuckatoo.md The proof of work and the three ways to trim the graph
benchmarks.md Measured results: every build, the comparators, power curves
benchmarking.md How to measure a card, and the protocol that settles a cross-miner comparison
performance.md The permanent record: every figure, with its measurement
performance-research.md Every optimization tried, working or not, with its mechanism

Running MXGM on a card that is not yet in benchmarks.md? sudo mxgm --report benchmarks it, measures its power curve and prints a paste-ready block: one command, no checkout, nothing uploaded. Root is only for the power curve, because setting the power limit needs it; without it you still get the benchmark. On Windows, use an Administrator terminal. Send me the block on any of my socials.

Comparing miners is harder than it looks: a reported g/s is only worth the solutions that verify, and the watts depend on where they are read. benchmarking.md has the method.

Contributing

Issues and pull requests are welcome. See docs/contributing.md for the build and test workflow and the code style.

License

Apache License 2.0; see LICENSE and NOTICE.