graphprotocol / graphprotocol/graph-node
Make ChainStore agnostic to block serialization format
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
PR #2886 and #2998 still leave some assumptions about how blocks are serialized and deserialized in the ChainStore. In particular, they assume that the serialization follows the form of an EthereumBlock. That can cause issues for other chains if they store blocks with a different serialization format and try to read them, assuming they get their own serialization back.
A more robust fix would parametrize ChainStore.blocks and ChainStore,ancestor_block (the only methods that read the serialized data from the chain store and now return a json::Value) so that the caller passes in instructions on how to deserialize instead of leaving it up to the store. That is not entirely trivial because
- the current code does not read transaction receipts in
ChainStore.blockswhich helps reduce the data that needs to be deserialized. ChainStoreneeds to be object safe, soblocksandancestor_blockcan't be parametrized on some sort ofFromChainStoreDatatrait
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Überprüfung von ChainStore.blocks und ChainStore.ancestor_block sowie der in den PRs #2886 und #2998 identifizierten Annahmen. Verfolge, wie diese Methoden serialisierte Blöcke deserialisieren und wie die Objektsicherheit die API einschränkt. Als erledigt gilt die Änderung, wenn Aufrufer Deserialisierungsanweisungen bereitstellen, die Verarbeitung von Transaktionsquittungen angemessen bleibt und Blockformate außerhalb von Ethereum in ihrer eigenen Serialisierung wieder eingelesen werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- blockchain
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100