-
-
Notifications
You must be signed in to change notification settings - Fork 515
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
Optimize ESP8266 miner #1580
Optimize ESP8266 miner #1580
Conversation
Nice job! Can you check if the ESP32 code can benefit from something similar? |
The trick can be easily reused in the Arduino miner. To use it in the ESP32 code some additional modifications would be required, but there's potentially even more room for improvement there. |
@snakeye great that it's working for you! Still I would expect slightly higher hashrates -- ESP-01 is internally almost the same chip as my Wemos D1 mini. Are you using the unmodified code from this PR or have you made some additional changes? |
@snakeye I tried running the code on my ESP-01 and was able to reach 53 kH/s, just like on the Wemos D1 Mini with the original miner. Unfortunately, I needed to disable some features to achieve that. Otherwise the output binary doesn't fit into the chip's smaller flash. I created PR #1581 with changes related to that. Anyway, my ESP's hashes get rejected -- it seems the server thinks the hashrate was manipulated. @revoxhere, can you advise? |
I'm using my own fork because I'm building the firmware with PlatformIO. But that's the only difference - I have taken the counter code as is. Probably I'm missing something. My hashes are rejected as well and I received a bunch of emails about suspicious activity in my account. |
I would suggest using recursion and operators for better readability. The performance does not change in this case. counter.h:
Usage:
|
Yep, I'll prepare a custom difficulty that will prepare the nodes for these changes. |
31c0ee3
to
cb19c25
Compare
This commit changes how the sequence of strings representing consecutive integers is generated for the hasher. Instead of utilizing the Arduino String conversions, a Counter class is introduced, which can generate consecutive integers much faster. On my Wemos D1 mini this gives a hash rate increase from around 37 kH/s to around 53 kH/s, which is a 43% improvement.
I thought I've added a comment here yesterday, but it seems I haven't published it in the end, so here's a few updates:
|
What is pending here? |
@mlesniew is |
@revoxhere did you had a chance to look into this? I was testing with a D1 and noticed that the performance can be improved up to 50/54 kH/s but the miner is later not listed in the stats |
Yep #1688 is an improved version of this one, with some changes around |
Thanks for letting me know. Closing this one then |
This commit changes how the sequence of strings representing consecutive integers is generated for the hasher. Instead of utilizing the Arduino String conversions, a Counter class is introduced, which can generate consecutive integers much faster.
On my Wemos D1 mini this gives a hash rate increase from around 37 kH/s to around 53 kH/s, which is a 43% improvement.