firoorg / ccminer

mtp ccminer developpment
GNU General Public License v3.0
102 stars 55 forks source link

same nonce being generated more than once within a single block #36

Closed wilsonpc closed 5 years ago

wilsonpc commented 5 years ago

I'm adding lines with letters in brackets below for reference.

I'm not intimately familiar with the inner workings of mining code but this didn't seem right. If I got something wrong, I'd appreciate a brief explanation of what that is.

I was Solo mining.

The first part [A] [B] seems logical. I was surprised that that's the way it works, but it is logical and obviously works - there appear to be a set of nonces that will be used over and over for each block; for illustration, I've highlighted nonce 8317fffe on GPU #3 as a repeating nonce for each block but as described below, it also repeats within a block.

Every time, if a block made it to the 80th nonce (in this case in block 149225 [C]) before it was solved, I would get an OUT OF NONCE error message (not the topic of this issue but possibly another issue)

...BUT THEN...

after recovering from these series of error messages, and still in block the same block, 149225, the nonces would begin again as they would if it were a new block, but it's still in the same block; hence, every nonce after the error recovery is a duplicate within the same block and cannot solve the block since it was tried before.

I show an example with [B] [C] and [D] [E] and it happened over and over again.

[A] [2019-03-30 18:41:53] Current block is 149224 [2019-03-30 18:41:53] mtp block 149224, target 0.000 [2019-03-30 18:42:19] GPU #3: MSI GTX 1070: 2237.2 Kh/s nonce 8317fffe [2019-03-30 18:42:19] GPU #1: MSI GTX 1070: 2232.1 Kh/s nonce 2dc2aaaa [2019-03-30 18:42:20] GPU #2: MSI GTX 1070: 2210.8 Kh/s nonce 586d5554

[B] [2019-03-30 18:45:23] Current block is 149225 [2019-03-30 18:45:23] mtp block 149225, target 0.000 [2019-03-30 18:45:50] GPU #3: MSI GTX 1070: 2206.5 Kh/s nonce 8317fffe [2019-03-30 18:45:50] GPU #1: MSI GTX 1070: 2208.9 Kh/s nonce 2dc2aaaa [2019-03-30 18:45:50] GPU #4: MSI GTX 1070: 2175.2 Kh/s nonce adc2aaa8 [2019-03-30 18:45:50] GPU #2: MSI GTX 1070: 2169.4 Kh/s nonce 586d5554

[C] [2019-03-30 18:50:44] GPU #5: MSI GTX 1070: 2138.7 Kh/s nonce fded5552 [2019-03-30 18:50:50] GPU #3: OUT OF NONCE aaaffffe >= aaaaaaa8 incrementing extra nonce at next chance [2019-03-30 18:50:50] GPU #3: MSI GTX 1070, 2187.73 kH/s [2019-03-30 18:50:50] Current block is 149225 [2019-03-30 18:50:51] GPU #1: OUT OF NONCE 555aaaaa >= 55555554 incrementing extra nonce at next chance [2019-03-30 18:50:51] GPU #1: MSI GTX 1070, 2186.23 kH/s [2019-03-30 18:50:55] GPU #4: OUT OF NONCE d55aaaa8 >= d5555552 incrementing extra nonce at next chance [2019-03-30 18:50:55] GPU #4: MSI GTX 1070, 2159.00 kH/s [2019-03-30 18:50:56] GPU #2: OUT OF NONCE 80055554 >= 7ffffffe incrementing extra nonce at next chance [2019-03-30 18:50:56] GPU #2: MSI GTX 1070, 2152.28 kH/s [2019-03-30 18:50:56] GPU #0: OUT OF NONCE 2ab00000 >= 2aaaaaaa incrementing extra nonce at next chance [2019-03-30 18:50:56] GPU #0: MSI GTX 1070, 2149.93 kH/s [2019-03-30 18:51:09] GPU #5: MSI GTX 1070: 2138.6 Kh/s nonce 010d5552 [2019-03-30 18:51:18] GPU #3: MSI GTX 1070: 2204.7 Kh/s nonce 8317fffe [2019-03-30 18:51:19] GPU #1: MSI GTX 1070: 2207.5 Kh/s nonce 2dc2aaaa [2019-03-30 18:51:23] GPU #4: MSI GTX 1070: 2175.6 Kh/s nonce adc2aaa8

[D] [2019-03-30 19:23:56] Current block is 149234 [2019-03-30 19:23:56] mtp block 149234, target 0.000 [2019-03-30 19:24:22] GPU #3: MSI GTX 1070: 2204.1 Kh/s nonce 8317fffe [2019-03-30 19:24:22] GPU #1: MSI GTX 1070: 2198.2 Kh/s nonce 2dc2aaaa [2019-03-30 19:24:23] GPU #4: MSI GTX 1070: 2176.1 Kh/s nonce adc2aaa8 [2019-03-30 19:24:23] GPU #2: MSI GTX 1070: 2169.0 Kh/s nonce 586d5554

[E] [2019-03-30 19:29:17] GPU #5: MSI GTX 1070: 2138.7 Kh/s nonce fded5552 [2019-03-30 19:29:23] GPU #3: OUT OF NONCE aaaffffe >= aaaaaaa8 incrementing extra nonce at next chance [2019-03-30 19:29:23] GPU #3: MSI GTX 1070, 2188.64 kH/s [2019-03-30 19:29:23] Current block is 149234 [2019-03-30 19:29:24] GPU #1: OUT OF NONCE 555aaaaa >= 55555554 incrementing extra nonce at next chance [2019-03-30 19:29:24] GPU #1: MSI GTX 1070, 2181.38 kH/s [2019-03-30 19:29:27] GPU #4: OUT OF NONCE d55aaaa8 >= d5555552 incrementing extra nonce at next chance [2019-03-30 19:29:27] GPU #4: MSI GTX 1070, 2159.69 kH/s [2019-03-30 19:29:28] GPU #2: OUT OF NONCE 80055554 >= 7ffffffe incrementing extra nonce at next chance [2019-03-30 19:29:28] GPU #2: MSI GTX 1070, 2152.96 kH/s [2019-03-30 19:29:29] GPU #0: OUT OF NONCE 2ab00000 >= 2aaaaaaa incrementing extra nonce at next chance [2019-03-30 19:29:29] GPU #0: MSI GTX 1070, 2149.63 kH/s [2019-03-30 19:29:42] GPU #5: MSI GTX 1070: 2138.6 Kh/s nonce 010d5552 [2019-03-30 19:29:53] GPU #3: MSI GTX 1070: 2204.6 Kh/s nonce 8317fffe [2019-03-30 19:29:53] GPU #1: MSI GTX 1070: 2203.9 Kh/s nonce 2dc2aaaa [2019-03-30 19:29:56] GPU #4: MSI GTX 1070: 2175.5 Kh/s nonce adc2aaa8

djm34 commented 5 years ago

sorry for the late response. This behavior is normal. When the miner runout of nonce (meaning all solutions have been explored) it increment the extranonce and search a new solution among the allowed nonce range. However since the extranonce has changed, it is mining a new block header which has nothing to do with the previous.