<h1>Balances</h1>
<p><strong>Bitcoin doesn't care about balances</strong>. Miners also don't.</p>
<p>Your wallet may keep track of <em>your</em> balance but it doesn't need to know about anyone else's. No one else cares about your balance. It is irrelevant.</p>
<p>Bitcoin only keeps track of unspent transaction outputs (UTXOs) - If you like metaphors and understand their limits, you can think of UTXOs as &quot;coins&quot; whose &quot;current ownership&quot; is indirectly kept track of in an almost anonymous way. <strong>When you give someone a coin in payment, they don't care how many other coins you have in your pocket</strong>, they only care whether the coin you gave them is genuine (really yours).</p>
<h1>Fast verification</h1>
<p>Bitcoin is designed so that creating new pages in the replicated journal of transactions is expensive and slow (i.e. constructing blocks that can be added to the blockchain). However, transactions can be <em>verified</em> quickly.</p>
<p>In the database world you speed up retrieval by adding appropriate indexes. You can have separate tables for live vs dead data, you can hold important data in memory, etc etc. That is how software finds UTXO's fast.</p>

CC BY-SA 4.0
2020-11-12T09:54:37.727Z
2020-11-12T16:13:37.763Z
2020-11-12T16:13:37.763Z
RedGrittyBrick
<p>Bitcoin clients must find balances for some public keys quickly. Especially, miners must find balances for all incoming transactions.</p>
<p>I see the problem: public key with associated address can appear many times in 300 GB blocks data which can't be stored whole in memory. Full Bitcoin client uses binary data files and LevelDB index(?).</p>
<p>How can it do it quickly? Especially, miners spend most of the time hashing, not verifying transactions (?)</p>

<mining-technical-details>
How do Bitcoin clients/miners verify balances quickly?
Andrzej
# How do Bitcoin clients/miners verify balances quickly?

(Asked by: username_0 on 2020-11-12)

Bitcoin clients must find balances for some public keys quickly. Especially, miners must find balances for all incoming transactions.

I see the problem: public key with associated address can appear many times in 300 GB blocks data which can't be stored whole in memory. Full Bitcoin client uses binary data files and LevelDB index(?).

How can it do it quickly? Especially, miners spend most of the time hashing, not verifying transactions (?)

**Tags:** mining-technical-details


---

## 1 answers

### Answer by username_1 on 2020-11-12. Score: 4

# Balances

**Bitcoin doesn't care about balances**. Miners also don't.

Your wallet may keep track of *your* balance but it doesn't need to know about anyone else's. No one else cares about your balance. It is irrelevant.

Bitcoin only keeps track of unspent transaction outputs (UTXOs) - If you like metaphors and understand their limits, you can think of UTXOs as "coins" whose "current ownership" is indirectly kept track of in an almost anonymous way. **When you give someone a coin in payment, they don't care how many other coins you have in your pocket**, they only care whether the coin you gave them is genuine (really yours).

# Fast verification

Bitcoin is designed so that creating new pages in the replicated journal of transactions is expensive and slow (i.e. constructing blocks that can be added to the blockchain). However, transactions can be *verified* quickly.

In the database world you speed up retrieval by adding appropriate indexes. You can have separate tables for live vs dead data, you can hold important data in memory, etc etc. That is how software finds UTXO's fast.


---

