Skip to content

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

Description

@sduchesneau
  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions