Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default gas set too low on chrome extension #8261

Closed
dpazdan opened this issue Mar 31, 2020 · 9 comments
Closed

Default gas set too low on chrome extension #8261

dpazdan opened this issue Mar 31, 2020 · 9 comments

Comments

@dpazdan
Copy link

dpazdan commented Mar 31, 2020

Describe the bug
MetaMask extension on Chrome browser suggests default gwei that is lower than on Brave of Firefox for the same transaction, swap, etc. at the same time (same block).

To Reproduce (REQUIRED)
On Brave:
image

On Chrome:
image

Expected behavior
Gas should be estimated the same across browsers, and it should default to the higher option that Firefox and Brave is getting.

Browser details (please complete the following information):

  • OS: [e.g. OS X, Windows]
  • Hardware Wallet [e.g. Trezor Firmware version 1.8.3, Ledger Nano S Firmware version 1.6.0]
  • Browser Chrome
  • MetaMask Version 7.7.8
@tmashuang
Copy link
Contributor

Our single source for gas price is ethgasstation which we save into local storage for about a minute before querying again. Could this be one of those times that the prices changed in that window and one client gets a different gas price? Can anyone else repro this reliably?

@monokh
Copy link

monokh commented Mar 31, 2020

@tmashuang
It doesn't feel like a corner case to me. I've had this defaulting to 1 gwei for a few weeks now and it's consistently reproducible. Same for others that have told me they experience this.
I even installed this from source of the latest tag and still reprod.

I saw in the code that there is a constant for default gas (1 gwei), I guess it can be checked to see what situations this will happen.

And ETH gas station integration seems to be working fine for me as I see the slow, average, fast with the graph fine.

@tmashuang
Copy link
Contributor

tmashuang commented Mar 31, 2020

Your situation seems unrelated since OP states that this is more about discrepancies in client gas price.
What you described seems that the ethgassation call doesn't work at all, or isn't updating the localStorage.
For a little debugging you can open the devtools on the main screen and type localStorage.BASIC_PRICE_ESTIMATES to see that the last estimate was. To check if the call is working to go to the Network tab, click Send then there should be a ethgasAPI.json call for the price.

Edit: You mentioned seeing 1 gwei gas, but are you the number input like in OP screenshots? Or the Gas Tabs? Where precisely is the gas price showing up as 1 gwei?

@monokh
Copy link

monokh commented Mar 31, 2020

Actually @dpazdan raised this as a result of a chat we had about the issue i'm referring to.

My localstorage doesn't contain BASIC_PRICE_ESTIMATES but it does have GAS_API_ESTIMATES set and the values are consistent with what you would get from ethgasstation.

Getting a confirmation dialog doesn't do any network calls for me, but clicking "edit" beside fee gives me one for https://ethgasstation.info/json/predictTable.json.

Yes the same number input as the screenshot above. Here's my screenshot that demonstrates the problem. At this point in time, the low and average were at least 3 gwei. They were displayed as such when you go to "Edit" of fee so it wouldn't seem like ethgasstation was the issue.
image

@tmashuang
Copy link
Contributor

values are consistent with what you would get from ethgasstation

This is probably correct for the graph, not for the gas price.
All the data that you have is comes from https://ethgasstation.info/json/predictTable.json, which is used to populate the graph. The estimated gas price that your screenshot shows should come from https://ethgasstation.info/json/ethgasAPI.json, but doesn't seem to be the case for you?

Can you navigate to the /ethgasAPI.json url normally? Would you be willing to send you state logs to the support team, titled with this github issue number, for me to look it over, or continue the Q/A here?

@monokh
Copy link

monokh commented Apr 8, 2020

@tmashuang yes no problems in accessing the gasAPI url.
I can reproduce again now so I've sent state logs and a new video to support.
Let me know if you need anything else to help.

@tmashuang
Copy link
Contributor

tmashuang commented Apr 9, 2020

At look into your logs and the screen capture you posted shows this is happening on external transactions, transaction made by a dapp. We do not use the ethgasstation api on these transactions, rather we use common gas prices in recent block data to present the gas price.

const percentileNum = percentile(65, lowestPrices)

The block data, at the time, shows that 1gwei was a sufficient price for transactions to complete in this code context, so 1gwei was presented.

@Gudahtt
Copy link
Member

Gudahtt commented May 12, 2020

I suspect this is fixed by #8575

@Gudahtt
Copy link
Member

Gudahtt commented Jul 23, 2020

I'll close this now, since it was likely fixed by #8575

@Gudahtt Gudahtt closed this as completed Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants