privacy-scaling-explorations / zk-kit

A monorepo of reusable libraries for zero-knowledge technologies.
https://zkkit.pse.dev
MIT License
290 stars 76 forks source link

Implemented `updateMany` method as required in issue #117 #314

Closed ChinoCribioli closed 2 months ago

ChinoCribioli commented 2 months ago

Description

This PR contains an implementation of a method that enables the user to update many leaves of the tree at once, with the restriction of those leaves being already in the tree. That is, the method doesn't insert new elements in the tree and throws an error when trying this.

Additionally, I included a test suite that checks the method behaves as expected and a short description of the method in its declaration.

Related Issue(s)

Closes #117

Other information

The proof of why the new method implementation doesn't improve worst-case time complexity compared with the naive approach is not trivial, and I didn't include it in the method description because it would take several lines. But I can write it down to include it in the LeanIMT paper if desired.

Checklist

cedoor commented 2 months ago

@ChinoCribioli thanks for this PR šŸ‘šŸ½

The proof of why the new method implementation doesn't improve worst-case time complexity compared with the naive approach is not trivial, and I didn't include it in the method description because it would take several lines. But I can write it down to include it in the LeanIMT paper if desired.

I think it makes sense to add this info to the function. No worries if it needs several lines.

gitpoap-bot[bot] commented 2 months ago

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2024 ZK-KIT Contributor:

GitPOAP: 2024 ZK-KIT Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.