<blockquote>
<p><strong>Do we have to search all transactions of Alice saved on blocks and to calculate her balance</strong></p>
</blockquote>
<p>Nobody other than Alice cares about her balance. That's because Bitcoin is cash, not a bank account. When you hand over a $10 banknote to a shopkeeper, they don't want to know how much total cash you have in your wallet, they just look at the $10 to see if it is genuine. Bitcoin does not keep track of balance per account holder - there are no accounts, no people, no balances in the Bitcoin network or blockchain.</p>
<p>Bitcoin works on the basis of keeping track of Unspent Transaction Outputs (UTXOs). A UTXO is roughly equivalent to a banknote or coin. When someone spends a UTXO, all other nodes check that the UTXO exists and hasn't been spent already.</p>
<p>You can create a list of UTXOs by reading the blockchain from the start once.</p>
<p>A Bitcoin wallet such as Bitcoin core may provide methods of looking at the data in its copy of the blockchain. For example Bitcoin core has an <a href="https://developer.bitcoin.org/reference/rpc/" rel="nofollow noreferrer">RPC API</a> including functions such as <a href="https://developer.bitcoin.org/reference/rpc/getreceivedbyaddress.html" rel="nofollow noreferrer"><code>getreceivedbyaddress</code></a> - which normally only works on your own addresses, not other people's.</p>
<hr />
<blockquote>
<p><strong>there are tools to know the balance of an adress. But my question is how this tools works ? How they request the blockchain?</strong></p>
</blockquote>
<p>They can use <a href="https://en.bitcoin.it/wiki/Protocol_documentation" rel="nofollow noreferrer">the Bitcoin network protocol</a> to collect their own copy of the blockchain, index it and then perform their own analysis of that data.</p>
<p>The Bitcoin network protocols allow any new node, such as a wallet, to discover a few other nodes and to request from them copies of blockchain data, piece by piece.</p>
<p>Generally speaking, address balances are of no interest whatsoever. They play no part in the way Bitcoin operates. You might rummage through your  pockets and rainy-day coin-jar to write down the total amount of money you find but no one else really cares.</p>

CC BY-SA 4.0
2024-03-31T13:11:42.907Z
2024-03-31T13:28:24.197Z
2024-03-31T13:28:24.197Z
RedGrittyBrick
<p>I wonder about the bitcoin and blockchain. I think I have understand the purpose of a blockchain. (security/decentralisation)</p>
<p>Ok we save transaction on blocks validate thanks to the proof of work.</p>
<p>But what I did not understand, how to get information from the blockChain. As for example to know &quot;How mush Bitcoin Alice has ?&quot;</p>
<p>Do we have to search all transactions of Alice saved on blocks and to calculate her balance ? Or is any other way (or something I have misandertood)</p>
<p>I know that there are tools to know the balance of an adress. But my question is how this tools works ? How they request the blockchain ?</p>
<p>Linking subject : What I understood is that we could save not only transaction in the bitcoin blockchain (or in the ethereum) There are dapps that use blockchain as ethereum to save there data. It is not a problem that to save many heterogeneous datas from differents dApps, mixing with transactions ?</p>

CC BY-SA 4.0
2024-04-01T23:37:52.850Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
<blockchain><bitcoin-cli><blockchain-explorer>
bitcoin block chain - database - how to request / how to get status of an object? [NOOB]
Marcel kobain
# bitcoin block chain - database - how to request / how to get status of an object? [NOOB]

(Asked by: username_0 on 2024-03-31)

I wonder about the bitcoin and blockchain. I think I have understand the purpose of a blockchain. (security/decentralisation)

Ok we save transaction on blocks validate thanks to the proof of work.

But what I did not understand, how to get information from the blockChain. As for example to know "How mush Bitcoin Alice has ?"

Do we have to search all transactions of Alice saved on blocks and to calculate her balance ? Or is any other way (or something I have misandertood)

I know that there are tools to know the balance of an adress. But my question is how this tools works ? How they request the blockchain ?

Linking subject : What I understood is that we could save not only transaction in the bitcoin blockchain (or in the ethereum) There are dapps that use blockchain as ethereum to save there data. It is not a problem that to save many heterogeneous datas from differents dApps, mixing with transactions ?

**Tags:** blockchain, bitcoin-cli, blockchain-explorer

> **Comments:**
> **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  

---

## 1 answers

### Answer by username_2 on 2024-03-31. Score: 1

> **Do we have to search all transactions of Alice saved on blocks and to calculate her balance**

Nobody other than Alice cares about her balance. That's because Bitcoin is cash, not a bank account. When you hand over a $10 banknote to a shopkeeper, they don't want to know how much total cash you have in your wallet, they just look at the $10 to see if it is genuine. Bitcoin does not keep track of balance per account holder - there are no accounts, no people, no balances in the Bitcoin network or blockchain.

Bitcoin works on the basis of keeping track of Unspent Transaction Outputs (UTXOs). A UTXO is roughly equivalent to a banknote or coin. When someone spends a UTXO, all other nodes check that the UTXO exists and hasn't been spent already.

You can create a list of UTXOs by reading the blockchain from the start once.

A Bitcoin wallet such as Bitcoin core may provide methods of looking at the data in its copy of the blockchain. For example Bitcoin core has an [RPC API](https://developer.bitcoin.org/reference/rpc/) including functions such as [`getreceivedbyaddress`](https://developer.bitcoin.org/reference/rpc/getreceivedbyaddress.html) - which normally only works on your own addresses, not other people's.

---

> **there are tools to know the balance of an adress. But my question is how this tools works ? How they request the blockchain?**

They can use [the Bitcoin network protocol](https://en.bitcoin.it/wiki/Protocol_documentation) to collect their own copy of the blockchain, index it and then perform their own analysis of that data.

The Bitcoin network protocols allow any new node, such as a wallet, to discover a few other nodes and to request from them copies of blockchain data, piece by piece.

Generally speaking, address balances are of no interest whatsoever. They play no part in the way Bitcoin operates. You might rummage through your pockets and rainy-day coin-jar to write down the total amount of money you find but no one else really cares.


---

