I've started a new project:
https://github.com/Autarkysoft/LearnMiningIt serves 3 purposes:
1. Helps with learning how mining works
2. It works with the hash algorithm under the hood
3. Explores optimization of code written in C#
It is a work in progress and I have written everything from scratch purely based on documentations without any kind of "code translation" or "code copying" from other projects so it might contain some mistakes.
Currently it only has bitcoin mining (double SHA256). But I plan on adding other hash algorithms, possibly Scrypt (what LTC uses) be next.
I am open to suggestions.The code has tons of comment on it and I believe it is easy to understand what is going on, I can add more if something is unclear.
Since this is obviously not meant for actually mining anything, parallelization is avoided and it works only on CPU.
Please check it out and tell me what you think. Specially the part about Target
here and
here, not sure if I'm missing some endian swaps there.