[Ethereum] Would a minimal gas price tx ever be mined

gas-pricemining

I want to mine and charge a minimal gas price (like the minimum required to prevent infinite loops and such), to enable many smaller transactions to be confirmed super cheaply and to lower the cost of EVM computation for a project I'm working on.

Is it possible to specify which miner I want to mine my transaction so my project can send transactions to a super-low-cost miner?

Is it correct to say that if I submit a transaction with a very low gas price and a miner has a very low gas price set, the transaction will eventually be routed to the low cost miner?

It would be nice to bypass the more expensive miners and just go straight to the low cost miner. But now that I'm thinking this through, low-cost txs will never be mined if a small % of the hash-rate has a low gas price set.

Best Answer

If you specify a low gas price, if any miner is willing to include the transaction at that price, it will get included, regardless of if it's the miner you were thinking of or someone else. That is, your transaction should propagate around the network and linger until it is mined or otherwise removed from the transaction pool of all miners.

If you meant you wanted to submit the transaction in such a way that no one other than a specific miner will miner, then I don't know how you would go about doing that without modifying that miner's node software to not rebroadcast the transaction. If you want to ensure that a particular miner sees the transaction, you can add it to your list of static nodes.

If you just want the transaction to go through cheaply, the more miners (as a % of the entire network) that allow low gas price transactions through, the faster your low-priced transactions will go through, so long as the network isn't congested (and you therefore get priced out). Easy rough calculation for mining time, assuming current block-capacity levels:

confirmation time = 20s / % of miners allowing your target gas price.

(20s is roughly current block time). So if 1% of miners will include your transaction, it'll take on average 2000s, or 30 minutes, for your transaction to be included.

See also Can gas price be fixed under 2 gwei?