Skip to content

Non-membership proofs #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 12, 2025
Merged

Non-membership proofs #13

merged 10 commits into from
Jul 12, 2025

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Jul 9, 2025

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:

  • Update README's doc
  • On-chain helpers for non-membership
  • Some additional proptest to ensure soundness of the approach

KtorZ added 4 commits July 9, 2025 15:35
  Passing larger-than-necessary indices to do_fork and do_branch function is confusing; and it makes more sense to increment the cursor by one when recursing; rather than just manipulating an off-by-one next_cursor constantly.
@KtorZ KtorZ force-pushed the non-membership-proofs branch from be0f312 to 549c0e7 Compare July 9, 2025 21:50
@KtorZ KtorZ merged commit b5a05aa into main Jul 12, 2025
2 of 3 checks passed
@KtorZ KtorZ deleted the non-membership-proofs branch July 12, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant