DEV Community

Discussion on: Blockchain: What is Mining?

Collapse
 
fantasycz profile image
fantasycz

Hi Damien, Thanks for the amazing articles. I just started to learn blockchain, you make the blockchain concept so clear to me. I still have a few dumb questions here. All the questions are based on Bitcoin Blockchain.

  1. How to calculate the transaction fees? And where is this fee from? Are they just like bitcoins, which are generated from nothing, since there is no input for it? You mentioned after 2140, there will no new bitcoins generating, but the transaction fees will still be generated?

  2. For each candidate blocks, do they use the same set of transactions in the transaction pool except the coinbase transaction to generate the merkle tree? If not, do they use the same number of transactions, or they use different number of transactions? What is the rule to choose the transactions from the transaction pool to be included in the candidate block?

  3. At the end of the article, you said a valid block should include "All transactions within the blocks are valid ( also have a checklist on their own )". As I understand, the transactions in the transaction pool are not confirmed. How to check the transactions within the blocks are valid? What is the definition of the valid transaction? What does the checklist mean?

  4. A little bit more, I have read the original paper, it mentioned simplified payment verification (SPV). To verify a transaction, we use the merkle tree, bloom filter and the method you mention in the article what is in the block, is this right? However, what if a transaction is still in the transaction pool, not in the block yet? Do we think it is not verified?

  5. I am confused whether there are intermediate transaction hashes in the block. In the previous article you mentioned it in the Q&A, but not very clear to me? So if we have transactions 1,2,3,4. Do we have Hash_1, Hash_2, Hash_3,Hash_4, Hash_12, Hash_34 (where Hash_1 is the hash value of transaction 1)? In this case, Hash_1234 is the merkel tree root, right?

I think I have so many dumb questions. If you could help me, I will very much appreciate it.

Collapse
 
lixue212 profile image
chengcheng

I thought maybe I could help you,