Skip to main content

Crate bench_fri_fold_tree

Crate bench_fri_fold_tree 

Source
Expand description

FRI fold-tree walk benchmark — mirrors p3_fri::verify’s hot loop.

Builds a synthetic flat merkle-tree buffer (deterministic content; we don’t bother computing real internal-node hashes since the bench measures access patterns + per-step ops, not commitment correctness). For each of NUM_QUERIES queries:

  • Pick a random leaf index from the transcript.
  • Walk the tree from leaf to root, TRACE_LOG levels.
  • At each level: read scattered sibling, Poseidon2-mix, Goldilocks-fold.

Complements mini-verifier: that workload hashes the same 8-cell state buffer repeatedly (cache-warm). FRI walks scattered indices in a flat 64 KiB tree buffer — exposes cache + allocator pressure that the composite verifier didn’t isolate.

Functions§

fri_fold_tree_bench