gballet / multiproof-rs

A rust implementation of Alexey Akhunov's multiproof algorithm
Apache License 2.0
32 stars 8 forks source link

Proving keys not in the trie #28

Closed s1na closed 4 years ago

s1na commented 5 years ago

Currently if a given key has not been inserted in the trie, the proof generator throws, which makes sense for most use-cases. But there are use-cases for proving the absence of a node. A simple one would be in the context of a token transfer EE when no node has been added for the recipient. If there's no proof, EE can't be certain the recipient has no account, and additionally to add the account it needs the path to the root for that key.

Maybe we could just relax the keyvals in the proof to also include nulls.