3

How are transactions provided to the miners? And what keeps the following scenario from occurring?


A valid transaction is initially reported to a "rogue" node, A, in the network. If that node is a miner, it simply keeps the transaction for itself so that it can (eventually) obtain the incentive the next time it gets a block into the chain. The network will accept the block since the transaction is valid, eh?

If the A is not a miner, it simply works with a "partner" miner B which gives A a portion of the incentive earned for each transaction A sends to B and B successfully got into the block chain.


So, in a sense, what keeps miners from (illegally) paying other nodes in the network for more (valid) transactions? In light of something like net neutrality, perhaps miners can pay to for better service from nodes that receive transactions? How many nodes must know about a transaction before it can be put in a block?

2 Answers 2

6

A transaction can go in a block if it's valid (references inputs that are already in the same or previous blocks, scripts are legal and return success, and signatures validate ok), regardless of whether any other nodes have ever seen it before or not. So if a "selfish" node associated with a particular miner receives a transaction, it's perfectly free to sit on it until it can include it in one of its own blocks.

That's why you don't send your transaction to just one node. You send it to as many different nodes as you can. (Bitcoin Core by default will try to remain connected to up to 125 nodes at any given time, and as far as I know it would attempt to send a newly created transaction to all 125 of them.) Perhaps a few of those nodes are "selfish", but you hope that at least some of them are not affiliated with any particular miner, and will make an effort to relay your transaction as widely as they can, as is the default behavior of standard node software.

With reasonable luck, your transaction will quickly propagate to every miner on the network, and each of them has an incentive (namely the fee) to include it in the very next block they mine. (If Miner X declines to include it in his next block, hoping to sit on it until he mines another block at some later time, he risks that some other miner Y who has received the transaction will include it in one of her block before Miner X gets to mine a second block. In that case, Miner X never gets the fee at all.)

So, a node that fails to relay a transaction, saving it for its next block, doesn't do much harm and also doesn't gain much. A node that tries to save a transaction for a later block does some harm, but also risks a monetary loss, and so has an incentive not to do that.

4

Whomever originates the transaction (the sender) wants their transaction completed as quickly as possible, especially if they attached a big "incentive" (fee) to it.

So they will announce their transaction to many other nodes.

Nothing really forces those nodes to share the transaction with all other nodes, although they are supposed to share it.

But the original sender can send out the transaction to any node/pool/miner it thinks might be able to complete the transaction. The sender will ultimately make sure the transaction is distributed widely, even if some nodes don't follow the sharing protocol.

In general, there is simply no reason to not share all transactions with other nodes. When an exceptionally valuable transaction comes along, keeping it to yourself might sound like a good idea, but it'll get shared among the miners with or without your cooperation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.