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

Add support for custom "gas" value in eth_calls from substreams modules #519

Open
sduchesneau opened this issue Aug 20, 2024 · 0 comments
Open

Comments

@sduchesneau
Copy link
Contributor

  • Some frequent eth_calls like symbol() or totalSupply() can usually be run with very low gas (<65535)
  • The current gas value for every eth_call from a substreams is 50_000_000, which is 763x a reasonable value. This leads to issues like a symbol() call timing out after 5 minutes of running -- before hitting the 'out_of_gas' limit on some 'broken contracts'.
  • The substreams developer should be able to set a decent gas limit when 'discovering unknown contracts' to prevent those edge cases. A higher gas limit is only necessary when doing more complex calls like discovering minted NFTs in a recursive data structure or calling a method that has many internal calls.

Adding an intrinsic just for this in substreams and in the substreams-rs library may be tricky because it will fail on older substreams servers, but it may be what we want, to prevent determinism issues.

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

1 participant