Case study · 2026
STONK Local Apple Metal GPU Solver
Hand-written 24-round Keccak-f[1600] GPU shader in Metal + Swift worker + Python CPU verifier.
$ swift run stonk-worker --batch 65536 [metal] keccak_f1600 x24 rounds on M3 Pro (18 cores) [solve] nonce 0x8f3a21 -> digest matches CPU verifier [audit] appended -> audit.jsonl (no external miner)
The problem
Most 'GPU solvers' wrap someone else's miner. I wanted to write the actual compute kernel - the full 24-round Keccak-f[1600] permutation - as a Metal shader and prove it correct against an independent implementation.
How it's built
keccak.metal implements the theta/rho/pi/chi/iota rounds from scratch, driven by a Swift Metal worker that batches nonces across the M3 Pro's 18 GPU cores. A separate Python + PyCryptodome CPU verifier re-checks every candidate digest, and all results append to an audit.jsonl log for replay.
Proof
End-to-end solver-verifier pipeline running locally with zero external mining code - genuine low-level GPU engineering.
Highlights
- Full Keccak-f[1600] written by hand in Metal shading language
- Independent Python CPU verifier cross-checks GPU output
- Append-only audit log for every solved nonce