verify_batch_order

Function verify_batch_order 

Source
pub fn verify_batch_order(
    slots: &[usize],
    ks: &[usize],
    canonical: bool,
) -> (Vec<usize>, Vec<usize>)
Expand description

2026-09-25: Orders one verify batch and assigns its depths; the entry point of mtp_dcut::plan, which truncates each sequence’s drafts to the depth assigned here.

Returns (order, depths): order is verify_batch_permutation and depths[p] is the row count position p verifies.

  • canonical = true: the depth multiset is sorted descending onto the ordered batch, so depths[p] need not be ks[order[p]]. Slots are non-decreasing in p and depths non-increasing.
  • canonical = false: each member keeps its own depth.

Stages that only need the dispatch order use verify_batch_permutation, which leaves every member’s depth attached to it.