<blockquote>
  <p>Is the solving aspect of the hash the most expensive part, for the
  computer? Or is gathering the transactions and confirming them more
  expensive?</p>
</blockquote>

<p>Finding the nonce that produces the correct hash is by far the most computationally expensive part.</p>

<blockquote>
  <p>How does one confirm the transactions? Do they have to traverse the
  entire blockchain, or only find the most recent ledger which shows
  both user's balances to confirm?</p>
</blockquote>

<p>The blockchain is the only bitcoin ledger. One confirms transactions by confirming each of them. To confirm a transaction is valid it must satisfy certain rules. One of these rules is that each of transaction's inputs must be correctly signed.</p>

<p>Transaction's input comes from an output of some previous transactions. Bitcoin node that wants to validate the transaction maintains a list of all unspent previous transactions (this list updates regularly and contains only small part of the blockchain), so it can easily find the output that the current transaction's input points to. The output must be in this list of <strong>unspent</strong> transaction's. An output has all information to verify respective input's digital signature. </p>

<p>So the node that checks the block, makes the above input verification for each input of each transaction.</p>

CC BY-SA 3.0
2017-12-01T17:51:13.343Z
This was all the information I was looking for, thank you!

Is the list you are referring to the `Merkle Root` I have heard about before?
DjangoBlockchain
CC BY-SA 3.0
2017-12-01T18:24:10.893Z
No. It is a list of unspent transactions in entire blockchain. More precisely list of unspent transaction outputs, as transaction can be partially spent (some of its outputs can be spend, but other outputs still 'alive'). You will find a term UTxO that's Unspent Transaction Outputs. Merkle root is related to specific block and all transactions in that block (some of which or all can be already spent).
croraf
CC BY-SA 3.0
2017-11-30T19:00:15.023Z
2017-12-01T07:16:18.660Z
2017-12-01T07:16:18.660Z
croraf
<p>From my understanding, miner's take a bunch of transactions and use a nonce, previous block and the transaction data to try and find a hash that beats the difficulty. As soon as this happens, will their block be added, and then 99 blocks later the BTC will be awarded.</p>

<p>Is the <code>solving</code> aspect of the hash the most expensive part, for the computer? Or is gathering the transactions and confirming them more expensive? </p>

<p>How does one confirm the transactions? Do they have to traverse the entire blockchain, or only find the most recent ledger which shows both user's balances to confirm?</p>

<blockchain><mining-theory>
What is the most expensive part of mining?
DjangoBlockchain
# What is the most expensive part of mining?

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

From my understanding, miner's take a bunch of transactions and use a nonce, previous block and the transaction data to try and find a hash that beats the difficulty. As soon as this happens, will their block be added, and then 99 blocks later the BTC will be awarded.

Is the `solving` aspect of the hash the most expensive part, for the computer? Or is gathering the transactions and confirming them more expensive?

How does one confirm the transactions? Do they have to traverse the entire blockchain, or only find the most recent ledger which shows both user's balances to confirm?

**Tags:** blockchain, mining-theory


---

## 1 answers

### Answer by username_1 on 2017-11-30. Score: 2 | Accepted answer

> Is the solving aspect of the hash the most expensive part, for the
> computer? Or is gathering the transactions and confirming them more
> expensive?

Finding the nonce that produces the correct hash is by far the most computationally expensive part.

> How does one confirm the transactions? Do they have to traverse the
> entire blockchain, or only find the most recent ledger which shows
> both user's balances to confirm?

The blockchain is the only bitcoin ledger. One confirms transactions by confirming each of them. To confirm a transaction is valid it must satisfy certain rules. One of these rules is that each of transaction's inputs must be correctly signed.

Transaction's input comes from an output of some previous transactions. Bitcoin node that wants to validate the transaction maintains a list of all unspent previous transactions (this list updates regularly and contains only small part of the blockchain), so it can easily find the output that the current transaction's input points to. The output must be in this list of **unspent** transaction's. An output has all information to verify respective input's digital signature.

So the node that checks the block, makes the above input verification for each input of each transaction.

> **Comments:**
> **username_0**: This was all the information I was looking for, thank you!  Is the list you are referring to the `Merkle Root` I have heard about before?  
> **username_1**: No. It is a list of unspent transactions in entire blockchain. More precisely list of unspent transaction outputs, as transaction can be partially spent (some of its outputs can be spend, but other outputs still 'alive'). You will find a term UTxO that's Unspent Transaction Outputs. Merkle root is related to specific block and all transactions in that block (some of which or all can be already spent).  

---

