-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we be certain that the hashing is correct? #239
Comments
All the algorithm implementations in cpuminer have been tested. If one has the time, it would also be quite easy to write a simple getwork server that serves mock low-difficulty jobs and checks that submitted solutions meet the target. |
How did you test the algorithm implementations? |
The implementations were tested both manually (using known block headers) and by mining. Keep in mind that this was quite a few years ago, when CPU mining was still practically possible. |
Could you provide me with some known block headers and their correct hashes? I'm willing to make test cases because I did a few code changes, and now I'm in dilemma if the code (still) works or not. Also, do you have some documentation regarding algorithm implementation, specifically sha256? I'm finding it hard to track current code with the strange function names and lack of comments. |
You should use a block explorer or a coin daemon to fetch this kind of data.
Sorry, I never wrote any documentation about the implementation details. |
Do you have documentation from which you've written those hashing functions? |
For SHA-256 there is plenty of documentation available online. When I first started I think I simply used ArtForz's code (see |
Ok thanks. |
I'm going to reopen it because someone might want to write a solution to the problem of validating the hashing algorithm. |
The problem is that we are mining cryptos rather slowly compared to the ASICs machines. Because of that, how can we be assured that the hashing algorithms works correctly other than watching our wallet getting money (which could take a while).
The text was updated successfully, but these errors were encountered: