Skip to content

Scanning blocks for common event signatures (like Transfer) takes too long #497

Closed

Description

@Jannis

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Scanning blocks for very common event signatures takes a long time. For very uncommon event signatures, scanning up to the first block with events can be as fast as 15-30 seconds. For common event signatures (like Transfer(address,address,uint256)) it can take hours.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Create a subgraph that triggers on a common event like Transfer(address,address,uint256) for any contract, deploy it to a graph node and observe its progress.

What is the expected behavior?

Graph Node should find the first block with events for such a subgraph quickly. Less than one minute would be a start, 20-30 seconds would be better.

Activity

  1. self-assigned this
    on Oct 25, 2018
  2. added this to the Hosted Service milestone on Oct 25, 2018
  3. davekay100 commented on Oct 25, 2018

    @davekay100
    Contributor

    Yep I got this issue with trying to source 0x token contract.

    My gut feeling is that Transfer is the only event that will cause this much slowness today, based on what smart contracts are live on Ethereum today. Approval is the other ERC-20 event, and it gets used wayyyy less.

    However, it would still be great to optimize this as blockchain data is only growing!

  4. davekay100 commented on Oct 25, 2018

    @davekay100
    Contributor

    Approval is actually pretty slow too. Probably from all the DEX's

  5. ghost removed on Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions