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

Function wrap_hints_frob_fp12

bitvm/src/chunk/g16_runner_utils.rs:168–193  ·  view source on GitHub ↗

frob

(
    skip: bool,
    segment_id: usize,
    in_f: &Segment,
    power: usize,
)

Source from the content-addressed store, hash-verified

166
167// frob
168pub(crate) fn wrap_hints_frob_fp12(
169 skip: bool,
170 segment_id: usize,
171 in_f: &Segment,
172 power: usize,
173) -> Segment {
174 let input_segment_info: Vec<(SegmentID, ElementType)> = vec![(in_f.id, ElementType::Fp6)];
175 let f = in_f.result.0.try_into().unwrap();
176
177 let (mut cp, mut is_valid_input, mut scr, mut op_hints) =
178 (ark_bn254::Fq6::ONE, true, script! {}, vec![]);
179 if !skip {
180 (cp, is_valid_input, scr, op_hints) = chunk_frob_fp12(f, power);
181 // op_hints.extend_from_slice(&Element::Fp12v0(f).get_hash_preimage_as_hints());
182 }
183
184 Segment {
185 id: segment_id as u32,
186 is_valid_input,
187 parameter_ids: input_segment_info,
188 result: (DataType::Fp6Data(cp), ElementType::Fp6),
189 hints: op_hints,
190 scr_type: ScriptType::PostMillerFrobFp12(power as u8),
191 scr: scr.compile(),
192 }
193}
194
195// ops
196#[allow(clippy::too_many_arguments)]

Callers 1

Calls 1

chunk_frob_fp12Function · 0.85

Tested by

no test coverage detected