graphprotocol / graphprotocol/graph-node

[Bug] Reverted calls aren't filtered from the firehose

Aperta
#5,775 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug Stale
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia in chain/ethereum/src/codec.rs intorno alla riga 367 e confronta il filtraggio delle chiamate presente lì con la definizione di state_reverted in chain/ethereum/proto/ethereum.proto, righe 358-379. Esamina la cronologia dell’issue #3701 e della PR #3762 collegate per comprendere il comportamento previsto di firehose. Il lavoro è completo quando le chiamate con state_reverted=true non vengono più elaborate come chiamate riuscite e viene aggiunta la copertura per la forma di transazione segnalata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
blockchain
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.