`Scanning blocks [0, 0]` with `GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBE`R set to > 0 and dataSource without startBlock

Abierto
#4,223 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
blockchain, docker, rust

Línea de trabajo

Comience con graph/src/blockchain/polling_block_stream.rs alrededor de las líneas 329-331 y, a continuación, reproduzca el caso con GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER establecido por encima de 0 y una dataSource sin startBlock utilizando la configuración de docker-compose. Siga cómo se selecciona el bloque inicial y verifique que el escaneo comienza en el bloque génesis configurado en lugar del bloque 0.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug configuration Stale

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Running the graph-node from the docker-compose file (v0.28.2) and have set the genesis block to 1 with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER.
I'm deploying a subgraph without a start block and i get this log:

Nov 25 15:11:26.939 INFO Scanning blocks [0, 0], range_size: 1, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: BlockStream
Nov 25 15:11:26.939 DEBG Requesting logs for blocks [0, 0], contract 0x8a7fa94487d0d0460550e5f3f80a663c39ac8b10, 2 events, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: BlockStream
Nov 25 15:11:27.159 DEBG Block stream produced a non-fatal error, error: Failed to infer hash for block 0, sgd: 1, subgraph_id: QmeR431sHevtNDUq8LgHTJms9KHYEvzE5pA9kyYgWdkerr, component: SubgraphInstanceManager

I'm not sure if I'm looking at the right place, but here https://github.com/graphprotocol/graph-node/blob/master/graph/src/blockchain/polling_block_stream.rs#L329-L331 it states that it should start from the genesin block if (i assume) a start block is not set in the subgraph.yaml file, but on the next line the genesis block seem to be hardcoded to 0 and ignores the block set with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Set GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER to > 0 in the docker-compose file
Deploy a subgraph with a dataSource without a startBlock

What is the expected behavior?

It should start scanning from the genesis block set with GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER instead of always starting from block 0

Lenguaje dominante
Rust
Estrellas
3.2k
Forks
1.1k
Merge medio
4 d 1 h
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de graphprotocol/graph-node

Todos los issues de graphprotocol/graph-node

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.