graphprotocol / graphprotocol/graph-node

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

Aperta
#4,582 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug Stale
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

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.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

macOS

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla logica di BlockStore che confronta la net_version memorizzata quando viene cambiato un provider della chain, usando i due esempi di configurazione per riprodurre il problema. Determina se il cambio di provider debba preservare l’identità di rete esistente o segnalare un avviso, quindi verifica il comportamento risultante rispetto ai controlli esistenti della configurazione della chain.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
postgresql, rust
Ambito
backend, blockchain, databases
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.