graphprotocol / graphprotocol/graph-node

[Feature] Display the full JSON-RPC call in the logs that failed

Offen
#3,404 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area/json-rpc developer experience error-handling good first issue
Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
1.1k
Ø Merge
4 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

Currently if something goes wrong with a JSON RPC call (eth-calls, decoding, etc) there is just a message like this displayed:

failed to process trigger: block #21041413 (0x0000…b378), transaction a44fa1857fa5448419ff94682de1ffeccaa74eb0d6dc9d0de8fe37c6c2a90746: Decoding function outputs for the call Function { name: "withdraw", inputs: [], outputs: [Param { name: "", kind: Uint(256), internal_type: None }], constant: None, state_mutability: NonPayable } failed, raw output: : Invalid name: please ensure the contract and method you're calling exist! failed to decode empty bytes. if you're using jsonrpc this is likely due to jsonrpc returning 0x in case contract or method don't exist

(From this example subgraph: https://thegraph.com/hosted-service/subgraph/bsamuels453/yearn-fantom-validation?selected=logs, deployment id: QmNhTkng5LLvdCXbK6JSoeU8tSW18wo3tPpm5mMM3Sd4FY)

This alone does not provide enough information to reproduce.

What is the expected behavior?

It would be great to have the exact JSON RPC call written in the logs so we can reproduce and troubleshoot the underlying issue.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den JSON-RPC-Fehlerprotokollierungspfad in graph-node zu finden und den im Issue beschriebenen Fehler zu reproduzieren. Verfolge den fehlgeschlagenen eth-call oder Decodierungsvorgang zurück, um festzustellen, wo dessen Anfragedetails verfügbar sind; abgeschlossen ist die Aufgabe, wenn der exakte JSON-RPC-Aufruf bei vergleichbaren Fehlern in den Logs enthalten ist und weiterhin für die Reproduktion des zugrunde liegenden Fehlers nützlich bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend-api-design, observability
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.