-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: refactor, generics, bugfixes, and other nits #23
Conversation
Thanks @signorecello ! Looks like the style check is not passing |
Ok ended up with a big refactor to make the MTs generic. This is pretty cool (also shows the mighty power of Noir) because it allows all kinds of MTs, for example those with BigNums as leaves. Still encountering some weird errors, so WIP for now |
Damn it's 1am and I swear I'll never implement a merkle tree again (you know I'm lying). BUT I'm done with the refactor, needs a test tho (eating my own dogfood) |
Trying to make the MT implementation similar to the sparse merkle one, figured I got the whole
add
anddelete
logic totally wrong... This fixes it.Totally refactored the lib to go along with it lol. It now accepts generics so you can use it with any type as long as they implement Default and Eq.
Added some tests with BigNums, as that will most likely be the biggest use-case outside of integers and Fields.