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 1 month ago

0xDatapunk commented 1 month 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 4 weeks ago

Yes, makes sense!

eshumanohare commented 3 weeks ago

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

cedoor commented 3 weeks ago

Hi, @eshumanohare yes of course 👍🏽