From the answer of this question Can miners mine their own transactions? it seems that if someone wanted to make a transaction on the ethereum blockchain for the smallest transaction price (gas) possible, they could run a miner to mine the specific transaction. My question is: How can this be done? (the necessary steps)
As I mentioned in the answer to the post you've referenced, putting your own transactions into a block doesn't make that block easier to mine. You'd still be competing against the rest of the miners, who may or may not have included your low-priced transaction in the block they're mining. You'd probably1 be better off broadcasting the transaction and hoping someone else - perhaps with far greater hashing power than you - picks it up. (i.e. Use the power of the rest of the network rather than cutting yourself off from it.)
To actually answer your question though, there are a couple of options I can think of. (Other people may have other ideas.)
- If you're using the Parity client, use the
--tx-queue-strategyflag to prioritise low priced transactions. (Though this won't guarantee yours is included if the transaction pool is full of cheap transactions.) I think the same can be done with the
--gaspriceoption. Geth doesn't have a way to set maximum limits for gas price, only minimum limits, so you can't prioritise low prices.
- The only way I can see to guarantee that your own transactions are prioritised is to edit the code. For Geth, I've mentioned where transactions from the memory pool are sorted in this previous answer. You'd need to inspect the
fromaddress in each transaction, and only add to the block you're mining if the address is yours. (I think. There might be an easier way of creating a local transaction pool containing only your transactions, but that would need some digging and design.)
1 I've no way of quantifying this...