<p>First off, Alice doesn't hash the transaction as part of validation.  The hash Alice produces is simply a hash of the transaction, which is how transaction IDs are created.  In truth, anyone participating in the network could hash the transaction body and arrive at the same hash.  It is when the miners hash an entire block of transactions that hasing is part of the validation process.</p>

<p>Secondly, Bob doesn't have a "mailbox".  That's not what his public key is.  The blockchain is a public ledger, so Alice isn't sending the transaction to just Bob, she's announcing it to <em>everyone</em>.  Bob can see this transaction, just like everyone else, and now has to wait for a miner to include it in a block.</p>

<p>Miners create blocks of transactions, and they have to create them in such a way that the rest of the network will accept them.  One of the requirements is that the transactions in the block are all valid transactions.  So yes, miners will validate that Alice has 5 bitcoins to give before they add the transaction to a block.  If the miner cheats, and puts an invalid transaction into a block, then the rest of the network will reject that block, and the miner would have wasted their time doing the proof of work on that block.</p>

<p>The 10 minutes is a product of the proof of work algorithm.  It is retargeted every 2,016 blocks such that on average, it takes the entire network 10 minutes to construct a block whose hash is lower than the target value (starts with a certain number of zeros).  It is not a single transaction that takes 10 minutes to validate, but the construction of the entire block of transactions with the required proof of work.</p>

<p>Once a block with the proper proof of work has been found, it is broadcast to the network, which will accept it if the block meets all criteria.  After that, Bob can see that a transaction to the public key he supplied to Alice has been included in a block.  This is called a "confirmation".  Once another block is mined on top of that block, the transaction is said to have 2 confirmations, and a block later, 3 confirmations...and so on.</p>

<p>Here's some other answers you may want to read:</p>

<p><a href="https://bitcoin.stackexchange.com/questions/148/what-exactly-is-mining">What exactly is Mining?</a></p>

<p><a href="https://bitcoin.stackexchange.com/questions/9078/what-is-proof-of-work">What is proof-of-work?</a></p>

CC BY-SA 3.0
2016-11-08T18:52:27.947Z
`The hash Alice produces is simply a hash of the transaction, which is how transaction IDs are created` You mean Alice's signature creates the transaction ID?
Rhonda
CC BY-SA 3.0
2016-11-08T19:00:49.017Z
@Rhonda, no.  The hash cannot contain the signature, because the signature signs the hash.  This gets complicated in bitcoin.  What you should focus on is understanding the proof of work system, and not get so caught up in the details.  Make sure you know what a hash is, a signature is, a key pair is, a nine is, and a Merkel tree is.  Then rewatch those tutorials, and you'll probably understand better.
Jestin
CC BY-SA 3.0
2016-11-08T19:03:38.390Z
Wow, haven't heard of a nine ... will re-watch tutorials. Thank you!
Rhonda
CC BY-SA 3.0
2016-11-08T19:05:18.170Z
Whoops...that should say "nonce".  Sorry, autocorrect.
Jestin
CC BY-SA 3.0
2016-11-08T19:18:08.497Z
Ah, ok then. Will mark question `answered` in this case.
Rhonda
CC BY-SA 4.0
2018-05-28T02:41:22.887Z
The mailbox would be more equivalent to the Public Key Hash, which is derived from the Public Key.
Ben Stolman
CC BY-SA 3.0
2016-11-07T21:39:07.433Z
2016-11-07T21:39:07.433Z
2017-04-13T12:47:33.743Z
Jestin
<p>Trying to get my head around Bitcoin. Been watching tutorials, unsure if I still understand</p>

<p>Alice wants to send Bob 5 Bitcoins</p>

<p>Alice hashes the transaction with 5 Bitcoins and send's it to Bob's mailbox, i.e his Public Key</p>

<p>What is the job of the Miners?</p>

<p>Before the transaction get added to a public ledger (i.e blockchain) do the miners validates that Alice has 5 Bitcoins to give (based on info in public ledger) by recreating the hash.</p>

<p>And if validation is successful, the miners earn Bitcoins, the transaction is added to Blockchain, and Bob gets his 5 Bitcoins.</p>

<p>Is it true that validation takes about 10 minutes or so? </p>

<p>Really, I've been struggling with this concept.</p>

<p>Thanks!</p>

<transactions><transaction-fees>
Concept of Validating Transactions
Rhonda
# Concept of Validating Transactions

(Asked by: username_0 on 2016-11-07)

Trying to get my head around Bitcoin. Been watching tutorials, unsure if I still understand

Alice wants to send Bob 5 Bitcoins

Alice hashes the transaction with 5 Bitcoins and send's it to Bob's mailbox, i.e his Public Key

What is the job of the Miners?

Before the transaction get added to a public ledger (i.e blockchain) do the miners validates that Alice has 5 Bitcoins to give (based on info in public ledger) by recreating the hash.

And if validation is successful, the miners earn Bitcoins, the transaction is added to Blockchain, and Bob gets his 5 Bitcoins.

Is it true that validation takes about 10 minutes or so?

Really, I've been struggling with this concept.

Thanks!

**Tags:** transactions, transaction-fees


---

## 1 answers

### Answer by username_1 on 2016-11-07. Score: 14 | Accepted answer

First off, Alice doesn't hash the transaction as part of validation. The hash Alice produces is simply a hash of the transaction, which is how transaction IDs are created. In truth, anyone participating in the network could hash the transaction body and arrive at the same hash. It is when the miners hash an entire block of transactions that hasing is part of the validation process.

Secondly, Bob doesn't have a "mailbox". That's not what his public key is. The blockchain is a public ledger, so Alice isn't sending the transaction to just Bob, she's announcing it to *everyone*. Bob can see this transaction, just like everyone else, and now has to wait for a miner to include it in a block.

Miners create blocks of transactions, and they have to create them in such a way that the rest of the network will accept them. One of the requirements is that the transactions in the block are all valid transactions. So yes, miners will validate that Alice has 5 bitcoins to give before they add the transaction to a block. If the miner cheats, and puts an invalid transaction into a block, then the rest of the network will reject that block, and the miner would have wasted their time doing the proof of work on that block.

The 10 minutes is a product of the proof of work algorithm. It is retargeted every 2,016 blocks such that on average, it takes the entire network 10 minutes to construct a block whose hash is lower than the target value (starts with a certain number of zeros). It is not a single transaction that takes 10 minutes to validate, but the construction of the entire block of transactions with the required proof of work.

Once a block with the proper proof of work has been found, it is broadcast to the network, which will accept it if the block meets all criteria. After that, Bob can see that a transaction to the public key he supplied to Alice has been included in a block. This is called a "confirmation". Once another block is mined on top of that block, the transaction is said to have 2 confirmations, and a block later, 3 confirmations...and so on.

Here's some other answers you may want to read:

[What exactly is Mining?](https://bitcoin.stackexchange.com/questions/148/what-exactly-is-mining)

[What is proof-of-work?](https://bitcoin.stackexchange.com/questions/9078/what-is-proof-of-work)

> **Comments:**
> **username_0**: `The hash Alice produces is simply a hash of the transaction, which is how transaction IDs are created` You mean Alice's signature creates the transaction ID?  
> **username_1**: @username_0, no.  The hash cannot contain the signature, because the signature signs the hash.  This gets complicated in bitcoin.  What you should focus on is understanding the proof of work system, and not get so caught up in the details.  Make sure you know what a hash is, a signature is, a key pair is, a nine is, and a Merkel tree is.  Then rewatch those tutorials, and you'll probably understand better.  
> **username_0**: Wow, haven't heard of a nine ... will re-watch tutorials. Thank you!  
> **username_1**: Whoops...that should say "nonce".  Sorry, autocorrect.  
> **username_0**: Ah, ok then. Will mark question `answered` in this case.  
> **username_2**: The mailbox would be more equivalent to the Public Key Hash, which is derived from the Public Key.  

---

