Is it possible for an unsolvable block to exist? Is there a proof that the hashing will always yield a result? Or proof that there exist unsolvable blocks?
It's my understanding that even if we hit an unsolvable block that eventually the transactions in the block would change, so what's being hashed would change. Of course, that subsequent data could also be unsolvable... etc.
I'm just curious to what we do or do not know about the solvability of blocks.
It depends on what you mean. (Review: https://en.bitcoin.it/wiki/Block_hashing_algorithm)
Is it possible that with today's difficulty target a miner can exhaust the 32-bit nonce space in the block header without &quot;solving&quot; the block? Yes. But then the miner can change bits in the coinbase transaction (including a field unofficially called extraNonce), change a few bits in the version, increment the timestamp and then also like you mentioned, rearrange/add/remove transactions from the body of the block candidate. So depending on how restrictive you want to be with your question, a miner will never really run out of inputs to try.
But what about the output? A block is &quot;solved&quot; when it's hash, interpreted as a 32-byte integer, is less than a target value (also a 32-byte integer). So what we're looking for then is:
SHA256(data) &lt; Target
This means there are many potential solutions for a block at any given time (all the 20-or-so-byte integer values less than the current target value). If it were impossible to find one single solution in this set that would mean that SHA256 is broken and does not have the random, evenly distributed output we think it does.