Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Exceeds block gas limit error to call view functions #148

Closed
benjamincburns opened this issue Aug 13, 2018 · 5 comments
Closed

Exceeds block gas limit error to call view functions #148

benjamincburns opened this issue Aug 13, 2018 · 5 comments

Comments

@benjamincburns
Copy link
Contributor

@xxorg3 commented on Wed Jul 25 2018

With solidity view function, you can specific a large number of gas to use. Since it is not a state changing transaction, all the gas cost is not charged for, and the client should be able to allow the call function to run with a gas limit larger than the block limit.

image

@benjamincburns
Copy link
Contributor Author

"Needs validation" in that we need someone from our team to verify that geth/parity also support view calls in excess of the block gas limit.

Further, we probably don't want to allow infinite gas on view calls, or if we do we likely want to implement some timeout functionality as otherwise a view which never terminates will take out the whole node.

@Uxio0
Copy link

Uxio0 commented Nov 1, 2018

I can add to this issue that I just checked and at least Parity has no problems using more gas for calls than block gasLimit

ccowell pushed a commit that referenced this issue Nov 7, 2018
Tested block gas limit checks when running expensive pure/view solidity functions
 * Ganache acknowledges block gas limit and prevents very expensive pure/view functions to execute
 * Geth ignores block gas limit and allows very expensive pure/view functions to execute
 * Parity ignores block gas limit and allows very expensive pure/view functions to execute
@rstormsf
Copy link

rstormsf commented May 2, 2019

I can confirm it's the issue with ganache
Parity and geth clients have no problem with calling function with large gas limit even though the real gas limit is 8M. I can easily call geth with 200M gas if it's eth_call method used

@TripleSpeeder
Copy link

FYI, geth has the following option to limit gas usage for calling functions:

--rpc.gascap value Sets a cap on gas that can be used in eth_call/estimateGas (default: 0)

(checked with geth 1.9.3-stable)

@davidmurdoch
Copy link
Member

Closing as this is now fixed in #449.

@TripleSpeeder, The new option, callGasLimit, wasn't added to the readme, i'll do that now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants