graphprotocol / graphprotocol/graph-node
Allow File Data Sources to update an entity
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 1.1k
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 1
説明
Currently, different File Data Sources can create multiple entities with the same ID.
File Data Sources should instead be able to update an entity with the same ID. Note that this will not be an upsert, which is the current pattern that is used for chain-based data sources. Instead this should completely overwrite the prior entity.
Situation:
file data source A created in block 1
A is found, saves entity X
file data source B created in block 5
file data source C created in block 10
C is found, saves entity X again <-- this is the most recent
B is found, saves entity X again
Entity updates should apply a "most recent wins" approach, where the time is determined by block time, not handler execution time. This is a new pattern (where entities might be created with closed block ranges), and order will need to be resolved within blocks (as well as between blocks)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイル、テスト、エントリポイントのいずれも指定されていません。まず、ファイルデータソースがエンティティを保存する方法を追跡し、その経路を既存のチェーンベースのupsertパターンと比較します。次に、ブロック時間とブロック内の順序がどのように表現されているかを特定します。完了条件は、繰り返し保存したときに最新のブロック順の値が使用され、upsertせずに以前のエンティティが完全に上書きされることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- blockchain, rust
- 領域
- backend, blockchain
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100