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

Investigate gas error on goerli #526

Closed
1 task done
LukSteib opened this issue Nov 7, 2022 · 5 comments · Fixed by #540
Closed
1 task done

Investigate gas error on goerli #526

LukSteib opened this issue Nov 7, 2022 · 5 comments · Fixed by #540
Labels
bug Something isn't working

Comments

@LukSteib
Copy link
Contributor

LukSteib commented Nov 7, 2022

Goal

Enable testing scenarios on goerli

Context

Currently when trying to execute a tx on goerli this is prevented by a gas related error (see assets below for console output).
AFAIK we compute the maxFeePerGas by taking the baseFeePerGas times 2 . So it makes me wonder how we can end up in a scenario like described in the error mesage where the maxFeePerGas is lower than the baseFeePerGas

Assets

Transaction error: "err: max fee per gas less than block base fee: address 0x4f3B7fb6204C614B28F0e1f50Dc1C99175631678, maxFeePerGas: 2000000000 baseFee: 49196103287"

Tasks

  • Investigate and fix the error described above
@LukSteib LukSteib added the bug Something isn't working label Nov 7, 2022
@valiafetisov
Copy link
Contributor

I guess it's because of this line:

gasPrice: 2000000000,

We either need to hardcode higher number to quickly fix it. Or check if it is properly estimated if there is no hardcoded number whatsoever.

@LukSteib
Copy link
Contributor Author

LukSteib commented Nov 7, 2022

We either need to hardcode higher number to quickly fix it. Or check if it is properly estimated if there is no hardcoded number whatsoever.

Oh I see. I was expecting that we fetch the baseFeePerGas from the chain (in this case from Goerli) directly and then apply our calculation.
We might open a PR removing the hardcoded number, check it and if the estimation is off ,fall back to just adding 0 to the harcoded number...
Would you agree?

@valiafetisov
Copy link
Contributor

Yes. Although adding a zero might be quite expensive 😢

@LukSteib
Copy link
Contributor Author

LukSteib commented Nov 7, 2022

Yes. Although adding a zero might be quite expensive 😢

Well, looking at the number in the error message above adding a zero wouldn't even be enough ...

@valiafetisov
Copy link
Contributor

Oh, true!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants