Transaction Mining – Can Miners Mine Their Own Transactions?

miningtransactions

Since miners are also nodes at the same time, they should be capable of sending transactions. So the question is, can they mine their own transaction technically? And if yes, are they allowed to do do? If yes, a miner will surely have maximum advantage on his own transaction and he should be able to mine it with a success rate of 100% and way faster than any other miner on the network. This defeats the concept of consensus.

Best Answer

When a miner creates a block, he can put whatever transactions into that block that he likes, including his own1.

However, creating the block locally and populating it with transactions, and then successfully mining it, are two different things.

For the block to be mined it must contain a valid proof of work, which proves to the network that the node has solved a computationally difficult problem. The difficulty of this problem is in no way related to the transactions the miner has decided to put into the block. It isn't any easier to mine a block containing your own transactions - the difficulty comes from elsewhere.

1The current vanilla Geth code prioritises transactions in a certain way, but a miner can edit the code in any way he likes to prioritise things differently.

Related Topic