Skip to main content

get_leaf_proof_with_cert2

Function get_leaf_proof_with_cert2 

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

Build a leaf proof for the new protocol using certificate2 finality.

Certificate2 directly commits the leaf at cert2.data.block_number. The indirect commit rule then commits all of that leaf’s uncommitted ancestors. If cert2 directly commits the requested leaf, the proof contains only that leaf plus cert2. Otherwise, the proof includes the chain from the requested leaf through the directly committed descendant; the verifier checks parent commitments to prove the requested leaf is on that finalized chain.