MCPcopy Create free account
hub / github.com/BitVM/BitVM / wrap_hint_hash_c_inv

Function wrap_hint_hash_c_inv

bitvm/src/chunk/g16_runner_utils.rs:464–490  ·  view source on GitHub ↗
(skip: bool, segment_id: usize, in_c: Vec<Segment>)

Source from the content-addressed store, hash-verified

462}
463
464pub(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![];
466 let fqvec: Vec<ark_ff::BigInt<4>> = in_c
467 .iter()
468 .map(|f| f.result.0.try_into().unwrap())
469 .collect();
470
471 in_c.iter().rev().for_each(|f| {
472 input_segment_info.push((f.id, ElementType::FieldElem));
473 });
474
475 let (mut c, mut is_valid_input, mut scr, mut op_hints) =
476 (ark_bn254::Fq6::ONE, true, script! {}, vec![]);
477 if !skip {
478 (c, is_valid_input, scr, op_hints) = chunk_hash_c_inv(fqvec);
479 }
480
481 Segment {
482 id: segment_id as u32,
483 is_valid_input,
484 parameter_ids: input_segment_info,
485 result: (DataType::Fp6Data(c), ElementType::Fp6),
486 hints: op_hints,
487 scr_type: ScriptType::PreMillerHashCInv,
488 scr: scr.compile(),
489 }
490}
491
492pub(crate) fn wrap_chunk_final_verify(
493 skip: bool,

Callers 1

Calls 2

chunk_hash_c_invFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected