<p>For a user running a full node, this is basically what happens.  On initial installation, they download (from other peers on the network) a copy of the complete block chain, containing every transaction ever executed.  So when a new transaction arrives, they have the data to trace all the transactions that led to it.</p>

<p>To make this more efficient, the client maintains a database of valid unspent transaction outputs (utxo), indexed by transaction hash (or txid).  When a new transaction T arrives, the client checks that the inputs of T all correspond to distinct utxo's in the database.  If they do, and all the signatures are in order, and everything else about the transaction makes sense, then the transaction is accepted.  The utxo's corresponding to the inputs of T are removed from the database (since they are now spent), and new utxo entries are created corresponding to the outputs of T.</p>

<p>For "thin" nodes, which do not keep all this data, they have to request it from other network nodes which do.  This complicates matters somewhat and requires a certain amount of trust in the nodes providing the information.</p>

CC BY-SA 3.0
2014-10-31T17:25:57.613Z
2014-10-31T17:25:57.613Z
Nate Eldredge
<blockquote>
  <p>The person sending the coin would have to include the whole ownership chain, which would start increasing more and more in size</p>
</blockquote>

<p>This alone wouldn't be sufficient, because it doesn't tell you whether the chain of ownership was double spent, or whether those transactions were confirmed in valid blocks, or even if the original coins were mined properly and exist in the longest chain.  To know all that, you need to see the whole blockchain, or to trust someone else who has seen the whole blockchain.</p>

<p>The paper explains that the basis of the blockchain is that everyone is aware of every transaction that ever happened, and the order in which they happened.  So by having access to the blockchain, you can validate a new payment to make sure it is genuine and not double spent.</p>

<p>Bitcoin nodes are optimised so that they can just validate a chain once and then store a set of its unspent transactions, so it means they don't have to re-check each transaction all the way back to the genesis block.  This is just an optimisation though, so that's probably why it was left out of the paper.</p>

<p>You can also use an SPV wallet (see the section in the paper titled "Simplified Payment Verification") which eliminates the need to see the full chain, at the cost of outsourcing trust to the miners.</p>

CC BY-SA 3.0
2014-12-01T06:02:04.243Z
2014-12-01T06:02:04.243Z
Ashley Holman
<blockquote>
  <p>There would have to be a public hash-to-transaction mapping somewhere.</p>
</blockquote>

<p>Yes. There is a database of utxo - unspent transaction outputs. To be correct - it is an index of blockchain file.</p>

CC BY-SA 3.0
2014-09-02T04:48:24.197Z
In the Bitcoin Core implementation since 0.8, the UTXO set is not anymore implemented as an index into the blockchain files. Instead, it contains a full and independent copy of all unspent outputs. This is for efficiency and to allow future versions to prune the blockchain data.
Pieter Wuille
CC BY-SA 3.0
2014-09-01T06:59:38.960Z
2014-09-01T06:59:38.960Z
amaclin
<p>While reading Satoshi Nakamoto's paper on how bitcoin works, I got stuck on #2. In a chain of transactions, how can someone who has received the coin check the whole chain with just a signed hash of the previous one? </p>

<p>Either</p>

<ul>
<li>The person sending the coin would have to include the whole ownership chain, which would start increasing more and more in size</li>
<li>There would have to be a public hash-to-transaction mapping somewhere.</li>
<li>There would have to be a list of valid coins somewhere, making checking only the most recent transaction necessary</li>
</ul>

<p>I don't see Satoshi Nakamoto talking about any of these.</p>

<transactions><verification><transaction-verification>
How does the receiver of a transaction check the whole chain of ownership?
SomePerson
# How does the receiver of a transaction check the whole chain of ownership?

(Asked by: username_0 on 2014-09-01)

While reading Satoshi Nakamoto's paper on how bitcoin works, I got stuck on #2. In a chain of transactions, how can someone who has received the coin check the whole chain with just a signed hash of the previous one?

Either

* The person sending the coin would have to include the whole ownership chain, which would start increasing more and more in size
* There would have to be a public hash-to-transaction mapping somewhere.
* There would have to be a list of valid coins somewhere, making checking only the most recent transaction necessary

I don't see Satoshi Nakamoto talking about any of these.

**Tags:** transactions, verification, transaction-verification


---

## 3 answers

### Answer by username_1 on 2014-10-31. Score: 1

For a user running a full node, this is basically what happens. On initial installation, they download (from other peers on the network) a copy of the complete block chain, containing every transaction ever executed. So when a new transaction arrives, they have the data to trace all the transactions that led to it.

To make this more efficient, the client maintains a database of valid unspent transaction outputs (utxo), indexed by transaction hash (or txid). When a new transaction T arrives, the client checks that the inputs of T all correspond to distinct utxo's in the database. If they do, and all the signatures are in order, and everything else about the transaction makes sense, then the transaction is accepted. The utxo's corresponding to the inputs of T are removed from the database (since they are now spent), and new utxo entries are created corresponding to the outputs of T.

For "thin" nodes, which do not keep all this data, they have to request it from other network nodes which do. This complicates matters somewhat and requires a certain amount of trust in the nodes providing the information.


---

### Answer by username_2 on 2014-12-01. Score: 1

> The person sending the coin would have to include the whole ownership chain, which would start increasing more and more in size

This alone wouldn't be sufficient, because it doesn't tell you whether the chain of ownership was double spent, or whether those transactions were confirmed in valid blocks, or even if the original coins were mined properly and exist in the longest chain. To know all that, you need to see the whole blockchain, or to trust someone else who has seen the whole blockchain.

The paper explains that the basis of the blockchain is that everyone is aware of every transaction that ever happened, and the order in which they happened. So by having access to the blockchain, you can validate a new payment to make sure it is genuine and not double spent.

Bitcoin nodes are optimised so that they can just validate a chain once and then store a set of its unspent transactions, so it means they don't have to re-check each transaction all the way back to the genesis block. This is just an optimisation though, so that's probably why it was left out of the paper.

You can also use an SPV wallet (see the section in the paper titled "Simplified Payment Verification") which eliminates the need to see the full chain, at the cost of outsourcing trust to the miners.


---

### Answer by username_3 on 2014-09-01. Score: 1

> There would have to be a public hash-to-transaction mapping somewhere.

Yes. There is a database of utxo - unspent transaction outputs. To be correct - it is an index of blockchain file.

> **Comments:**
> **username_4**: In the Bitcoin Core implementation since 0.8, the UTXO set is not anymore implemented as an index into the blockchain files. Instead, it contains a full and independent copy of all unspent outputs. This is for efficiency and to allow future versions to prune the blockchain data.  

---

