graphprotocol / graphprotocol/graph-node
[Bug] Reverted calls aren't filtered from the firehose
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
This is in reference to issue #3701 and the PR #3762 that was meant to address it when the firehose is used. In that PR the following is written:
In firehose, this means that we must use state_reverted field to correctly skip calls that had no effect on the chain.
That change was implemented, but then it was immediately undone to "align firehose with RPC behavior" (which previous discussions established is incorrect and potentially unfixable).
The result of that PR is that calls where only state_reverted is true are still processed as successful calls because both status_reverted and status_failed are false. This goes against the explanation for that field in the firehose proto spec.
Test case: a call from this transaction is present in the linked subgraph (in the liquidityChanges table) despite both calls to our contract having their state changes reverted (but only the second call has status_failed=true).
Is there a reason for this behavior? Shouldn't this line also have a !call.state_reverted condition?
Or is there a different way to filter out state_reverted=true calls?
Relevant log output
IPFS hash
No response
Subgraph name or link to explorer
https://thegraph.com/explorer/subgraphs/DyHaLYK1keqcv3YD3VczKGYvxQGfGgV6bGTbZLMj5xME
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
None
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 en chain/ethereum/src/codec.rs alrededor de la línea 367 y compara el filtrado de llamadas que hay allí con la definición de state_reverted en chain/ethereum/proto/ethereum.proto, líneas 358-379. Revisa el historial del issue #3701 y del PR #3762 enlazados para entender el comportamiento previsto de firehose. Se considera terminado cuando las llamadas con state_reverted=true ya no se procesan como llamadas exitosas y existe cobertura para la forma de transacción indicada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- blockchain
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100