Is there an easy way to validate an implementation of the cryptonight hash function? I wrote an implementation just to explore the features of various hash functions, but I'd like to validate that I'm producing the same result as the core implementation.
Asked
Active
Viewed 2,165 times
1 Answers
4
The Monero blockchain is full of test cases: for every block, you can assemble the hashing blob for that block, hash it with your new implementation, and check the resulting hash is below the target for that block. This will be done automatically if you replace monerod's Cryptonight implementation with your own, and try to sync the chain from scratch.
Another way is to replace a pool miner's Cryptonight code with your own, and try to mine. For example, https://github.com/OhGodAPet/cpuminer-multi/
user36303
- 34,928
- 2
- 58
- 123