<blockquote>
  <p>Do you look on the blockchain ?</p>
</blockquote>

<p>No, because the blockchain only has confirmed transactions. Instead, the miner looks at its memory pool. It's named that because they are forgotten when the miner shuts down.</p>

CC BY-SA 3.0
2013-01-31T04:30:03.073Z
2013-01-31T04:30:03.073Z
Nick ODell
<p>I think you can run a node (Bitcoin core) or fork the GitHub repository and make some code changes to implement how you want the transactions to be included or excluded and you build that and run that instead of the standard Bitcoin Core.</p>

CC BY-SA 4.0
2021-02-17T12:12:43.227Z
This is true but I think the question was probably more about general principles of transaction selection. Also I would need convincing that Bitcoin core, by itself, is a good starting point for developing bespoke mining software in the age of ASICs.
RedGrittyBrick
CC BY-SA 4.0
2021-02-13T17:45:47.053Z
2021-02-13T17:45:47.053Z
bradley101
<p>A bitcoin node's (bitcoin's standard client acts as one) first function is to relay transactions on a best effort basis, it only relays valid transaction. The miner which also is a node will try to solve a block on the transaction it received, but in the end the miner has last word he can decide to arbitrarily discard some transaction (like one with no miner's fee)</p>

CC BY-SA 3.0
2013-01-31T21:39:03.217Z
How would they exclude a transaction...is there some tool or viewer ???
BitCoin New Guy
CC BY-SA 3.0
2013-01-31T21:47:23.433Z
Miner can choose not to include the transaction in their transaction tree... They don't have a tool they are a node who received the broadcast of transactions. If YOU want to see the transaction or block try http://blockchain.info/ or http://blockexplorer.com/. But it is to say that those sites are merely nodes that permits you to see what is going on the network a miner is a node thus receive about the same info.
Gopoi
CC BY-SA 3.0
2013-01-31T21:52:31.693Z
I got all that ...if you are broadcast all transactions as part of the peer to peer...how do u exclude a transaction with a low fee value when u start cgminer as an example ??
BitCoin New Guy
CC BY-SA 3.0
2013-01-31T22:03:15.800Z
Ok you speak pratically, you would need to see if cgminer is able to be configured...which I am not sure. If you are part of a pool (not p2pool) you can't really deny transactions since you get the work from the pool directly (the pool runs the node). When I said miner I was considering any miner that you could program or configure, a miner in general can choose which transaction to include but it maybe implemented not to.
Gopoi
CC BY-SA 3.0
2013-02-01T04:35:06.250Z
Cool...so at a API level we could write code into our operation that excluded all transactions below a certain fee level... Thanks
BitCoin New Guy
CC BY-SA 3.0
2017-06-02T18:22:20.690Z
What if no miner wants to include your transaction? Will that transaction never happen?
mercury0114
CC BY-SA 3.0
2017-06-06T23:03:23.280Z
In short yes. There two aspects to consider: if your transaction is invalid all the nodes (bitcoin clients) won't even broadcast it to the network so miners won't even see it. If your transaction is valid at first, but when the miner checks it finds that you have already spent your outputs, it won't include it in the block. If a miner actually mines a block with an invalid transaction the network won't accept it. Then this transaction is left out forever.
Gopoi
CC BY-SA 3.0
2013-01-31T13:00:47.567Z
2013-01-31T13:00:47.567Z
Gopoi
<p>Where and how do you view and select which transactions to include in the block you are trying to create?</p>

<p>Do you look on the blockchain?</p>

<p>Is there some tool that you can use that allows you to see the fees as well?</p>

CC BY-SA 3.0
2013-02-05T02:39:36.860Z
Most miners are mining through a pool.  Solo miners, mining pool operators and those running P2Pool can be selective, but any miner that gets work from elsewhere has no say in what transactions get included in the block.
Stephen Gornick
CC BY-SA 3.0
2013-02-07T04:09:16.180Z
So just to confirm if u are solo u can at an API level only select which transactions to exclude
BitCoin New Guy
CC BY-SA 3.0
2013-04-24T08:23:40.443Z
But what software use miners to accept transactions when they find a block? Their mining software or the Bitcoin client software? I'm searching information about Bitcoin and I don't know how miners can verify transactions, but I read here that miners that find a block can accept the transdactions that they want, but if they are "bad" or "malicious" miners, they can accept invalid transactions (double spending transactions). When this "bad" or "malicious" miner accept the transaction this validation is broadcasted over the network to be confirmated? Sorry for my english. If someone don't unders
Zanetti
CC BY-SA 3.0
2013-06-30T17:22:14.470Z
Miner can choose no transaction to build block:

http://bitcoin.stackexchange.com/questions/3332/what-can-be-done-about-the-no-transaction-block-relayer-currently-71-123-170-15
diyism
<transaction-fees><transaction-selection>
How do miners select which transactions to include in a block?
BitCoin New Guy
# How do miners select which transactions to include in a block?

(Asked by: username_0 on 2013-01-27)

Where and how do you view and select which transactions to include in the block you are trying to create?

Do you look on the blockchain?

Is there some tool that you can use that allows you to see the fees as well?

**Tags:** transaction-fees, transaction-selection

> **Comments:**
> **username_1**: Most miners are mining through a pool.  Solo miners, mining pool operators and those running P2Pool can be selective, but any miner that gets work from elsewhere has no say in what transactions get included in the block.  
> **username_0**: So just to confirm if u are solo u can at an API level only select which transactions to exclude  
> **username_2**: But what software use miners to accept transactions when they find a block? Their mining software or the username_0 client software? I'm searching information about username_0 and I don't know how miners can verify transactions, but I read here that miners that find a block can accept the transdactions that they want, but if they are "bad" or "malicious" miners, they can accept invalid transactions (double spending transactions). When this "bad" or "malicious" miner accept the transaction this validation is broadcasted over the network to be confirmated? Sorry for my english. If someone don't unders  
> **username_3**: Miner can choose no transaction to build block:
 
 http://username_0.stackexchange.com/questions/3332/what-can-be-done-about-the-no-transaction-block-relayer-currently-71-123-170-15  

---

## 3 answers

### Answer by username_7 on 2013-01-31. Score: 7 | Accepted answer

A username_0 node's (username_0's standard client acts as one) first function is to relay transactions on a best effort basis, it only relays valid transaction. The miner which also is a node will try to solve a block on the transaction it received, but in the end the miner has last word he can decide to arbitrarily discard some transaction (like one with no miner's fee)

> **Comments:**
> **username_0**: How would they exclude a transaction...is there some tool or viewer ???  
> **username_7**: Miner can choose not to include the transaction in their transaction tree... They don't have a tool they are a node who received the broadcast of transactions. If YOU want to see the transaction or block try http://blockchain.info/ or http://blockexplorer.com/. But it is to say that those sites are merely nodes that permits you to see what is going on the network a miner is a node thus receive about the same info.  
> **username_0**: I got all that ...if you are broadcast all transactions as part of the peer to peer...how do u exclude a transaction with a low fee value when u start cgminer as an example ??  
> **username_7**: Ok you speak pratically, you would need to see if cgminer is able to be configured...which I am not sure. If you are part of a pool (not p2pool) you can't really deny transactions since you get the work from the pool directly (the pool runs the node). When I said miner I was considering any miner that you could program or configure, a miner in general can choose which transaction to include but it maybe implemented not to.  
> **username_0**: Cool...so at a API level we could write code into our operation that excluded all transactions below a certain fee level... Thanks  
> **username_8**: What if no miner wants to include your transaction? Will that transaction never happen?  
> **username_7**: In short yes. There two aspects to consider: if your transaction is invalid all the nodes (username_0 clients) won't even broadcast it to the network so miners won't even see it. If your transaction is valid at first, but when the miner checks it finds that you have already spent your outputs, it won't include it in the block. If a miner actually mines a block with an invalid transaction the network won't accept it. Then this transaction is left out forever.  

---

### Answer by username_4 on 2013-01-31. Score: 7

> Do you look on the blockchain ?

No, because the blockchain only has confirmed transactions. Instead, the miner looks at its memory pool. It's named that because they are forgotten when the miner shuts down.


---

### Answer by username_5 on 2021-02-13. Score: 0

I think you can run a node (username_0 core) or fork the GitHub repository and make some code changes to implement how you want the transactions to be included or excluded and you build that and run that instead of the standard username_0 Core.

> **Comments:**
> **username_6**: This is true but I think the question was probably more about general principles of transaction selection. Also I would need convincing that username_0 core, by itself, is a good starting point for developing bespoke mining software in the age of ASICs.  

---

