Implement getSlice API #206

Merged
prathamesh0 merged 21 commits from pm-get-slice into v4 2022-12-19 08:42:23 +00:00
prathamesh0 commented 2022-12-13 09:43:18 +00:00 (Migrated from github.com)

Part of https://github.com/cerc-io/ipld-eth-server/issues/4

  • Ported changes from previous WIP branch
  • Populated response.Leaves with required accounts data
  • Added unit tests
  • Use iterator based approach to get data for subtrie nodes
  • Use state trie to get stem and head nodes directly using paths
Part of https://github.com/cerc-io/ipld-eth-server/issues/4 - Ported changes from previous WIP [branch](https://github.com/vulcanize/ipld-eth-indexer/commits/actual_getSlice) - Populated `response.Leaves` with required accounts data - Added unit tests - Use iterator based approach to get data for subtrie nodes - Use state trie to get stem and head nodes directly using paths
prathamesh0 commented 2022-12-19 08:21:20 +00:00 (Migrated from github.com)

Current performance across different head path lengths and depths:

  • State trie (request and responses)

    Path Depth Time taken (s)
    070804090303 1 1.5
    050f03080e07 2 2.425
    0b020a080a0e 3 2.227
    000c02080a 3 17.026
    0b0a0d0e0e 2 7.544
    000c0c0c 3 >30
    06070e08 2 >30
    0f0007 2 >30
  • Storage trie (request and responses)

    Path Depth Time taken (s)
    040d01 3 0.825
    00060d 3 2.986
    0308 3 0.802
    00 3 3.953
  • The execution time goes on increasing as path length decreases; the subtrie becomes wider and its iteration takes more time.

Current performance across different head path lengths and depths: - State trie ([request and responses](https://gist.github.com/prathamesh0/61593dfde80b13c2b0206000a0dd5b29#state-trie)) | Path | Depth | Time taken (s) | | ------------- | -----: | ---------------: | | `070804090303` | 1 | 1.5 | | `050f03080e07` | 2 | 2.425 | | `0b020a080a0e` | 3 | 2.227 | | `000c02080a` | 3 | 17.026 | | `0b0a0d0e0e` | 2 | 7.544 | | `000c0c0c` | 3 | >30 | | `06070e08` | 2 | >30 | | `0f0007` | 2 | >30 | - Storage trie ([request and responses](https://gist.github.com/prathamesh0/61593dfde80b13c2b0206000a0dd5b29#storage-trie)) | Path | Depth | Time taken (s) | | ------------- | -----: | ---------------: | | `040d01` | 3 | 0.825 | | `00060d` | 3 | 2.986 | | `0308` | 3 | 0.802 | | `00` | 3 | 3.953 | - The execution time goes on increasing as path length decreases; the subtrie becomes wider and its iteration takes more time.
Sign in to join this conversation.
No reviewers
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/ipld-eth-server#206
No description provided.