privacy-scaling-explorations / zk-kit.solidity

A monorepo of reusable contracts for zero-knowledge technologies.
MIT License
10 stars 3 forks source link

init function in IMT trees can be called multiple times #42

Open 0xDatapunk opened 4 weeks ago

0xDatapunk commented 4 weeks ago

https://github.com/privacy-scaling-explorations/zk-kit.solidity/blob/a4e7136d6771456d0118729f3f5fe3dc9f7a4148/packages/imt/contracts/QuinaryIMT.sol#L9 https://github.com/privacy-scaling-explorations/zk-kit.solidity/blob/a4e7136d6771456d0118729f3f5fe3dc9f7a4148/packages/imt/contracts/BinaryIMT.sol#L13 https://github.com/privacy-scaling-explorations/zk-kit.solidity/blob/a4e7136d6771456d0118729f3f5fe3dc9f7a4148/packages/lazy-imt/contracts/LazyIMT.sol#L9

Should we put in place a mechanism to always call init once and only once?

cedoor commented 1 week ago

Yes, makes sense!

eshumanohare commented 1 week ago

hello @cedoor @0xDatapunk , can I take this issue if no-one is assigned to it yet?

cedoor commented 1 week ago

Hi, @eshumanohare yes of course 👍🏽