graphprotocol / graphprotocol/graph-node
[Bug] `net_version` change error when switching from `RPC` provider to a Firehose provider
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der BlockStore-Logik, die beim Wechsel eines Chain-Providers die gespeicherte net_version vergleicht, und reproduziere den Fehler anhand der beiden Konfigurationsbeispiele. Ermittle, ob der Provider-Wechsel die bestehende Netzwerkidentität beibehalten oder eine Warnung ausgeben sollte, und überprüfe anschließend das resultierende Verhalten anhand der vorhandenen Prüfungen der Chain-Konfiguration.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, rust
- Bereich
- backend, blockchain, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100