[Bug] `net_version` change error when switching from `RPC` provider to a Firehose provider

Đang mở
#4,582 5 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
postgresql, rust
Lĩnh vực
backend, blockchain, databases

Hướng nghiên cứu

Bắt đầu với logic BlockStore so sánh net_version đã lưu khi chain provider được thay đổi, sử dụng hai ví dụ cấu hình để tái hiện lỗi. Xác định xem việc chuyển đổi provider có nên giữ nguyên danh tính mạng hiện có hay báo cảnh báo, sau đó xác minh hành vi thu được dựa trên các kiểm tra cấu hình chain hiện có.

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

Mô tả

bug Stale
Bug report

Steps:

  1. Fresh graph-node start from fresh database with config below. This creates a chain for mainnet with net_version: 1 in the database.

    [general]
    
    [store]
    [store.primary]
    connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
    weight = 1
    pool_size = 10
    
    [chains]
    ingestor = "block_ingestor_node"
    [chains.mainnet]
    shard = "primary"
    protocol = "ethereum"
    provider = [
      { label = "peering", url = "$RPC_NODE", features = [ "archive", "traces" ] },
    ]
    
    [deployment]
    [[deployment.rule]]
    shard = "primary"
    indexers = [ "default" ]
    
  2. Stop graph-node instance.

  3. Start it back with a Firehose only provider

    [general]
    
    [store]
    [store.primary]
    connection = "postgresql://graph-node:let-me-in@localhost:5432/graph-node"
    weight = 1
    pool_size = 10
    
    [chains]
    ingestor = "block_ingestor_node"
    [chains.mainnet]
    shard = "primary"
    protocol = "ethereum"
    provider = [
      { label = "firehose", details = { type = "firehose", url = "$FIREHOSE_ENDPOINT", token = "$STREAMING_FAST_API_TOKEN", features = [ "compression", "filters" ] }},
    ]
    
    [deployment]
    [[deployment.rule]]
    shard = "primary"
    indexers = [ "default" ]
    

Yields error message Apr 27 16:03:14.931 ERRO the net version for chain mainnet has changed from 1 to 0 since the last time we ran, component: BlockStore.

Weirdly, the network seems to still be configured correctly, so maybe it's more a warning or maybe we should just ignore net_version and keep only genesis_hash check.

Relevant log output

No response

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.