26

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?

Murch
  • 75,206
  • 34
  • 186
  • 622
BitCoin New Guy
  • 888
  • 4
  • 13
  • 22
  • 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 Feb 05 '13 at 02:39
  • So just to confirm if u are solo u can at an API level only select which transactions to exclude – BitCoin New Guy Feb 07 '13 at 04:09
  • 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 Apr 24 '13 at 08:23
  • 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 Jun 30 '13 at 17:22

3 Answers3

7

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)

Gopoi
  • 929
  • 6
  • 21
  • How would they exclude a transaction...is there some tool or viewer ??? – BitCoin New Guy Jan 31 '13 at 21:39
  • 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 Jan 31 '13 at 21:47
  • 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 Jan 31 '13 at 21:52
  • 2
    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 Jan 31 '13 at 22:03
  • 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 Feb 01 '13 at 04:35
  • What if no miner wants to include your transaction? Will that transaction never happen? – mercury0114 Jun 02 '17 at 18:22
  • 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 Jun 06 '17 at 23:03
6

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.

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
0

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.

bradley101
  • 101
  • 1
  • 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 Feb 17 '21 at 12:12