Showing posts from January, 2014

Gaining Momentum: Duplicate Detection in CUDA for better mining

I've been having fun finding "memory-hard" proof-of-work functions and engineering better solutions to solving them, with a focus on doing so for Nvidia's cards.  (Why?  Because I have some of them, because CUDA's more fun to program in, and because Nvidia's cards are widely regarded as the underdog in the crypto-currency game because of their slower shift and rotate instruction throughput.  It's fun to have a challenge and it's nice to use good tools.)

I recently stumbled across a new one, called "Momentum", which requires as its proof of work finding a collision in a 50-bit hash function, given a 26-bit nonce space to play in for each attempt.  In other words, to mine a Momentum coin:

  for i = 0; i < 2^26; i++ {
    h = hash(i)
    noncelist = nonces[h]
    noncelist = append(noncelist, i)
    nonces[h] = noncelist 

  for h, noncelist := range nonces {
    if len(noncelist) > 1 {
       // Yay I found a collision check it further.