Non-membership proofs #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make it easier to build non-membership proofs.
On-chain: this is relatively straightforward, as it suffices to verify a proof in exclusion mode.
Off-chain: the difficulty lies therefore off-chain; where we must obtain such a proof. Yet, the library only provides way to build proofs for inserted elements and we don't want to needlessly insert / remove something in the database without proper isolation (what if there's a crash between the insert/remove?).
The strategy remains however that: insert an element, building a proof, remove the element. But all that done atomically and without the hassle of providing a
value
. This creates a proof that can only be used in exclusion and allows to check for non-membership.TODO: