graphprotocol / graphprotocol/graph-node

Add support for failed transactions

オープン
#1,055 コメント 5 件 リアクション 12 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

chains/ethereum enhancement projects/synthetix
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue では EthereumTransaction クラスと subgraph の call handler が挙げられていますが、リポジトリのファイルやテストは示されていません。まず receipts と call handler がどのように処理されるかを追跡し、その後、失敗したトランザクションをどのように表現してディスパッチすべきかを判断してください。失敗した call が handler をトリガーし、status、error type、および存在する場合は revert reason を公開すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
blockchain, graphql, rust
領域
backend-api-design, blockchain
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。