Altcoins Talks - Cryptocurrency Forum

Learning & News => For Beginners => Basic Questions about Cryptos => Topic started by: bosshyip on July 06, 2018, 08:08:19 AM

Title: How is the target value (PoW) determined?
Post by: bosshyip on July 06, 2018, 08:08:19 AM
I'm trying to get a more in-depth understanding of exactly what is happening within our protocol. I've mostly taken it for granted over the years, and lately I've been really attempting to understand what is under the hood. Understanding how mining works has been particularly difficult, but it seems to have boiled down to where does the target value come from? The "answer" to the "question" all of the miners are rushing to "solve", I cannot figure it out. I did attempt to use the search function here, read through the whitepaper again and can't seem to find my answer. I'm assuming it is in the source code, but I'm a bit incapable of scouring through it.

I think it has something to do with combining all of the transaction data (headers?) that is to be included within the block, and then the miner is solving for the data (nonce) that needs to be added to the block (transaction data) in order to create an appropriate sha-256 hash (X # of leading 0's, according to difficulty) to be accepted, is that right? The hash is unique and unpredictable, because of the information being added to a block constantly being generated (in a decentralized manner), through new transactions and timestamps; still right?

Would someone be able to create a block of exclusively transactions and information they have control over and have already generated a nonce for? Effectively solving an entirely self-created block (in advance) that would be accepted by the blockchain and allow you to reap the block reward. Is this prevented by accepting the "longest" valid chain? This may all be wrong, and foolish.

P.S. I know I can easily see the hash of a block, once solved, but is there any way or any record of the "nonce" or answer that lead to the hash?