pub struct OcsNonInclusionProof {
pub non_inclusion_proof: MerkleNonInclusionProof<ObjectReference>,
pub tree_root: Digest,
}unstable only.Expand description
An OCS non-inclusion proof.
Proves that no leaf with a given object id appears in the
modified-objects Merkle tree whose root is tree_root — for a tree
built over ObjectReferences in sorted order — and that tree_root
is committed to by a CheckpointSummary’s CheckpointArtifacts
commitment.
Object-id non-inclusion is strictly stronger than reference
non-inclusion: the OCS keys leaves by (object_id, version, digest)
triples, and verifying that one specific triple is absent leaves
open the possibility that a different triple with the same object id
is in the tree. The bracketing check enforces that the left and
right neighbour leaves have object ids that strictly flank the
target id, which combined with the neighbours being at adjacent
indices in the sorted tree proves that no leaf under the target id
can be in the tree.
Fields§
§non_inclusion_proof: MerkleNonInclusionProof<ObjectReference>The Merkle non-inclusion proof, holding inclusion proofs for the bracketing neighbours of the target object id.
tree_root: DigestThe 32-byte Merkle root of the modified-objects tree.
Implementations§
Source§impl OcsNonInclusionProof
impl OcsNonInclusionProof
Sourcepub fn verify(
&self,
summary: &CheckpointSummary,
object_id: &Address,
) -> Result<(), ProofError>
pub fn verify( &self, summary: &CheckpointSummary, object_id: &Address, ) -> Result<(), ProofError>
Verify that no leaf with object_id appears in the OCS Merkle
tree committed to by summary.
As with OcsInclusionProof::verify, the caller is responsible
for ensuring summary itself is trusted.
Stronger than verifying that a single (object_id, version, digest) triple is absent: the bracketing neighbours’ object ids
must strictly flank object_id, which combined with the
neighbours being at adjacent indices in the sorted tree proves
that no leaf with any version or digest under object_id is in
the tree.
Trait Implementations§
Source§impl Clone for OcsNonInclusionProof
impl Clone for OcsNonInclusionProof
Source§fn clone(&self) -> OcsNonInclusionProof
fn clone(&self) -> OcsNonInclusionProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OcsNonInclusionProof
impl Debug for OcsNonInclusionProof
Source§impl PartialEq for OcsNonInclusionProof
impl PartialEq for OcsNonInclusionProof
impl Eq for OcsNonInclusionProof
impl StructuralPartialEq for OcsNonInclusionProof
Auto Trait Implementations§
impl Freeze for OcsNonInclusionProof
impl RefUnwindSafe for OcsNonInclusionProof
impl Send for OcsNonInclusionProof
impl Sync for OcsNonInclusionProof
impl Unpin for OcsNonInclusionProof
impl UnsafeUnpin for OcsNonInclusionProof
impl UnwindSafe for OcsNonInclusionProof
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more