pub fn validate_params(fri_steps: & mut Vec<Uint256>, log_trace_length: Uint256, log_fri_last_layer_deg_bound: Uint256) {
    assert!(fri_steps[0] == uint256_ops::get_uint256("0")); //Only eta0 == 0 is currently supported

    let mut expected_log_deg_bound = log_fri_last_layer_deg_bound;
    let n_fri_steps = fri_steps.len();
    for i in 1..n_fri_steps {
        let fri_step = fri_steps[i].clone();
        assert!(fri_step > uint256_ops::get_uint256("0")); // Only the first fri step can be 0
        assert!(fri_step <= uint256_ops::get_uint256("4")); //Max supported fri step is 4.
        expected_log_deg_bound += fri_step;
    }

    // FRI starts with a polynomial of degree 'traceLength'.
    // After applying all the FRI steps we expect to get a polynomial of degree less
    // than friLastLayerDegBound.
    assert!(expected_log_deg_bound == log_trace_length); //Fri params do not match trace length
}
/* Checks that the FRI parameters are within expected values */
Checks that the FRI parameters are within expected values
Checks that the FRI parameters are within expected values
pub fn validate_params(fri_steps: & mut Vec<Uint256>, log_trace_length: Uint256, log_fri_last_layer_deg_bound: Uint256) {
    assert!(fri_steps[0] == uint256_ops::get_uint256("0")); //Only eta0 == 0 is currently supported
    let mut expected_log_deg_bound = log_fri_last_layer_deg_bound;
    let n_fri_steps = fri_steps.len();
    for i in 1..n_fri_steps {
        let fri_step = fri_steps[i].clone();
        assert!(fri_step > uint256_ops::get_uint256("0")); // Only the first fri step can be 0
        assert!(fri_step <= uint256_ops::get_uint256("4")); //Max supported fri step is 4.
        expected_log_deg_bound += fri_step;
    }
    // FRI starts with a polynomial of degree 'traceLength'.
    // After applying all the FRI steps we expect to get a polynomial of degree less
    // than friLastLayerDegBound.
    assert!(expected_log_deg_bound == log_trace_length); //Fri params do not match trace length
}
pub fn validate_params ( fri_steps : & mut Vec < Uint256 > , log_trace_length : Uint256 , log_fri_last_layer_deg_bound : Uint256 ) { assert ! ( fri_steps [ 0 ] uint256_ops get_uint256 ( " " ) ) ; //Only eta0 == 0 is currently supported let mut expected_log_deg_bound = log_fri_last_layer_deg_bound ; let n_fri_steps = fri_steps . len ( ) ; for i in 1 .. n_fri_steps { let fri_step = fri_steps [ i ] . clone ( ) ; assert ! ( fri_step uint256_ops get_uint256 ( " " ) ) ; // Only the first fri step can be 0 assert ! ( fri_step uint256_ops get_uint256 ( " " ) ) ; //Max supported fri step is 4. expected_log_deg_bound += fri_step ; } // FRI starts with a polynomial of degree 'traceLength'. // After applying all the FRI steps we expect to get a polynomial of degree less // than friLastLayerDegBound. assert ! ( expected_log_deg_bound log_trace_length ) ; //Fri params do not match trace length }
Checks that the FRI parameters are within expected values
Checks that the FRI parameters are within expected values
fri_steps
& mut Vec<Uint256>
log_trace_length
Uint256
log_fri_last_layer_deg_bound
Uint256
fri_steps
& mut Vec<Uint256>
log_trace_length
Uint256
log_fri_last_layer_deg_bound
Uint256