get_namespace_proof

Function get_namespace_proof 

Source
async fn get_namespace_proof<S>(
    block: &BlockQueryData<SeqTypes>,
    common: &VidCommonQueryData<SeqTypes>,
    ns_id: NamespaceId,
    state: &S,
) -> Result<Option<NsProof>, Error>
where S: ReadState, S::State: NodeDataSource<SeqTypes> + RequestResponseDataSource<SeqTypes> + Sync,
Expand description

Get a namespace proof for the given block, if possible.

Always returns the newest supported proof type, which supports the greatest number of possible cases (e.g. proofs can still be generated even if the block was maliciously encoded). For backwards compatibility, the resulting proof can be downgraded. However, this may fail in case a proof was only able to be generated by making use of one of the newer proof types.

Returns no proof (Ok(None)) if the requested namespace is not present at all in the given block.