matteocrippa / leafminer

A FOSS bitcoin miner for ESP8266 and ESP32
MIT License
51 stars 9 forks source link

ESP32-S3 only one core mining? #28

Open PSLLSP opened 2 months ago

PSLLSP commented 2 months ago

LeafMiner 0.0.13

Device is LILYGO T-DISPLAY-S3. It can mine at speed about 75 kHps but from time to time it reports much smaller speed, about 37 kHps, like just one core is used for mining:

[I] Current: Hash accepted: 15
[D] Current: Hashrate: 37.66 kH/s
[D] Current: Hashrate: 37.80 kH/s
[D] Current: Hashrate: 37.84 kH/s
[D] Current: Hashrate: 37.80 kH/s

After reset it mines at full speed:

[I] Current: Job: 3039ac ready to be mined
[D] Current: Hashrate: 74.85 kH/s
[D] Current: Hashrate: 74.97 kH/s
[D] Current: Hashrate: 74.95 kH/s
[D] Current: Hashrate: 74.91 kH/s

Device is connected to USB port in PC. It is possible that this low speed is related to serial console, when I do not run terminal and serial buffer is full then hashing speed goes down. I noticed on display that speed was 35 kHps but when I started terminal, hashspeed increased to 75kHs, without reset...

I recorded such case, speed increased from 52kHps to 75 kHps when I started serial terminal:

$ miniterm /dev/ttyACM0 115200
--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
d":77,"method":"mining.submit","params":["bc1quqr7agnx6e0k9kn8h24zfj5dueeurhzflt3qjg.LEAF","305c0e","39970631","66148939","007d6b8a"]}

[ICurrent: Hashrate: 52.14 kH/s
[D] Current: Hashrate: 74.97 kH/s
[D] Current: Hashrate: 74.95 kH/s
[D] Current: [D] Current: Hashrate: 74.93 kH/s
Hashrate: 74.93 kH/s
[D] Current: Hashrate: 74.98 kH/s

There are other issues with T-DISPLAY-S3:

This device was running NerdMiner_V2, v 1.6.3 for several weeks and it was reliable, no issue with display or LED or hashing speed... LED shines green when running NerdMiner, no difference.

I flashed LILYGO T-DISPALY-S3 with these commands (CLI):

# esptool.py  write_flash -e 0 /dev/null  # full chip ERASE...
esptool.py  write_flash -z 0x0000 bootloader_lilygo-t-display-s3.bin
esptool.py  write_flash -z 0x8000 partitions_lilygo-t-display-s3.bin
esptool.py  write_flash -z 0x10000 firmware_lilygo-t-display-s3.bin
matteocrippa commented 2 months ago

On S3 based boards the Blinking should not work, them have a RGB led that works in a different manner than the ESP32 one.