super slow nonce2 cycling in cgminer

1 reply 397 views
lonevectorFull Member
Posts: 72 · Reputation: 409
#1Nov 9, 2021, 05:40 PM
Hey everyone, I'm running cgminer 4.12.0 and mining with bitcoind on localhost. My setup includes a GekkoScience Compac F USB miner that averages about 387 GH/s. I decided to mess around with the source code of cgminer and increased the default timeout in the watchpool_thread function from 5 seconds to over 5 minutes. This change lets the threads go through a lot more nonce2 values. I wanted to check how fast cgminer can go through the nonce2 range, which is from 0 up to 18446744073709551615. So, the result? It cycled through 15,478 values in 5 minutes. That gives a rate of about 3095.6 values per minute, which I think is super slow. To sum it up: This USB miner can cycle through the nonce range (2^32-1) from 0 to 4294967295 a whopping 90 times per second, matching the expected hash rate of 387 GH/s. But when it comes to nonce2, we only see it cycling through 15,479 values, translating to a hash rate of just 3.1 KH/s. I get that regenerating the Merkle root is needed each time for nonce2, but the difference in speeds seems way off. What’s causing this big gap in processing rates? Thanks in advance for any insights! I'm looking forward to your thoughts. EDIT: Oh, and one more thing. How do I show the nonces that have been used and tested in cgminer's log/output when in debug mode? I've tried a few things, but it only ever shows nonce=0 in the output.
4 Reply Quote Share
hodlg4ngSenior Member
Posts: 129 · Reputation: 853
#2Nov 9, 2021, 09:15 PM
First of all, this is wrong: And this is right: From your other topic, it appears to me that you just removed the timer (or set it to a very long number) that resets the nonce to 0 and creates a new block template with a new timestamp. Is that what you're doing? Did you consider that nonce2 may just have wrapped around a whole bunch of times? If you're already fiddling with the code, maybe just add a clause that stops increasing nonce2 once it wraps around for the first time, and redo this test. I would be very surprised if it doesn't reach 232-1 within 5 minutes. Then, if you fancy it, reduce your measurement time to 1 minute or so until it doesn't hit it. Or add a counter which keeps track of how many times nonce2 wrapped around. I'm very interested in seeing your results.
3 Reply Quote Share

Related topics