Skip to main content

evaluate

Function evaluate 

Source
pub fn evaluate(
    contract: &Contract,
    contract_bytes: &[u8],
    record: &PerformanceRecord,
) -> Result<BudgetVerdict, BudgetError>
Expand description

Judge record against contract, whose bytes are contract_bytes.

Structural problems – another contract, a trial for an unknown cell or round, a trial recorded twice – are errors: the record cannot be judged at all. Everything else is a Rejection in the verdict. A correctness failure, a missing trial, broken interleaving or excess variance rejects in every mode; a material regression rejects where the mode’s policy gates performance.

§Errors

Returns BudgetError when the record does not belong to this contract or is structurally invalid.