My question is this: How exactly does the stratum protocol distribute “work” to miners? More specifically, since mining can be compared (in many regards) to “brute forcing” a cryptographic hash (i.e. hashing random inputs until, by luck, a random input matches a desired output), wouldn’t it make sense to keep track of potential solutions submitted and confirmed as invalid for a particular block, and to somehow communicate that to miners so the same work is not being done over and over again?
I realize this would require a lot of overhead, but it would seem worthwhile. Is there any mechanism to ensure two independent miners do not waste time working on the same inputs? Could sending a different seed for random number generation to every miner upon the start of a new round of mining have effect? I’ve read simplistic descriptions of mining as simply incrementing the nonce until a solution is found, but I’ve also read much more detailed explanations which would imply much more is involved. Even if only the nonce is changed in the input, the pool would still need to assign each miner a unique nonce to try after each submission, no?
As a final, semi-unrelated question regarding the implications of storing solutions: Say a pool stored every solution it had ever received, considering the massive size of the bitcoin network, would this not eventually become a statistically significant (in terms of usability) database of sha256 collisions? And eventually, could enough data be collected to come up with a derivation for SHA256? At minimum, could a pool with malicious intent temporarily divert unknowing miners’s computing power to crack SHA256 based TLS signatures or PGP public keys? Especially a pool which also controlled the hardware and software on the majority of its devices (e.g. Antpool).