Post
Topic
Board Development & Technical Discussion
Re: Is it possible to generate a consensus algorithm using machine learning?
by
HeRetiK
on 05/12/2018, 12:53:50 UTC
the main idea was about finding a pattern in nonce values, then a miner could speed up his mining process. for example, what if we know 90% of nonce values in mined blocks already are EVEN and only 10% of them goes for ODD values? then I found this link that contains more detail information:

https://bitcoin.stackexchange.com/questions/24650/looking-for-nonces-of-even-numbers

To be honest I think that these patterns, when they occur --- which seems not to be the case with Bitcoin, according to the post linked above -- are implementation dependent, rather than an inherent property of the hashing algorithm. If the nonces were indeed biased (ie. some nonces having a higher chance of being correct than others) we'd actually look at at a broken cryptographic hashing algorithm, as by definition there should be no bias in its outcome no matter how you look at it.

TLDR; Unless SHA256 is inherently broken you will be unable to find a pattern in nonce values that enables you to speed up the mining process.


Quote
I recently also checked the nonces from block 552,780 to 253,898 of Litecoin.

totally 298,883 blocks.

    number of odds = 42,963 (14.374521%)
    number of evens = 255,920 (85.625479%)
    Among the evens, the number of multiples of 256 = 225,746
        75.529890% of total

therefore after difficulty target, I decided to exclude/enforce some patterns in block header too.. for example, sometime nonce values CAN NOT be even , sometimes nonce values SHOULD be EVEN, etc. and I have called these sort of conditional-nonce-values as BOUNCE..

Even assuming SHA256 (or Scrypt, or the hashing algorithm of your choice) were broken -- how would filtering nonces like this prevent selfish mining?

Filtering like this only works if everyone is aware of the rules. If everyone is aware of the rules, so is the selfish miner. If the selfish miner is aware of the rules, he can apply them just as well.

But, to reiterate: Unless SHA256 itself is flawed, nonces are statistically random without bias. The only thing one could learn from such a data set, is what bias each respective miner implementation brings. However that doesn't help improving ones own mining performance.