graphprotocol / graphprotocol/graph-node

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

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

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

bug Stale
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

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

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

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

はじめの一歩

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

調査の方向性

chain/ethereum/src/codec.rs の367行目付近から始め、そこにある call filtering と chain/ethereum/proto/ethereum.proto の358-379行目にある state_reverted の定義を比較してください。リンクされている issue #3701 と PR #3762 の履歴を確認し、意図された firehose の動作を理解してください。state_reverted=true の calls が成功した calls として処理されなくなり、報告された transaction shape に対するカバレッジがあることが完了条件です。

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

評価

技術スタック
rust
領域
blockchain
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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