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

Remove positions map from the tree structure #24

Open
ureeves opened this issue Apr 26, 2023 · 0 comments
Open

Remove positions map from the tree structure #24

ureeves opened this issue Apr 26, 2023 · 0 comments
Assignees
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@ureeves
Copy link
Member

ureeves commented Apr 26, 2023

Summary

Given the fact that we can arbitrarily walk the tree, it shouldn't be necessary to include existing positions since we could use a walker to determine both how many positions in the tree are filled (Tree::len()), as well which positions are filled (Tree::contains).

Relevant Context

Merkle trees sometimes carry information about the pre-image of their leaves (data blocks). Since a decision was made to have this tree not contain this, and the position field feels like much the same information, it should also be removed.

Possible Solution (optional)

Use a pre-defined walk to iterate through all leaves by counting them.

@ureeves ureeves added team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) labels Apr 26, 2023
@ureeves ureeves self-assigned this Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

No branches or pull requests

1 participant