0

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

1 Answer 1

0

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.