[Feature] info.subgraph_sizes in sharded namespace view
まだ誰も着手していません。
評価
調査の方向性
まず、シャーディングされた名前空間ビューがどのように定義され、info.subgraph_sizes がどのように設定されるかを、issue の SQL クエリを想定される形として使用して追跡します。利用可能なシャーディング済みビューの列とサイズデータを比較し、要求されたサブグラフサイズフィールドがシャーディングされた名前空間ビューを通じてクエリ可能であることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description
Firstly thank you for the new sharded namespace, we are implementing new grafana dashboards using the views. We have a general health dashboard that we have adapted to work with the sharded namespace views (added to end of this post).
The query works apart from the subgraph size field. I believe this is in the info schema in each subgraph shard.
Would it be possible to bring this data into the new sharded namespace views to complete this overview of subgraph health?
SELECT DISTINCT ON (sd.deployment)
ds.name as deployment_schema,
ds.shard as deployment_shard,
ds.created_at as deployment_created_at,
sg.name as deployment_name,
sd.deployment,
substring(sm.repository, 20, 31) as git_repo,
sda.node_id,
sd.health as sub_health,
sd.failed as sub_failed,
sd.synced_at as sub_synced_at,
sd.latest_ethereum_block_number as last_block,
sd.entity_count as sub_entity,
size.total_bytes as size_total,
size.total_bytes as size_total_bytes,
sm.start_block_number as start_block,
encode(sm.start_block_hash, 'hex') as start_hash,
encode(sd.latest_ethereum_block_hash, 'hex') as last_hash,
sd.reorg_count,
sd.current_reorg_depth as curr_reorg_count,
sd.max_reorg_depth as max_reorg,
ds.network,
(network.head_block_number - sd.latest_ethereum_block_number) AS blocks_behind_network,
CASE
WHEN network.name = 'mainnet' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 5)::text
WHEN network.name = 'rinkeby' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 4)::text
WHEN network.name = 'kovan' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 15)::text
WHEN network.name = 'poa-core' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 12)::text
WHEN network.name = 'ropsten' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 2)::text
WHEN network.name = 'arbitrum-one' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 230)::text
WHEN network.name = 'arbitrum-sepolia' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 230)::text
WHEN network.name = 'matic' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'base' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'optimism' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'avalanche' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'fantom' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 40)::text
WHEN network.name = 'celo' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 12)::text
WHEN network.name = 'gnosis' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 12)::text
WHEN network.name = 'bsc' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 20)::text
WHEN network.name = 'linea' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'scroll' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 20)::text
WHEN network.name = 'boba' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 30)::text
WHEN network.name = 'boba-bnb' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 5)::text
WHEN network.name = 'moonbeam' THEN ((network.head_block_number - sd.latest_ethereum_block_number) / 10)::text
ELSE 'N/A'
END AS lag
FROM sharded.subgraph_deployment AS sd
JOIN sharded.subgraph_manifest AS sm ON sm.id = sd.id
JOIN deployment_schemas AS ds ON ds.subgraph = sd.deployment
JOIN sharded.subgraph_version AS sv ON sv.deployment = sd.deployment
JOIN sharded.subgraph AS sg ON sv.id = sg.current_version -- use only current version to dedupe
LEFT JOIN sharded.subgraph_deployment_assignment AS sda ON sda.id = sd.id
LEFT JOIN info.subgraph_sizes AS size ON ds.name = size.name
JOIN sharded.ethereum_networks AS network ON network.name = ds.network
ORDER BY sd.deployment;```
### Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
_No response_
### Some information to help us out
- [ ] Tick this box if you plan on implementing this feature yourself.
- [x] I have searched the issue tracker to make sure this issue is not a duplicate.
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 1.1k
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- 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日 初心者へのやさしさ 68/100
graphprotocol/graph-node#6721 ·
graphprotocol/graph-node の issue をすべて見る
似ている issue
-
bug CLI custom-model
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100