[Ethereum] Why not mine the own transactions

gas-priceminingtransactions

I have a contract which needs to be updated occasionally.

So I create a transaction, sign it and send it to the network.

When I do that, I state a gas-price.

The higher the gas-price is, the faster the transaction should execute, since miners normally choose higher requests first, in order to optimize their profit.

However, an idea came to me.

I suppose I'm not the first one, but I'll ask it anyway:

Why shouldn't I set up a miner account, which would mine only transactions with the lowest gas-price possible – 1 wei?

Then, I shall submit all of my contract-update transactions with a price tag of 1 wei.

Should some other miner catch them first (for some odd reason, because who would want to work for such a low price), I will end up paying 1 wei to that miner.

If I catch them first, the I gain back the 1 wei that I've spent.

In either case, I end up spending very little for updating my own contract (and a little more for server time, but I'm paying for that anyway since I need that Parity node up and running).

Is there any downside that I'm missing here?

Thank you very much!

Best Answer

Why shouldn't I set up a miner account, which would mine only transactions with the lowest gas-price possible - 1 wei?

Yep, you can, but...

Should some other miner catch them first (for some odd reason, because who would want to work for such a low price), I will end up paying 1 wei to that miner.

For any given block, the rest of the network will (most likely) be prioritising transactions with the highest available gas prices. You will be competing against the rest of the network for that given block. Unless you can throw enough hashing power behind finding the PoW for the block you've constructed yourself, someone out there will beat you to it (for their version of the same block). You then have start over again, constructing the next-numbered block with your low-priced transactions.

Related Topic