Skip to main content

get_leaf_proof

Function get_leaf_proof 

Source
pub(crate) async fn get_leaf_proof<State>(
    state: &State,
    requested_leaf: LeafQueryData<SeqTypes>,
    finalized: Option<usize>,
    fetch_timeout: Duration,
    chain_limit: usize,
) -> Result<LeafProof, Error>
where State: AvailabilityDataSource<SeqTypes> + VersionedDataSource, for<'a> State::ReadOnly<'a>: NodeStorage<SeqTypes>,
Expand description

Construct a proof that the requested leaf is finalized.

The finalized hint is honored when it yields a bounded proof no longer than a direct finality proof, since the client can verify hint-based proofs without signature checks.