//! Universal STARK proof estimation and claim structure.
//!
//! These formulas apply to all FRI-based STARK provers regardless of
//! target VM or field. Warriors call these functions for cost reporting
//! and proof parameter computation.
// โโโ Claim โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/// Universal proof claim: what any STARK/SNARK proof asserts.
///
/// This is the public data shared between prover and verifier.
/// The proof itself is warrior-specific (opaque bytes); the claim
/// is universal.
// โโโ Trace Geometry โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/// Padded trace height: next power of two above the tallest table.
///
/// Universal to all STARKs โ the execution trace is padded to a power
/// of two for NTT (Number Theoretic Transform) efficiency.
/// Merkle tree depth for a trace of the given padded height.
/// NTT (Number Theoretic Transform) domain size.
///
/// The evaluation domain is `padded_height * blowup_factor`. Larger
/// blowup factors give stronger soundness per FRI query but increase
/// prover work linearly.
// โโโ FRI Parameters โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/// Estimate the number of FRI queries needed for a target security level.
///
/// Each FRI query provides approximately `log2(blowup_factor)` bits of
/// security against a dishonest prover. The total number of queries is
/// `ceil(security_bits / log2(blowup_factor))`.
///
/// Typical parameters: security_bits=128, blowup_factor=4 โ 64 queries.
// โโโ Proof Size Estimation โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/// Estimate proof size in bytes.
///
/// A STARK proof contains:
/// - FRI merkle authentication paths (one per query per column)
/// - Polynomial evaluations at query points
/// - FRI folding commitments
///
/// This gives a rough lower bound. Actual proofs include additional
/// metadata, boundary constraints, and zero-knowledge blinding.
/// Estimate proving time in nanoseconds.
///
/// Rough universal estimate based on NTT-dominated proving:
/// `padded_height * column_count * log2(padded_height) * ns_per_field_op`.
///
/// The constant 3 ns/op is a conservative estimate for modern CPUs
/// performing 64-bit field multiplication.
// โโโ Tests โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
trident/src/field/proof.rs
ฯ 0.0%