Skip to content

Develop for Swap Mining

Supercircles edited this page Apr 5, 2019 · 4 revisions

Cuckaroo29s

To support Swap mining you need to support the grin NiceHash extension (to allow for a 32bit nonce to be declared poolside) and allow for cycle length other than 42. we chose a "round" number you can divide by 8: 32, other coins may use 40 ...

  • Swap (Cuckaroo29s) uses 32 cycles
  • Grin (Cuckaroo29) uses 42 cycles

The miner I found only does 0.2 GPS on a single CPU core. It's called mean29x8 to be found in Tromps Cuckaroo Repo. It requires 4GB per instance you can run multiple instances. It's not completely optimized, on a large cache CPU 1 GPS seems possible. Just monitor the grin ecosystem for opensource miners, every single Grin opensource miner can be ported to Swap. We ported GGM to demonstrate the necessary changes. Closed source Grin miners can adapt to Swap by simply looking at the changes we did to GGM.

That's the purpose of the "Swap Reference Miner". It's not indented to be the primary Swap miner. It's a template, a reference you can test your own miner against. Maybe we should have a "grin-miners" subchannel here at Swap, because Swap miners need to monitor what's happening at Grin.

Method one

This is one way of doing it, a more compatible way would be to "abuse" the NiceHash extension, which you want to support anyway.

Method two

Swap requires a 32 cycle, maybe have that as an optional field in the job. Important to note: the bitpacking of the cyclehash input data needs to be matched with cycle length.