Crate asp_non_membership

Crate asp_non_membership 

Source
Expand description

Sparse Merkle Tree implementation

This is a Soroban-compatible port of the Sparse Merkle Tree implementation from:

This implementation uses Poseidon2 hash function for compatibility with the circomlib circuits

§Design Considerations

This is a full on-chain implementation where all tree nodes are stored in contract storage. While not the most cost-efficient approach, it provides:

  • Easy interaction and verification for users
  • Complete on-chain state for non-membership proofs
  • Flexibility to migrate to IPFS-based storage later if needed

For scalability with large blocked key lists, consider the hybrid approach from: https://www.newswise.com/pdf_docs/170903654855378_1-s2.0-S2096720923000519-main.pdf We still present this implementation, as it allows making the decision to switch to IPFS-based storage later if needed.

Structs§

ASPNonMembership
ASPNonMembershipArgs
ASPNonMembershipArgs is a type for building arg lists for functions defined in “ASPNonMembership”.
ASPNonMembershipClient
ASPNonMembershipClient is a client for calling the contract defined in “ASPNonMembership”.
FindResult
Result of a find operation in the sparse Merkle tree

Enums§

Error

Statics§

__SPEC_XDR_EVENT_LEAFDELETEDEVENT
__SPEC_XDR_EVENT_LEAFINSERTEDEVENT
__SPEC_XDR_EVENT_LEAFUPDATEDEVENT
__SPEC_XDR_TYPE_ERROR
__SPEC_XDR_TYPE_FINDRESULT