graphprotocol / graphprotocol/graph-node
[Bug] `net_version` change error when switching from `RPC` provider to a Firehose provider
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Rust
- Estrellas
- 3.2k
- Forks
- 1.1k
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 1
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la lógica de BlockStore que compara la net_version almacenada cuando se cambia el proveedor de la cadena, utilizando los dos ejemplos de configuración para reproducir el fallo. Determina si el cambio de proveedor debe conservar la identidad de red existente o emitir una advertencia, y luego verifica el comportamiento resultante frente a las comprobaciones existentes de la configuración de la cadena.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- postgresql, rust
- Área
- backend, blockchain, databases
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100