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.

  • consider accepting an answer, that would be helpful to others as well – Refiner Feb 27 '18 at 15:13

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?

  • But if I'm a tiny part of the mining pool I will never mine a block so these super low cost txs will never be mined, right? – JohnAllen Aug 7 '17 at 0:06
  • If you're part of a mining pool, it's the mining pool that decides which transactions should be included (unless it's a p2p pool, which I don't think exists for Ethereum, yet). You can see from ethgasstation.info that there are some transactions with gas prices under a gwei that do eventually get confirmed. You can also see that miningpoolhub mines transactions with a gas price as low as 0.5 gwei. Thus, if you include a transaction that has a gas price of 0.5 gwei, you can still have your transaction included in the blockchain. That's ~2% of the "standard" price. – lungj Aug 7 '17 at 0:10

The question seems to hint at a big misunderstanding.

No one, not even the miners, gets to decide which miner will solve the next block. No transaction gets included unless the lucky miner includes it in the solved block. Since no one knows in advance which miner will be lucky, you wouldn't know which miner to tell.

Therefore, it's important that all the miners know about your transaction as soon as possible. The network's Gossip layer helps the transaction (and gasPrice offer) propagate. Generally, it doesn't matter who you tell first. News will spread everywhere and that's how you want it.

Unless your fee is way off, your transaction will likely be included in the next block, but miners have some options for good reason.

For example, if the block gas limit is in sight (congestion), they can place a higher priority on transactions with a higher gas price. That means transactions with a lower gas price face possible delays, and transactions with a higher gas should receive higher priority.

Hope it helps.

  • Yeah I realized this after I asked. Realized that if only a tiny % of miners offer this it won't help at all. – JohnAllen Aug 7 '17 at 0:31
  • @Rob Hitchens, if current tx is local, it couldn't be delayed for current node, but for other, you are right~ – BinGoBinBin Aug 7 '17 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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