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

Function wrap_hints_precompute_p

bitvm/src/chunk/g16_runner_utils.rs:380–409  ·  view source on GitHub ↗
(
    skip: bool,
    segment_id: usize,
    in_py: &Segment,
    in_px: &Segment,
)

Source from the content-addressed store, hash-verified

378}
379
380pub(crate) fn wrap_hints_precompute_p(
381 skip: bool,
382 segment_id: usize,
383 in_py: &Segment,
384 in_px: &Segment,
385) -> Segment {
386 let input_segment_info: Vec<(SegmentID, ElementType)> = vec![
387 (in_py.id, ElementType::FieldElem),
388 (in_px.id, ElementType::FieldElem),
389 ];
390
391 let (mut p3d, mut is_valid_input, mut scr, mut op_hints) =
392 (ark_bn254::G1Affine::identity(), true, script! {}, vec![]);
393 // let mut tap_prex = script! {};
394 if !skip {
395 let in_py = in_py.result.0.try_into().unwrap();
396 let in_px = in_px.result.0.try_into().unwrap();
397 (p3d, is_valid_input, scr, op_hints) = chunk_precompute_p(in_py, in_px);
398 }
399
400 Segment {
401 id: segment_id as u32,
402 is_valid_input,
403 parameter_ids: input_segment_info,
404 result: (DataType::G1Data(p3d), ElementType::G1),
405 hints: op_hints,
406 scr_type: ScriptType::PreMillerPrecomputeP,
407 scr: scr.compile(),
408 }
409}
410
411pub(crate) fn wrap_hints_precompute_p_from_hash(
412 skip: bool,

Callers 1

Calls 1

chunk_precompute_pFunction · 0.85

Tested by

no test coverage detected