<p>Every <strong>full node</strong> in the network does the work of making sure a transaction is valid, whereas <strong>miners</strong> do the work of confirming valid transactions by including them in new blocks. Transactions can be validated very quickly, whereas being confirmed in a block may take some time.</p>

<p>Every node keeps a copy of the blockchain and in doing so it generates a list of unspent transaction outputs (UTXO). When a node hears about a new tx, it will check to see if that tx's signature cryptographically matches the relevant address in the UTXO. If it validates, then the tx is valid, if it does not validate, then the node will drop the tx, and not relay it to other nodes. For some good related info, check out the <a href="https://bitcoin.stackexchange.com/questions/22997/how-is-a-wallets-balance-computed">answer to this question</a>.</p>

<p>This is different than a method that functions by <em>"maintain[ing] an internal database that represents each member and their balances"</em>, for more info on this, check out the <a href="https://bitcoin.stackexchange.com/questions/49853/utxo-model-vs-account-balance-model">answer of this question</a>.</p>

CC BY-SA 3.0
2017-12-11T23:02:56.377Z
2017-12-11T23:02:56.377Z
chytrik
<p>My question is how long does it take for a miner to validate account "balance" is sufficient to initiate the transfer so it can include it in a block and how does it do it?
Does it iterates through the whole block chain and sums up the unspent outputs associated with the sender? Or it maintains an internal database that represents each member and their balances whose transaction was ever included in the block chain and once new transactions(a new block) is added to the block chain it updates its internal database?</p>

<p>I guess the second would be much faster than iterating through the whole block chain which is now over 100+ gigabyte.</p>

<p>I'm really interested in how the account balance is determined by the miners. Any help is appreciated. Thx</p>

<bitcoin-core>
how long does it take for a miner to validate account "balance" and how does it do it
Daniel
# how long does it take for a miner to validate account "balance" and how does it do it

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

My question is how long does it take for a miner to validate account "balance" is sufficient to initiate the transfer so it can include it in a block and how does it do it?
Does it iterates through the whole block chain and sums up the unspent outputs associated with the sender? Or it maintains an internal database that represents each member and their balances whose transaction was ever included in the block chain and once new transactions(a new block) is added to the block chain it updates its internal database?

I guess the second would be much faster than iterating through the whole block chain which is now over 100+ gigabyte.

I'm really interested in how the account balance is determined by the miners. Any help is appreciated. Thx

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2017-12-11. Score: 0 | Accepted answer

Every **full node** in the network does the work of making sure a transaction is valid, whereas **miners** do the work of confirming valid transactions by including them in new blocks. Transactions can be validated very quickly, whereas being confirmed in a block may take some time.

Every node keeps a copy of the blockchain and in doing so it generates a list of unspent transaction outputs (UTXO). When a node hears about a new tx, it will check to see if that tx's signature cryptographically matches the relevant address in the UTXO. If it validates, then the tx is valid, if it does not validate, then the node will drop the tx, and not relay it to other nodes. For some good related info, check out the [answer to this question](https://bitcoin.stackexchange.com/questions/22997/how-is-a-wallets-balance-computed).

This is different than a method that functions by *"maintain[ing] an internal database that represents each member and their balances"*, for more info on this, check out the [answer of this question](https://bitcoin.stackexchange.com/questions/49853/utxo-model-vs-account-balance-model).


---

