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

Getting exceeds block gas limit error on forge script deployment #3294

Closed
2 tasks done
JasoonS opened this issue Sep 20, 2022 · 8 comments
Closed
2 tasks done

Getting exceeds block gas limit error on forge script deployment #3294

JasoonS opened this issue Sep 20, 2022 · 8 comments
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug

Comments

@JasoonS
Copy link

JasoonS commented Sep 20, 2022

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (6974541 2022-09-20T00:08:48.480626755Z)

What command(s) is the bug in?

forge script

Operating System

Linux

Describe the bug

I repeatedly and sporadically get (code: -32000, message: exceeds block gas limit, data: None) during deployments using forge script.

Sometimes my deployments work, sometimes they don't. I honestly don't have anything else, or know any way to replicate this.

@JasoonS JasoonS added the T-bug Type: bug label Sep 20, 2022
@blackmarkt
Copy link

Having the same issue (code: -32000, message: exceeds block gas limit, data: None) with forge script and forge create deploying to the Goerli testnet

Version: forge 0.2.0 (63c71b4 2022-09-12T00:09:05.6296Z)

OS: macOS Big Sur v11.6.8

Even tried increasing the gas price & gas limits:

forge script script/deploy/ImpactVaultGoerli.s.sol --rpc-url https://rpc.goerli.mudit.blog/ --private-key $GOERLI_PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY --gas-price 100000000000 --gas-limit 3000000000 -vvvv

Any insight or assistance would be greatly appreciated.

@douglasqian
Copy link

+1 running into this as well

@JasoonS
Copy link
Author

JasoonS commented Sep 21, 2022

I managed to get it to work more predictably by making the -g vale a bit smaller (I think it is supposed to scale the gas estimations by a percent).

I was running it with -g 300, making it -g 200 seemed to work (exact numbers will probably depend on your code-base - and you can't really go below 100 for that value).

@rkrasiuk rkrasiuk added C-forge Command: forge Cmd-forge-script Command: forge script labels Sep 21, 2022
@blackmarkt
Copy link

I managed to get it to work more predictably by making the -g vale a bit smaller (I think it is supposed to scale the gas estimations by a percent).

I was running it with -g 300, making it -g 200 seemed to work (exact numbers will probably depend on your code-base - and you can't really go below 100 for that value).

I'm still getting the same error setting the -g flag

@blackmarkt
Copy link

UPDATE: @douglasqian helped me by having us use another RPC node.

The one that worked was https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161

The one that was giving the error was https://rpc.goerli.mudit.blog/

@JasoonS
Copy link
Author

JasoonS commented Nov 17, 2022

Btw @blackmarkt - you shouldn't be sharing those RPC links publicly (especially if they are being paid for).

@douglasqian
Copy link

douglasqian commented Nov 18, 2022

@JasoonS we aren't paying for that first one, it was a public Goerli RPC node URL we found here

@zerosnacks
Copy link
Member

Closing as wontfix / stale as this appears to be related to the RPC being used (#3294 (comment)), not a bug in the implementation

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug
Projects
Status: Completed
Development

No branches or pull requests

5 participants