graphprotocol / graphprotocol/graph-node
Add support for failed transactions
Personne n'a encore pris cette issue.
- Langage dominant
- Rust
- Étoiles
- 3.2k
- Forks
- 1.1k
- Merge moyen
- 4 j 1 h
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
L’issue mentionne la classe EthereumTransaction et les gestionnaires d’appels de subgraph, mais aucun fichier du dépôt ni test. Commencez par suivre le traitement des receipts et des gestionnaires d’appels, puis déterminez comment les transactions échouées doivent être représentées et distribuées. Le travail est terminé lorsque les appels échoués déclenchent les gestionnaires et exposent le statut, le type d’erreur et toute raison de revert.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- blockchain, graphql, rust
- Domaine
- backend-api-design, blockchain
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100