-
Notifications
You must be signed in to change notification settings - Fork 697
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
Upgrade rainforest algo to v2 #39
base: linux
Are you sure you want to change the base?
Conversation
this is the first step to replace this algo with v2. this algo is affected by a vulnerability that was addressed in v2.
This is as of commit bd64681958fae8b35b47f1c799bd2c2d3fc532c9 from https://github.com/bschn2/rainforest.git This algorithm is used by MicroBitcoin (MBC) https://github.com/microbitcoinorg Focus is on maximizing performance for low-power devices like RaspberryPi. Some performance reports available here for more context bschn2/rainforest#15 (comment) and indicate RPi being only half the performance of skylake 4 GHz, and 1080Ti being only 9 times faster than RPi.
It would be cool to have the patches. I using them on my Raspberry Pi 3B+ to mine MicroBitcoin (MBC) but I prefer "git clone" instead of "patch". |
It looks like it reports significantly higher speed than the received on the pool side (Something like x256) |
As I responded to Mike, I mentioned this when I brought the speedup patches. The problem was that the reported hashes count is used to compute how often to print the stats, and if we reported the correct value, the stats output was reported 256 times faster. Now I figured how to fix this, I have a patch somewhere, I'll send it eventually. |
By the way I can confirm the algo works fine on ARM, two nanopi-fire3 are as fast as my core-i7 4.4 GHz. |
this is based on latest updates which reduce the number of rounds and allocates only one rambox for all threads. it roughly 50 times faster. this new version includes the correct hash rate.
Now the hash rate is fixed I tested it and my i7 reports 170kH/s not 20MH like before. |
Rainforest v1 has a vulnerability and its author issued v2. The only coin currently using it (Microbitcoin[MBC]) now switched to v2. There's no reason to keep v1. Instead add v2. Tested on linux/x86 only but MBC's fork was said to also work on raspberry pi. This code purely comes from rainforest's official repo, not MBC's fork.