graphprotocol / graphprotocol/graph-node
[Bug] `net_version` change error when switching from `RPC` provider to a Firehose provider
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
Bug report
Steps:
-
Fresh
graph-nodestart from fresh database with config below. This creates a chain for mainnet withnet_version: 1in 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" ] -
Stop
graph-nodeinstance. -
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- 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