Module client_side_validation::lnpbp4
source · [−]Expand description
Multi-message commitments: implementation of LNPBP-4 standard.
LNPBP-4 defines a commit-verify scheme for committing to a multiple messages under distinct protocols with ability to partially reveal set of the commitments and still be able to prove the commitment for each message without exposing the exact number of other messages and their respective protocol identifiers.
LBPBP-4 commitments are originally constructed from MultiSource data
structure in form of full LNPBP-4 merkle trees MerkleTree using
[MerkleTree::try_commit] method. Full trees preserve all the information
from the MultiSource, plus keep information on generated entropy and
the actual size of the created tree.
MerkleTree can than be either converted into MerkleBlock and than
a separate instances of MerkleProofs can be extracted from it for each
specific protocol using MerkleBlock::conceal_except operation.
MerkleBlock can conceal sme data and can also be constructed from
(multiple) MerkleProof and/or other MerkleBlock.
Summary of the operations with LNPBP-4 data structures:
- [
MerkleTree::try_commit]:MultiSource->MerkleTree MerkleBlock::from:MerkleTree->SelfMerkleBlock::into_merkle_proof:Self,ProtocolId->MerkleProofMerkleBlock::with:MerkleProof,ProtocolId,Message->SelfMerkleBlock::merge_reveal:Self,MerkleProof->Self
Structs
Final LNPBP-4 commitment value.
commitment under protocol id {0} is absent from the known part of a given LNPBP-4 Merkle block.
Tag used for CommitmentHash hash type
Partially-concealed merkle tree data.
A proof of the merkle commitment.
Complete information about LNPBP-4 merkle tree.
Iterator over messages in MerkleTree and MerkleBlock.
Structured source multi-message data for commitment creation
attempt to merge unrelated LNPBP-4 proof.
Enums
Errors generated during multi-message commitment process by
[MerkleTree::try_commit]
Constants
Maximal depth of LNPBP-4 commitment tree.
Traits
Marker trait for variates of LNPBP-4 commitment proofs, which differ by the amount of concealed information.
Type Definitions
Original message participating in multi-message commitment.
Map from protocol ids to commitment messages.
Source data for creation of multi-message commitments according to LNPBP-4 procedure.