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

WIP: add SparseMerklePath #389

Draft
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

Qyriad
Copy link
Contributor

@Qyriad Qyriad commented Feb 27, 2025

Describe your changes

This implements a Merkle path representation which compacts empty nodes into a bitmask to save memory, currently as as u64 — do we need to worry about cases with more than 64 empty nodes in a path?

I used the representation suggested by #215 (comment), but without the depth field, as to my understanding it can be calculated as the sum of stored nodes and set bits in the bitmask.

I want to confirm this is the desired approach, so I haven't yet implemented most of the helper and conversion methods and traits.

Closes #215.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant