<p>You are mixing the two things. It is not just miners, but the entire network of full nodes that ensure only valid transactions are included in a block. When a block is mined by a miner, it is propagated on the network. All the full nodes go through a detailed checklist (see <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="nofollow noreferrer">here</a>) to ensure that the block and the transactions within the block confine with the consensus protocol. This is unlike ledger based systems where an 'authority' is appointed to vote on transactions to maintain a state of the ledger.</p>

<p>Since Bitcoin is peer-to-peer, there is no central authority to control it. As a result, anyone can send any kind of transaction to the network, whether or not it is valid. You could simply send a transaction that sends someone else's coins to yourself. Now, if a miner tries to mine a block with those invalid transaction, the rest of the network will reject the block. So the entire effort (read electricity and time) that the miner put in will go waste as that block will not be added to the blockchain by the rest of the participants. </p>

<p>The 'random hash problem' also has other benefit. It ensures that Bitcoin blocks are mined every 10 minutes. Every 2016 blocks (or ~2 weeks) the difficulty is adjusted to ensure that the average block time remains at 10 minutes.</p>

<blockquote>
  <p>And when do the other miner nodes validate that the proposed block is correct after one miner finishes?</p>
</blockquote>

<p>As soon as the miner mines a block (finding a valid block whose header hash confines with the current network difficulty), it will propagate the block through the network. Now, the miner not just sends it to other miners, but also all the full nodes that are connected to it. If the block is valid, the full nodes/mining nodes will relay the block to the nodes connected to them. If invalid, the block will be rejected outright and not relayed. When other mining nodes see this block, they will mine the next block on top of this block (provided the block they received was valid).</p>

CC BY-SA 4.0
2019-05-10T18:26:13.727Z
2019-05-10T18:26:13.727Z
Ugam Kamat
<p>By mining, we mean that they are searching (through modifying the block and rehashing) for a block hash that is below the current <a href="https://en.bitcoin.it/wiki/Difficulty" rel="nofollow noreferrer">difficulty target</a> expected by all other network participants.  This "target" is adjusted every 2016 blocks to maintain an average block time of about 10 minutes.</p>

<blockquote>
  <p>how does this random hash problem help validate the transactions in the next block?</p>
</blockquote>

<p>The network consensus rules require that the block hash meet agreed upon difficulty target as one of the many pieces of criteria for a "valid block". The list of transactions and block structure must already be valid in themselves before the Proof Of Work hashing starts. Various pieces (such as the nonce) are modified to modify the resulting hash.  The randomness of hashing the block is a way to ensure that the miner exerts tremendous effort (uses electricity).  This provides <a href="https://en.wikipedia.org/wiki/Sybil_attack" rel="nofollow noreferrer">sybil attack</a> resistance without the need to identify miners in that there is no difference between 1 miner (IP address) with a 1000 ASICs or 1000 <em>pretend</em> miners (controlled by 1 entity) with 1 ASIC each.</p>

<p>It also ensures that the miner has invested a significant amount of money (electricity &amp; mining hardware) in that block.  This incentivizes them to "play by the rules" and not attempt to attack the network.  The block subsidy cannot be spent immediately, so if they damage bitcoin, they damage the value of their future payout as well.</p>

<blockquote>
  <p>when do the other miner nodes validate that the proposed block is correct after one miner finishes?</p>
</blockquote>

<p>When a miner finds a valid block hash, they must broadcast that block to the the other bitcoin network participants.  Each miner validates it individually, and, if it is valid (has correct structure, valid hash and valid transactions), will remove those transactions from their mempool and begin building a new block.  The new block will contain a hash of the previous block which explicitly defines the order of blocks.  By this process, the block is added the the "blockchain" as miners begin building on it.</p>

CC BY-SA 4.0
2019-05-10T19:08:05.997Z
2019-05-10T19:08:05.997Z
Jonathan Cross
<p>I know bitcoin miners compete for a reward by seeing who can solve a difficult hashing problem first (proof-of-work).</p>

<p>However, how does this random hash problem help validate the transactions in the next block? It seems like this hashing problem is completely irrelevant to the ledger validation issue at hand. And when do the other miner nodes validate that the proposed block is correct after one miner finishes?</p>

<mining-reward><proof-of-work>
How do bitcoin miners determine the next valid state of a ledger?
Adam Carlson
# How do bitcoin miners determine the next valid state of a ledger?

(Asked by: username_0 on 2019-05-10)

I know bitcoin miners compete for a reward by seeing who can solve a difficult hashing problem first (proof-of-work).

However, how does this random hash problem help validate the transactions in the next block? It seems like this hashing problem is completely irrelevant to the ledger validation issue at hand. And when do the other miner nodes validate that the proposed block is correct after one miner finishes?

**Tags:** mining-reward, proof-of-work


---

## 2 answers

### Answer by username_1 on 2019-05-10. Score: 2 | Accepted answer

You are mixing the two things. It is not just miners, but the entire network of full nodes that ensure only valid transactions are included in a block. When a block is mined by a miner, it is propagated on the network. All the full nodes go through a detailed checklist (see [here](https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages)) to ensure that the block and the transactions within the block confine with the consensus protocol. This is unlike ledger based systems where an 'authority' is appointed to vote on transactions to maintain a state of the ledger.

Since Bitcoin is peer-to-peer, there is no central authority to control it. As a result, anyone can send any kind of transaction to the network, whether or not it is valid. You could simply send a transaction that sends someone else's coins to yourself. Now, if a miner tries to mine a block with those invalid transaction, the rest of the network will reject the block. So the entire effort (read electricity and time) that the miner put in will go waste as that block will not be added to the blockchain by the rest of the participants.

The 'random hash problem' also has other benefit. It ensures that Bitcoin blocks are mined every 10 minutes. Every 2016 blocks (or ~2 weeks) the difficulty is adjusted to ensure that the average block time remains at 10 minutes.

> And when do the other miner nodes validate that the proposed block is correct after one miner finishes?

As soon as the miner mines a block (finding a valid block whose header hash confines with the current network difficulty), it will propagate the block through the network. Now, the miner not just sends it to other miners, but also all the full nodes that are connected to it. If the block is valid, the full nodes/mining nodes will relay the block to the nodes connected to them. If invalid, the block will be rejected outright and not relayed. When other mining nodes see this block, they will mine the next block on top of this block (provided the block they received was valid).


---

### Answer by username_2 on 2019-05-10. Score: 1

By mining, we mean that they are searching (through modifying the block and rehashing) for a block hash that is below the current [difficulty target](https://en.bitcoin.it/wiki/Difficulty) expected by all other network participants. This "target" is adjusted every 2016 blocks to maintain an average block time of about 10 minutes.

> how does this random hash problem help validate the transactions in the next block?

The network consensus rules require that the block hash meet agreed upon difficulty target as one of the many pieces of criteria for a "valid block". The list of transactions and block structure must already be valid in themselves before the Proof Of Work hashing starts. Various pieces (such as the nonce) are modified to modify the resulting hash. The randomness of hashing the block is a way to ensure that the miner exerts tremendous effort (uses electricity). This provides [sybil attack](https://en.wikipedia.org/wiki/Sybil_attack) resistance without the need to identify miners in that there is no difference between 1 miner (IP address) with a 1000 ASICs or 1000 *pretend* miners (controlled by 1 entity) with 1 ASIC each.

It also ensures that the miner has invested a significant amount of money (electricity & mining hardware) in that block. This incentivizes them to "play by the rules" and not attempt to attack the network. The block subsidy cannot be spent immediately, so if they damage bitcoin, they damage the value of their future payout as well.

> when do the other miner nodes validate that the proposed block is correct after one miner finishes?

When a miner finds a valid block hash, they must broadcast that block to the the other bitcoin network participants. Each miner validates it individually, and, if it is valid (has correct structure, valid hash and valid transactions), will remove those transactions from their mempool and begin building a new block. The new block will contain a hash of the previous block which explicitly defines the order of blocks. By this process, the block is added the the "blockchain" as miners begin building on it.


---

