<p>Every node maintains a memory pool of transactions that are not yet accepted into the block chain, but they consider acceptable. The rules for this acceptability are complicated (they must be valid, they must not spend any coins already spent in the chain or by anything already in the mempool, various limitations to prevent denial of service attacks, fee and priority limitations, rate limits, ...). Any time a miner creates a new block, they generally use all available transactions from their mempool, constrained by block size limitations (so some transactions may not make it into one block, but could make it into the next one).</p>

CC BY-SA 3.0
2015-05-03T21:17:32.017Z
Thanks! So where does inclusion of a transaction according to its fee come in? I've read multiple times that some transactions don't make it into blocks due to relativley small fee..Because right now you're considering the block size only in your answer, taking "rules for acceptability" being met for granted.
Aliakbar Ahmadi
CC BY-SA 3.0
2015-05-04T09:19:53.290Z
In case there is not sufficient space in a block to encode the entire memory pool, the transactions with the highest fee per byte are included first.
Pieter Wuille
CC BY-SA 3.0
2015-05-01T20:44:22.343Z
2015-05-01T20:44:22.343Z
Pieter Wuille
<p>What are <strong>reliable and good sources for understanding the procedure of transaction inclusion into a block?</strong></p>

<p><strong>Problem outline:</strong><br>
Given, there are multiple peers - let's say 5 - in a test network, where 3 nodes exchange transactions - let's say 100 - and 2 nodes include all transactions into blocks.<br/>
<strong>Which node decides how to include which transaction into which block?</strong></p>

<transaction-selection><mempool>
Transaction inclusion into block
Aliakbar Ahmadi
# Transaction inclusion into block

(Asked by: username_0 on 2015-05-01)

What are **reliable and good sources for understanding the procedure of transaction inclusion into a block?**

**Problem outline:**  
Given, there are multiple peers - let's say 5 - in a test network, where 3 nodes exchange transactions - let's say 100 - and 2 nodes include all transactions into blocks.

**Tags:** transaction-selection, mempool


---

## 1 answers

### Answer by username_1 on 2015-05-01. Score: 2

Every node maintains a memory pool of transactions that are not yet accepted into the block chain, but they consider acceptable. The rules for this acceptability are complicated (they must be valid, they must not spend any coins already spent in the chain or by anything already in the mempool, various limitations to prevent denial of service attacks, fee and priority limitations, rate limits, ...). Any time a miner creates a new block, they generally use all available transactions from their mempool, constrained by block size limitations (so some transactions may not make it into one block, but could make it into the next one).

> **Comments:**
> **username_0**: Thanks! So where does inclusion of a transaction according to its fee come in? I've read multiple times that some transactions don't make it into blocks due to relativley small fee..Because right now you're considering the block size only in your answer, taking "rules for acceptability" being met for granted.  
> **username_1**: In case there is not sufficient space in a block to encode the entire memory pool, the transactions with the highest fee per byte are included first.  

---

