jarry-xiao / candyland

Proof of concept program for compressing NFTs
GNU Affero General Public License v3.0
111 stars 13 forks source link

Add variable length proofs #30

Closed ngundotra closed 2 years ago

ngundotra commented 2 years ago

For a depth 20 tree, we don't need to submit a length 20 proof (20 extra public keys !!!)

Since the on-chain tree knows its own height (thanks to the rightmost_proof), we only need to submit proofs for the height of the subtree. So if tree is height 1, we need 1 key (the sibling)... same logic applies upwards.

This should make interfacing with the tree a little bit faster when its smaller, since easier to serialize & spam

ngundotra commented 2 years ago

how do I clean up this git history please just shoot me

ngundotra commented 2 years ago

I think I cleaned up the git history!