Why Nostr? What is Njump?
2025-03-26 14:50:31

Nuh on Nostr: Merkle Treap is my favorite data structure, it is a mutable sortable merkle tree. ...

Merkle Treap is my favorite data structure, it is a mutable sortable merkle tree.

Sortable means you get perfect locality of pointers, instead of the randomisation of hash maps.

Mutable meaning you can add or remove elements while changing Only the nodes on the path from the changed element to the root.

Every update happens from the top bottom, as opposed to bottom up as usual in Merkle trees like the one used in Git.

It is just a joy.

The only downside is if you are using it for set reconciliation with multiple writers, a bad writer can mine keys such that the treap degenerates into a linked list.

So for set reconciliation from multiple untrusted writers, you should use RBSR like Negentropy.
Author Public Key
npub1jvxvaufrwtwj79s90n79fuxmm9pntk94rd8zwderdvqv4dcclnvs9s7yqz