Skip to content

feat: customizable LeanIMT implementation #62

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

Merged

Conversation

brech1
Copy link
Member

@brech1 brech1 commented Mar 17, 2025

Description

This PR introduces an implementation of the Lean Incremental Merkle Tree:

  • Created a generic HashedLeanIMT struct that supports arbitrary hash functions through a trait
  • Implemented the LeanIMTHasher trait to allow users to provide their own hashing functions
  • Implemented serialization/deserialization for all structs
  • Added support for dynamic dispatch of the hash function

Related Issue(s)

Checklist

  • I have read and understand the contributor guidelines and code of conduct.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run cargo fmt without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@brech1 brech1 requested review from cedoor and sripwoud as code owners March 17, 2025 21:08
@vplasencia vplasencia self-requested a review March 17, 2025 21:57
@brech1 brech1 force-pushed the feat/generic-tree branch from 04026bf to f94ba61 Compare March 18, 2025 18:05
@vplasencia vplasencia requested a review from sinui0 March 18, 2025 18:22
Copy link

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

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

Looks like a good base to start with!

There are some changes and features we will need but let's tackle them incrementally.

@brech1 brech1 force-pushed the feat/generic-tree branch from 331d688 to 3a133a7 Compare April 10, 2025 17:24
Copy link
Member

@vplasencia vplasencia left a comment

Choose a reason for hiding this comment

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

Great work @brech1 🚀

@vplasencia vplasencia merged commit 7dd1aea into privacy-scaling-explorations:main Apr 24, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Apr 24, 2025
vplasencia pushed a commit that referenced this pull request Apr 24, 2025
## 🤖 New release
* `zk-kit-lean-imt`: 0.1.0
* `zk-kit-pmt`: 0.1.0 -> 0.1.1
* `zk-kit-smt`: 0.0.6 -> 0.0.7

<details><summary><i><b>Changelog</b></i></summary><p>

## `zk-kit-lean-imt`
<blockquote>

##
[0.1.0](https://github.com/privacy-scaling-explorations/zk-kit.rust/releases/tag/zk-kit-lean-imt-v0.1.0)
- 2025-04-24

### Added
- customizable `LeanIMT` implementation
([#62](#62))
</blockquote>

## `zk-kit-pmt`
<blockquote>

##
[0.1.1](zk-kit-pmt-v0.1.0...zk-kit-pmt-v0.1.1)
- 2025-04-24

### Other
- update Cargo.lock dependencies
</blockquote>

## `zk-kit-smt`
<blockquote>

##
[0.0.7](zk-kit-smt-v0.0.6...zk-kit-smt-v0.0.7)
- 2025-04-24

### Other
- update Cargo.lock dependencies
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@brech1 brech1 deleted the feat/generic-tree branch April 24, 2025 13:14
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.

lean-imt TLSNotary requirements Create a crate for the LeanIMT
3 participants