privacy-scaling-explorations / zk-kit

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

Use `if` instead of `while` to increment depth in the `LeanIMT.insert` function #219

Closed cedoor closed 8 months ago

cedoor commented 8 months ago

Description

A new insertion can increase a tree's depth by at most 1. We can be sure that the while loop isn't executed twice.

Related Issue(s)

Closes #213

Checklist