Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching and blockstore read tests to Hamt #719

Closed
austinabell opened this issue Sep 24, 2020 · 0 comments · Fixed by #730
Closed

Add caching and blockstore read tests to Hamt #719

austinabell opened this issue Sep 24, 2020 · 0 comments · Fixed by #730
Assignees
Labels
Priority: 3 - Medium Nice-to-have, does not impede core functionality

Comments

@austinabell
Copy link
Contributor

austinabell commented Sep 24, 2020

Issue summary

Equivalent of changes done in #716, a cache for link nodes needs to be added to avoid unnecessary blockstore reads, and along with this change expand the serialization tests to also check the blockstore read and write status with the tracking blockstore added in that PR. Reason this is necessary is because the VM charges gas for every read as well as number of bytes written and number of writes to the blockstore. Without the cache, it will be a mismatch.

With this change, the interface can be changed to return a reference to the element on gets, so try to match the HashMap interface. Only difference really is just that the get value is owned (because it currently needs to be) but would be more efficient if this were not the case.

Also verify cases like: filecoin-project/go-hamt-ipld#65 as I don't think we reorder on child clean (but not sure if we would run into this bug).

Also with this, try to port over as many tests from the go implementation to verify compatibility, for example filecoin-project/go-hamt-ipld#59 added some tests, and although they are very go dependant, there may be a way to verify against.

I might end up taking this, but if someone else does, ping me and I can give more info or a plan to get this done.

Other information and links

@austinabell austinabell added Priority: 3 - Medium Nice-to-have, does not impede core functionality IPLD labels Sep 24, 2020
@austinabell austinabell self-assigned this Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 3 - Medium Nice-to-have, does not impede core functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant