Content pfp
Content
@
0 reply
0 recast
2 reactions

EulerLagrange.eth pfp
EulerLagrange.eth
@eulerlagrange.eth
How sparse merkle trees work: Imagine you have a sorted array of integers, and you want to check if 5 is in it. If I prove to you 4 and 6 are right next to each other, then it’s a proof of the same. So a non-inclusion proof is a combination of two inclusion proofs.
2 replies
4 recasts
34 reactions

EulerLagrange.eth pfp
EulerLagrange.eth
@eulerlagrange.eth
SMTs are quick to update 1D analogy: O(N) sorting algo. You want to sort 0-99 that are in random order. Initialize array of size 100 that’s empty. Loop through random array, if you see the number 37, put it in the 36th index in empty array. QED. Works because each value has one location in the target array.
1 reply
0 recast
5 reactions

EulerLagrange.eth pfp
EulerLagrange.eth
@eulerlagrange.eth
https://warpcast.com/eulerlagrange.eth/0xdc0f33ba
1 reply
0 recast
0 reaction

Samuel ツ pfp
Samuel ツ
@samuellhuber.eth
love it. In university they were all about in memory search being O(n)*log(n) at best and O(n^2) at worst. but if you have the memory (in theory, with sparse it doesn't even need to be there fully) you can do naive O(n) haha dind't even think of it. thanks for sharing
0 reply
0 recast
1 reaction