pub struct OcsInclusionProof {
pub merkle_proof: MerkleProof,
pub leaf_index: u64,
pub tree_root: Digest,
}Available on crate feature
unstable only.Expand description
An OCS inclusion proof.
Proves that a specific ObjectReference appears at leaf_index in
the modified-objects Merkle tree whose root is tree_root, and that
tree_root is committed to by a CheckpointSummary’s
CheckpointArtifacts commitment.
Fields§
§merkle_proof: MerkleProofThe Merkle inclusion proof for the leaf.
leaf_index: u64The position of the leaf in the modified-objects tree.
tree_root: DigestThe 32-byte Merkle root of the modified-objects tree.
Implementations§
Source§impl OcsInclusionProof
impl OcsInclusionProof
Sourcepub fn verify(
&self,
summary: &CheckpointSummary,
object_ref: &ObjectReference,
) -> Result<(), ProofError>
pub fn verify( &self, summary: &CheckpointSummary, object_ref: &ObjectReference, ) -> Result<(), ProofError>
Verify that object_ref was written in the checkpoint described by
summary.
The caller is responsible for ensuring that summary itself is
trusted (i.e. its BLS aggregate signature has been verified against
the epoch’s validator committee). This method only checks that the
proof and the summary are consistent.
Trait Implementations§
Source§impl Clone for OcsInclusionProof
impl Clone for OcsInclusionProof
Source§fn clone(&self) -> OcsInclusionProof
fn clone(&self) -> OcsInclusionProof
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OcsInclusionProof
impl Debug for OcsInclusionProof
Source§impl PartialEq for OcsInclusionProof
impl PartialEq for OcsInclusionProof
impl Eq for OcsInclusionProof
impl StructuralPartialEq for OcsInclusionProof
Auto Trait Implementations§
impl Freeze for OcsInclusionProof
impl RefUnwindSafe for OcsInclusionProof
impl Send for OcsInclusionProof
impl Sync for OcsInclusionProof
impl Unpin for OcsInclusionProof
impl UnsafeUnpin for OcsInclusionProof
impl UnwindSafe for OcsInclusionProof
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>,
Casts
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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