2

Since ether, on the ropsten network, virtually isn't worth anything does the gas price for transactions affect the priority in which they're mined? I'm asking because web3.eth.getGasPrice() (on the ropsten network) seems to always returns a fixed price of 1 GWEI. Also when testing with different gas prices i can't say I've noticed a differences that i, undoubtedly, can say were caused by the gas price.

5
  • Regarding your recent extension of the question, a difference in the speed at which your transaction is added to the blockchain is not a function of only the gas-price, but a lot of other factors as well (how many miners are currently active, how many other transactions are currently being submitted, what their gas-prices are, etc). So you should not expect the increase in speed to be fully proportional to your increase in gas-price. Commented Apr 23, 2020 at 9:09
  • You're right but on ropsten it's a bit strange because a lot of times blocks aren't even 10% filled even though there are transactions pending in the pool, albeit some of them are huge in terms of gas and could be the reason they don't fit when there are some smaller ones with a better gas price which get chosen first
    – Conviley
    Commented Apr 23, 2020 at 9:17
  • Huge gas limit typically gets your transaction executed slower. AFAIK, the miners algorithm opts for highest gas-price and lowest gas-limit. See this question (posted by myself). Commented Apr 23, 2020 at 9:21
  • Thanks for the link i'm inclined to agree with that! It also seems to add up to the behaviour of the miners on ropsten as i view the pending transactions. The transactions that seems to have been there longer do seem to have a higher gas limit than the others
    – Conviley
    Commented Apr 23, 2020 at 9:31
  • @goodvibration sure thing! :)
    – Conviley
    Commented Apr 23, 2020 at 11:20

1 Answer 1

2

Since ether on the ropsten network virtually isn't worth anything, does the gas price for transactions affect the priority in which they're mined?

Ropsten ether may be worthless in "the real world" (for example, if you ever try to convert it to dollars), but in the perspective of the Ropsten network participants, it is just as worth as it is on any other Ethereum network.

I'm asking because web3.eth.getGasPrice() seems to always returns a fixed price of 1 GWEI.

No it doesn't!

6
  • Is there some official documentation on this? Also, to clearify web3.eth.getGasPrice() was run for the ropsten network. In the documentation for that function it says it returns the median of the last few blocks which i found a bit cryptic but looking at the blocks avg gas price on ropsten.etherscan.io 1GWEI should not be the median
    – Conviley
    Commented Apr 23, 2020 at 8:59
  • @Conviley: Specifically for Ropsten? I sincerely doubt that. Why would there be? It's just another network which implement the Ethereum protocol. Commented Apr 23, 2020 at 9:02
  • @Conviley: Regarding the price - your own description (which you've found in the official documentation) tells you that it is not constant. Perhaps you're not calculating the median properly, or you haven't fetched the exact information from the last few blocks, or perhaps there was no change during those last few blocks (or a change which did not ultimately impact the median). But all of this is regardless of the fact that according to the official documentation, the price should change. Just because it hasn't changed during this specific moment, doesn't mean it stays the same forever. Commented Apr 23, 2020 at 9:05
  • regarding your first comment i agree so i guess it's completely up to the miners and in their strategy for choosing transactions. However i still believe that the function will always return 1 GWEI. Sure in theory it might be just a coincidence that at all the exact times i call getGasPrice the median is exactly 1000000000 WEI but it feels unlikely.
    – Conviley
    Commented Apr 23, 2020 at 9:15
  • @Conviley web3.eth.getGasPrice() is currently returning '2273507056' for me when attached to ropsten. Commented Feb 15, 2021 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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