graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

[Bug] `net_version` change error when switching from `RPC` provider to a Firehose provider

Open maoueh opened this issue 2 years ago • 5 comments

Bug report

Steps:

  1. Fresh graph-node start from fresh database with config below. This creates a chain for mainnet with net_version: 1 in the database.

    [general]
    
    [store]
    [store.primary]
    connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
    weight = 1
    pool_size = 10
    
    [chains]
    ingestor = "block_ingestor_node"
    [chains.mainnet]
    shard = "primary"
    protocol = "ethereum"
    provider = [
      { label = "peering", url = "$RPC_NODE", features = [ "archive", "traces" ] },
    ]
    
    [deployment]
    [[deployment.rule]]
    shard = "primary"
    indexers = [ "default" ]
    
  2. Stop graph-node instance.

  3. Start it back with a Firehose only provider

    [general]
    
    [store]
    [store.primary]
    connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
    weight = 1
    pool_size = 10
    
    [chains]
    ingestor = "block_ingestor_node"
    [chains.mainnet]
    shard = "primary"
    protocol = "ethereum"
    provider = [
      { label = "firehose", details = { type = "firehose", url = "$FIREHOSE_ENDPOINT", token = "$STREAMING_FAST_API_TOKEN", features = [ "compression", "filters" ] }},
    ]
    
    [deployment]
    [[deployment.rule]]
    shard = "primary"
    indexers = [ "default" ]
    

Yields error message Apr 27 16:03:14.931 ERRO the net version for chain mainnet has changed from 1 to 0 since the last time we ran, component: BlockStore.

Weirdly, the network seems to still be configured correctly, so maybe it's more a warning or maybe we should just ignore net_version and keep only genesis_hash check.

Relevant log output

No response

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

  • [ ] Tick this box if this bug is caused by a regression found in the latest release.
  • [ ] Tick this box if this bug is specific to the hosted service.
  • [X] I have searched the issue tracker to make sure this issue is not a duplicate.

OS information

macOS

maoueh avatar Apr 27 '23 20:04 maoueh

is the net_version from the Firehose 0?

azf20 avatar Apr 28 '23 16:04 azf20

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.

github-actions[bot] avatar Oct 26 '23 00:10 github-actions[bot]

@maoueh checking on this issue?

azf20 avatar Oct 26 '23 08:10 azf20

That is still relevant AFAIK. The net_version could be ignored and we only rely on the genesis block. Would miss someone mixing up ETH classic endpoint and ETH Mainnet endpoints. I feel this is a relative low possibility in the wild, we would still find mixing up two different networks.

maoueh avatar Oct 26 '23 16:10 maoueh

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.

github-actions[bot] avatar Apr 25 '24 00:04 github-actions[bot]