(v5) Processing of internalized "leaf nodes" in the storage tries #165

Closed
opened 2021-12-02 05:48:33 +00:00 by i-norden · 2 comments
Member

In order to create their own eth.storage_cids entry that associates them with a "leaf_key" and links by CID and mh_key to the parent branch node they are internalized within.

Same issue as in https://github.com/vulcanize/issue_tracking/issues/5 but in addition to a post-processing fix we can apply on historical data we need to fix this issue during statediff processing going forward. This will be significantly more involved and requires some additional exploration into how to best handle this. At a high level this will require modifying the trie.Iterator/DifferenceIterator and our statediff.Builder.

Note that the same approach can and should be done to improve our fix for the logTrie, so that the entries in log_cids reference the encapsulating branch node and not just a dangling log IPLD.

In order to create their own eth.storage_cids entry that associates them with a "leaf_key" and links by CID and mh_key to the parent branch node they are internalized within. Same issue as in https://github.com/vulcanize/issue_tracking/issues/5 but in addition to a post-processing fix we can apply on historical data we need to fix this issue during statediff processing going forward. This will be significantly more involved and requires some additional exploration into how to best handle this. At a high level this will require modifying the trie.Iterator/DifferenceIterator and our statediff.Builder. Note that the same approach can and should be done to improve our fix for the logTrie, so that the entries in log_cids reference the encapsulating branch node and not just a dangling log IPLD.
Author
Member
  • We should adjust the iterator to note when it is moving to an internalized leaf node and index it as such
  • We should write the internalized leaf node to public.blocks and index it in eth.storage_cids as if it is not internalized
* We should adjust the iterator to note when it is moving to an internalized leaf node and index it as such * We should write the internalized leaf node to public.blocks and index it in eth.storage_cids as if it is not internalized
Author
Member

Related (this is the proper fix of the underlying issue in) https://github.com/cerc-io/ipld-eth-server/issues/120

Related (this is the proper fix of the underlying issue in) https://github.com/cerc-io/ipld-eth-server/issues/120
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#165
No description provided.