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
Make iavl.Tree unexported #87
Comments
This would break my usage, see where we need access to the tree to store a read tree: https://github.com/hyperledger/burrow/blob/develop/execution/state.go#L202-L218 Also I think IAVL could do with more not fewer things exported. It is a low-level building block and there are various things I have not be able to do because the policy around exporting is in my opinion overly conservative. For example, the nodedb. The I think a small amount of additional documentation is sufficient to clear up any confusion. |
I think we probably need to package up the different pieces ala #62 and expose solid APIs from each package |
@silasdavis So it seems to me like the most straightforward solution here would be to build a well structured way to get immutable snapshots of the tree at specific stored versions, in such a way that they can be loaded on demand and not leak memory. Then we would make I agree on the motivation of wanting to simplify the exposed API, and also can see the downside of doing that in situations where the exposed API is not enough for a particular use case. My view of the current intended API is that |
@jlandrews immutable snapshots would satisfy my current use case yes, but still I do agree with you on:
Having |
I think this is resolved. |
Agreed |
The
VersionedTree
should be sufficient for people to work with. We currently use theTree
only in the cosmos-sdk iavlstore. It would be nice if we could change this there. It would further simplify the exposed API.There are some test-cases showing even our devs are confused by how to use the tree vs. the versioned tree: #50
cc @jlandrews
also related #62
The text was updated successfully, but these errors were encountered: