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

Function wrap_hint_hash_p

bitvm/src/chunk/g16_runner_utils.rs:354–378  ·  view source on GitHub ↗
(
    skip: bool,
    segment_id: usize,
    in_t: &Segment,
    pub_vky0: ark_bn254::G1Affine,
)

Source from the content-addressed store, hash-verified

352}
353
354pub(crate) fn wrap_hint_hash_p(
355 skip: bool,
356 segment_id: usize,
357 in_t: &Segment,
358 pub_vky0: ark_bn254::G1Affine,
359) -> Segment {
360 let input_segment_info = vec![(in_t.id, ElementType::G1)];
361
362 let t = in_t.result.0.try_into().unwrap();
363 let (mut p3, mut is_valid_input, mut scr, mut op_hints) =
364 (ark_bn254::G1Affine::identity(), true, script! {}, vec![]);
365 if !skip {
366 (p3, is_valid_input, scr, op_hints) = chunk_hash_p(t, pub_vky0);
367 // op_hints.extend_from_slice(&DataType::G1Data(t).get_hash_preimage_as_hints());
368 }
369 Segment {
370 id: segment_id as u32,
371 is_valid_input,
372 parameter_ids: input_segment_info,
373 result: (DataType::G1Data(p3), ElementType::G1),
374 hints: op_hints,
375 scr_type: ScriptType::PreMillerHashP,
376 scr: scr.compile(),
377 }
378}
379
380pub(crate) fn wrap_hints_precompute_p(
381 skip: bool,

Callers 1

Calls 1

chunk_hash_pFunction · 0.85

Tested by

no test coverage detected