Is it possible to calculate gas needed for a transaction to run within a certain amount of time?

by adityapaul   Last Updated August 13, 2018 18:28 PM

I'm trying to find out how much gas is required for a transaction to complete in about 5-10 seconds. Is there any way to do that, or is my understanding of this wrong?

Thanks in advance!

Tags : transactions gas


Answers 1


The gas limit (amount of gas) doesn't affect how long a transaction takes to be mined. The gas price does. https://ethgasstation.info/ is a good resource for seeing what gas prices are currently getting transactions mined in what timeframes.

That said "5-10 seconds" is impossible, because new blocks are only created in Ethereum every 12-15 seconds, and it's generally too late to get a transaction into the block miners are already working on, so you need to expect a minimum of more like 20-30 seconds no matter how high a gas price you specify.

smarx
smarx
August 13, 2018 17:45 PM

Related Questions


Lost ETH sent from Bitstamp

Updated October 02, 2017 06:28 AM

Token Transfer - Pending Verification for + 72H

Updated December 04, 2017 03:28 AM


tx.origin for factory

Updated April 18, 2018 12:28 PM