What are the transactions included in the merkle root

4

I am trying to understand the block hashing algorithm used to generate block.

One of the points mentioned here is

it is (nearly) impossible for two people to have the same Merkle root because the first transaction in your block is a generation "sent" to one of your unique Bitcoin addresses.

How do I specify my unique address? Does it depend on what kind of miner I use and whether I mine in a pool?

Also what is "generation" and how is it different from other transactions that include transfers of bitcoins? What other transactions are included in the Merkle root?

kon psych

Posted 2013-02-17T16:36:55.980

Reputation: 173

Answers

3

How do I specify my unique address?

You don't need to. Bitcoin will add the coinbase transaction automatically.

Does it depend on what kind of miner I use

No.

and whether I mine in a pool?

Yes, because then the pool gives you a block header to mine, which includes their coinbase transaction. If you put in your own coinbase header, then the pool will reject your shares.

Also what is "generation" and how is it different from other transactions that include transfers of bitcoins?

Just like a normal transaction, it specifies how the money can be spent, but unlike normal transactions, it doesn't need to provide any inputs. However, the amount transferred must be equal to the total transaction fees plus the block subsidy.

What other transactions are included in the Merkle root?

Every valid transaction that your bitcoin client knows about is included.

I suppose that the pool gives different headers which include different transactions to pool members. Right?

I'm not sure what you mean by that - the coinbase transaction is different, because the pool doesn't want multiple miners to duplicate work. But in all cases, the coinbase transaction gives the bitcoins to the pool. Actually solving a block is worth just as much to the individual miner as solving a share.

What happens to the transactions that are not included. Are they included in future blocks?

Sometimes. Maybe those transactions are forgotten. It's called the "memory pool" for a reason - it's forgotten on shutdown.

Nick ODell

Posted 2013-02-17T16:36:55.980

Reputation: 26 536

I suppose that the pool gives different headers which include different transactions to pool members. Right? Maybe that should be a different question but what happens to the transactions that are not included. Are they included in future blocks?kon psych 2013-02-17T18:20:44.837

@konpsych I edited my answer to add your questions.Nick ODell 2013-02-18T00:23:33.043

I did not realise that the coinbase transaction is different although it is given by the pool. However, even if the transactions are forgotten by my memory pool are they lost? I thought the purpose of mining is to organise all the transactions into blocks. Am I missing something?kon psych 2013-02-18T10:21:16.433

@konpsych This is by design. Transactions that don't make it into a block will eventually be forgotten.Nick ODell 2013-02-18T16:33:35.620