graphprotocol / graphprotocol/graph-node
Add support for failed transactions
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
Transactions do not support the status flag from receipts, nor do they support the error reason (gas or revert reason). Moreover only successful call transactions will invoke a subgraph's handlers.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
That a failed transaction from an invocation of a call handler would:
a) Trigger the call handler in the subgraph
b) That the EthereumTransaction class would contain the following:
* a flag for status reflecting the success status of the transaction
* an errorType - reverted or out-of-gas (others?)
* the revertReason if any (which is easy to surface in ethers and web3)
The main motivation for something like this is for projects, such as ours, to track errors users have when interacting with our contracts (for monitoring tools). As users pay gas even for failed transactions, it's critical to minimize these where possible. It's even more important when they call our functions from their own contracts. As you can imagine, these calls are harder to track as unlike regular transactions invoking our contracts directly (where we are the to destination of the transaction) - their to destination is their contract which is calling ours by reference in the code.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Das Issue nennt die Klasse EthereumTransaction und die subgraph-Call-Handler, aber keine Repository-Dateien oder Tests. Beginne damit nachzuverfolgen, wie Receipts und Call-Handler verarbeitet werden, und ermittle dann, wie fehlgeschlagene Transaktionen dargestellt und weitergeleitet werden sollten. Erledigt ist die Aufgabe, wenn fehlgeschlagene Calls Handler auslösen und Status, Fehlertyp sowie einen möglichen Revert-Grund bereitstellen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- blockchain, graphql, rust
- Bereich
- backend-api-design, blockchain
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100