Skip to main content

ProofService

Trait ProofService 

Source
pub trait ProofService:
    Send
    + Sync
    + 'static {
    // Provided method
    fn get_checkpoint_object_proof<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetCheckpointObjectProofRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetCheckpointObjectProofResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Available on crate feature unstable only.
Expand description

Generated trait containing gRPC methods that should be implemented for use with ProofServiceServer.

Provided Methods§

Source

fn get_checkpoint_object_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetCheckpointObjectProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetCheckpointObjectProofResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a cryptographic proof attesting to what (if anything) a specific checkpoint did to a specific object id.

If the object id appears in the checkpoint’s set of modified objects (the OCS Merkle tree’s leaves), the response carries an OcsInclusionProof and – when the modification left the object live – the BCS-encoded object data. If the object id does not appear in the modified set, the response carries an OcsNonInclusionProof.

IMPORTANT: a non-inclusion proof attests only that this checkpoint did NOT modify the requested object id. It does NOT attest that the object doesn’t exist on chain: an object that was last modified in some earlier checkpoint and remained unchanged here will produce a non-inclusion proof. Clients that need the object’s state at this checkpoint when it wasn’t modified here must use a separate query (e.g. ratchet back to the most recent modification).

Implementors§