(skip: bool, segment_id: usize, in_c: Vec<Segment>)
| 434 | } |
| 435 | |
| 436 | pub(crate) fn wrap_hint_hash_c(skip: bool, segment_id: usize, in_c: Vec<Segment>) -> Segment { |
| 437 | let mut input_segment_info: Vec<(SegmentID, ElementType)> = vec![]; |
| 438 | let fqvec: Vec<ark_ff::BigInt<4>> = in_c |
| 439 | .iter() |
| 440 | .map(|f| f.result.0.try_into().unwrap()) |
| 441 | .collect(); |
| 442 | |
| 443 | in_c.iter().rev().for_each(|f| { |
| 444 | input_segment_info.push((f.id, ElementType::FieldElem)); |
| 445 | }); |
| 446 | |
| 447 | let (mut c, mut is_valid_input, mut scr, mut op_hints) = |
| 448 | (ark_bn254::Fq6::ONE, true, script! {}, vec![]); |
| 449 | if !skip { |
| 450 | (c, is_valid_input, scr, op_hints) = chunk_hash_c(fqvec); |
| 451 | } |
| 452 | |
| 453 | Segment { |
| 454 | id: segment_id as u32, |
| 455 | is_valid_input, |
| 456 | parameter_ids: input_segment_info, |
| 457 | result: (DataType::Fp6Data(c), ElementType::Fp6), |
| 458 | hints: op_hints, |
| 459 | scr_type: ScriptType::PreMillerHashC, |
| 460 | scr: scr.compile(), |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | pub(crate) fn wrap_hint_hash_c_inv(skip: bool, segment_id: usize, in_c: Vec<Segment>) -> Segment { |
| 465 | let mut input_segment_info: Vec<(SegmentID, ElementType)> = vec![]; |
no test coverage detected