[Bug] blockHashFromNumber returns null with no log when the node doesn't have the network (e.g. query nodes)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- graphql, rust
調査の方向性
IndexNodeResolver::block_ptr_for_number から開始し、Networks::noop() と from_config_inner を通るネットワークなしのパスを追跡します。その動作を resolve_cached_ethereum_calls と比較し、その後、クエリ専用または未知のネットワークのノードで blockHashFromNumber クエリを再現します。完了条件は、不足しているネットワークがネットワークとノード ID とともに明確に報告され、query-only の起動がログで特定できることです。
索引モデルが issue の本文から書いたものです。
説明
Bug report
IndexNodeResolver::block_ptr_for_number returns Ok(None) without logging when the network isn't in the node's BlockchainMap. blockHashFromNumber on a node without that network is therefore an instant null, and from outside that looks the same as "block not found".
The common case is a query node. A node whose id matches [general] query gets Networks::noop() in from_config_inner, so it has no chains at all. It still serves the index-node API on 8030 and answers version, and nothing at startup says it came up query-only.
indexer-agent pointed at that node reports IE070 no data returned, and people go chasing the RPC and the EBO subgraph. It's the same unanswered question as #4880.
resolve_cached_ethereum_calls already logs Failed to fetch cached Ethereum calls; nonexistent network for the same situation, so blockHashFromNumber is the odd one out.
Repro on v0.45.0:
[general] query = "index_node_0"with--node-id index_node_0, then{ blockHashFromNumber(network: "mainnet", blockNumber: 25961537) }returnsnullwithquery_time_ms: 0and no WARN- same result on a normal index node with
network: "nosuchchain"
Suggestion: a WARN (or a GraphQL error) naming the network and this node's id when the network isn't configured here, and an INFO at startup when a node comes up query-only. Same idea as #6718 for the ingestor.
Relevant log output
INFO Query timing (GraphQL), block: 0, query_time_ms: 0, variables: null, query: { version { version } blockHashFromNumber(network: "mainnet", blockNumber: 25961537) } , subgraph_id: indexnode, component: IndexNodeServer
IPFS hash
No response
Subgraph name or link to explorer
No response
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
macOS
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 1.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphprotocol/graph-node のほかの issue
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole responseオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
graphprotocol/graph-node#6719 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
graphprotocol/graph-node#6673 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
graphprotocol/graph-node#6650 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
graphprotocol/graph-node#6722 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
graphprotocol/graph-node#6720 ·
graphprotocol/graph-node の issue をすべて見る
似ている issue
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
stackabletech/kafka-operator#1033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
farion1231/cc-switch#7744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
datafusion
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/iceberg-rust#3297 ·
メンテナーはふだん 1 日以内に返信