I ike Primecoin, however, I do not understand how the proof of work works.
Say I see the current blopckchain. I am a miner. I see the next block of pending transactions. What do I do? How, exactly, do I produce a proof of work that validates the pending transactions as well as finds a chaib of cunningham primes?
Relevant soure code if avilable would also be good.
when mining primecoin you are looking for prime number chains, Cunningham of the first kind, Cunningham of the second kind and Bi-twin chains are accepted. Finding the prime number chains becomes exponentially harder as the chain length is increased (difficulty).
Yes, the finding a chain of primes has nothing to do with those transactions.
blocks dont require transactions (except for the coinbase transaction generating the blockreward), transactions do require blocks, so I guess the only relation with finding a chain and the transactions is that the transactions get recorded on the chain when there is a block.
So how does Primecoin decide which blocks are valid? How does it resolve forks? Is it the miner who finds a chain of primes is the one that gets to decide the direction the blockchain goes? Or is there hashing like in bitcoin?