[Bug] blockHashFromNumber returns null with no log when the node doesn't have the network (e.g. query nodes)

Đang mở
#6,721 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
graphql, rust

Hướng nghiên cứu

Bắt đầu tại IndexNodeResolver::block_ptr_for_number và lần theo đường đi không có mạng qua Networks::noop() và from_config_inner. So sánh hành vi của nó với resolve_cached_ethereum_calls, sau đó tái hiện truy vấn blockHashFromNumber trên một node chỉ truy vấn hoặc thuộc mạng không xác định. Hoàn tất khi mạng bị thiếu được báo cáo rõ ràng cùng với mạng và ID của node, đồng thời việc khởi động ở chế độ query-only được xác định trong log.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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) } returns null with query_time_ms: 0 and 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

Ngôn ngữ chính
Rust
Star
3.2k
Fork
1.1k
Merge trung bình
4 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của graphprotocol/graph-node

Tất cả issue của graphprotocol/graph-node

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.