<p>No, the selection process of transactions to include in a block is not defined in the protocol. The only transaction that miners have to include in a block is the coinbase transaction, i.e the transaction that reward them with new bitcoin(s) if they successfully mine the block. But even if miners don't have to include other transactions in a block, they will because it allow them to collect the transaction fees.  </p>

<p>Miners in general choose to include transactions with the higher fees. <s>In the bitcoin core client, the transaction date also plays a role: older transactions are prioritized over newer ones, so that transaction with a lower transaction fees still get a chance to be included in a block, but later.</s></p>

<p><em>Edit: as per Pieter Wuille comment, older transactions arent prioritized anymore from v0.15.0</em></p>

CC BY-SA 3.0
2017-10-05T02:36:17.560Z
Calling it a genesis transaction is a little confusing, typically it's referred to as the coinbase transaction https://en.bitcoin.it/wiki/Block#Description  (unfortunately that has become confusing as well considering the popularity of the company by the same name).
m1xolyd1an
CC BY-SA 3.0
2017-10-05T02:37:50.420Z
Good point, I have updated my answer
Julien Klepatch
CC BY-SA 3.0
2017-10-05T05:38:36.427Z
The prioritizatization based on coin age in mining was disabled by default in Bitcoin Core 0.13, deprecated in 0.14, and removed in 0.15. It is just sorting based on feerate now.
Pieter Wuille
CC BY-SA 3.0
2017-10-04T23:23:49.663Z
2017-10-05T08:25:19.737Z
2017-10-05T08:25:19.737Z
Julien Klepatch
<p>We know that miners select a set of txs from their local memory pool and put them into a block before they do PoW. </p>

<p>I wonder whether this selection process is defined by the protocol or do even "honest" miners can select them in the way they want, e.g. they select the subset that maximizes tx fee.</p>

<transaction-fees><mining-profitability>
Does Bitcoin protocol define how miners do the selection from their set of txns?
SpiderRico
# Does Bitcoin protocol define how miners do the selection from their set of txns?

(Asked by: username_0 on 2017-10-04)

We know that miners select a set of txs from their local memory pool and put them into a block before they do PoW.

I wonder whether this selection process is defined by the protocol or do even "honest" miners can select them in the way they want, e.g. they select the subset that maximizes tx fee.

**Tags:** transaction-fees, mining-profitability


---

## 1 answers

### Answer by username_1 on 2017-10-04. Score: 4 | Accepted answer

No, the selection process of transactions to include in a block is not defined in the protocol. The only transaction that miners have to include in a block is the coinbase transaction, i.e the transaction that reward them with new bitcoin(s) if they successfully mine the block. But even if miners don't have to include other transactions in a block, they will because it allow them to collect the transaction fees.

Miners in general choose to include transactions with the higher fees. ~~In the bitcoin core client, the transaction date also plays a role: older transactions are prioritized over newer ones, so that transaction with a lower transaction fees still get a chance to be included in a block, but later.~~

*Edit: as per username_3 username_3 comment, older transactions arent prioritized anymore from v0.15.0*

> **Comments:**
> **username_2**: Calling it a genesis transaction is a little confusing, typically it's referred to as the coinbase transaction https://en.bitcoin.it/wiki/Block#Description  (unfortunately that has become confusing as well considering the popularity of the company by the same name).  
> **username_1**: Good point, I have updated my answer  
> **username_3**: The prioritizatization based on coin age in mining was disabled by default in Bitcoin Core 0.13, deprecated in 0.14, and removed in 0.15. It is just sorting based on feerate now.  

---

