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

remove gas setting for eth_call request #9

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

botdad
Copy link
Contributor

@botdad botdad commented Apr 12, 2024

Background

We noticed an issue after deploying the GSN contracts on Amoy testnet and running our relayer. Gas predictions were returning with an odd error that we assumed at first was a misconfiguration.

insufficient funds for gas * price + value: address 0x0000000000000000000000000000000000000000 have 2170300023505000000 want 900000000000000000000 (supplied gas 600000000)

It turns out there is some very specific geth/bor functionality when you send a eth_call request with gasPrice set. see ethereum/go-ethereum#21108 for more details.

Inside the GSN common library there is a call being sent this way:

https://github.com/opengsn/gsn/blob/v3.0.0-beta.3/packages/common/src/ContractInteractor.ts#L952-L953

This combination was causing all relayed transactions on Amoy to return the error above.

Fix

Since it's in a dependency of the relayer this PR makes a copy of the bug-triggering function into RelayServer.ts and removes the gasPrice from the call. Relaying transacations work after this change.

@botdad botdad merged commit 0d7e8d1 into main Apr 12, 2024
@botdad botdad deleted the bd/monkeypatch-gas-fix branch April 12, 2024 16:36
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

Successfully merging this pull request may close these issues.

2 participants