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

Separate out memory-backed tree #3

Merged
merged 24 commits into from
Nov 21, 2024
Merged

Separate out memory-backed tree #3

merged 24 commits into from
Nov 21, 2024

Conversation

rozbb
Copy link
Owner

@rozbb rozbb commented Nov 11, 2024

Pasting changelog below. There are breaking changes. The key items here are the additions.

Additions

  • Added indices_for_inclusion_proof() and indices_for_consistency_proof() methods. These allow the construction of inclusion proofs for trees which do not fit into memory.
  • Relatedly, added InclusionProof::from_digests() and ConsistencyProof::from_digests()

Removals

  • Removed SimpleWriter trait in favor of the pre-existing digest::Update
  • Removed serde trait impls from InclusionProof and ConsistencyProof

Changes

  • Renamed the CtMerkleTree struct to MemoryBackedTree
  • Renamed the CanonicalSerialize trait to HashableLeaf
  • Changed argument to MemoryBackedTree::prove_consistency to be the number of additions, rather than the size of the prefix
  • Made all verification methods panic-free

Copy link

@lukevalenta lukevalenta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few minor nits, but looks great overall!

src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/mem_backed_tree.rs Outdated Show resolved Hide resolved
src/mem_backed_tree.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/mem_backed_tree.rs Outdated Show resolved Hide resolved
src/mem_backed_tree.rs Outdated Show resolved Hide resolved
src/tree_util.rs Show resolved Hide resolved
src/tree_util.rs Outdated Show resolved Hide resolved
@rozbb rozbb merged commit c51e6c3 into main Nov 21, 2024
11 checks passed
@rozbb rozbb deleted the separate-out-mem-backed-tree branch November 21, 2024 23:48
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.

2 participants