<p>Bitcoin nodes keep track of what's called the UTXO set – the set of all unspent transaction outputs. Every valid transaction must only spend existing and not previously spent outputs, so this is enough to prevent double-spending. The UTXO set can also be stored in a way to allow efficient (constant-time) lookups, so verifying transactions doesn't require more computing power as the UTXO set grows.</p>

CC BY-SA 4.0
2021-12-30T09:36:08.107Z
2021-12-30T09:36:08.107Z
Vojtěch Strnad
<p>As far as I know, to prevent double-spend attack and to confirm that a specific transaction is valid, miners have to go through all blocks in the blockchain and check the sender's history of transactions.
until now, the blockchain has over 700,000 blocks. Isn't it computationally hard for miners as the blockchain grows?</p>

CC BY-SA 4.0
2021-12-30T19:54:18.213Z
*"to confirm that a specific transaction is valid"* -- note that in Bitcoin "confirmation" is producing a block containing a transaction or producing a block on top of such a block. That is very different from checking that a transaction is valid. All nodes validate, only miners confirm.
RedGrittyBrick
<blockchain><transaction-verification>
How does validating a transaction get more and more hard?
Amir reza Riahi
# How does validating a transaction get more and more hard?

(Asked by: username_0 on 2021-12-30)

As far as I know, to prevent double-spend attack and to confirm that a specific transaction is valid, miners have to go through all blocks in the blockchain and check the sender's history of transactions.
until now, the blockchain has over 700,000 blocks. Isn't it computationally hard for miners as the blockchain grows?

**Tags:** blockchain, transaction-verification

> **Comments:**
> **username_1**: *"to confirm that a specific transaction is valid"* -- note that in Bitcoin "confirmation" is producing a block containing a transaction or producing a block on top of such a block. That is very different from checking that a transaction is valid. All nodes validate, only miners confirm.  

---

## 1 answers

### Answer by username_2 on 2021-12-30. Score: 5 | Accepted answer

Bitcoin nodes keep track of what's called the UTXO set – the set of all unspent transaction outputs. Every valid transaction must only spend existing and not previously spent outputs, so this is enough to prevent double-spending. The UTXO set can also be stored in a way to allow efficient (constant-time) lookups, so verifying transactions doesn't require more computing power as the UTXO set grows.


---

