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

Function wrap_hint_squaring

bitvm/src/chunk/g16_runner_utils.rs:77–97  ·  view source on GitHub ↗

final verify sq

(skip: bool, segment_id: usize, in_a: &Segment)

Source from the content-addressed store, hash-verified

75// final verify
76// sq
77pub(crate) fn wrap_hint_squaring(skip: bool, segment_id: usize, in_a: &Segment) -> Segment {
78 let input_segment_info: Vec<(SegmentID, ElementType)> = vec![(in_a.id, ElementType::Fp6)];
79
80 let f_acc = in_a.result.0.try_into().unwrap();
81
82 let (mut sq, mut is_valid_input, mut scr, mut op_hints) =
83 (ark_bn254::Fq6::ONE, true, script! {}, vec![]);
84 if !skip {
85 (sq, is_valid_input, scr, op_hints) = chunk_fq12_square(f_acc);
86 }
87
88 Segment {
89 id: segment_id as u32,
90 is_valid_input,
91 parameter_ids: input_segment_info,
92 result: (DataType::Fp6Data(sq), ElementType::Fp6),
93 hints: op_hints,
94 scr_type: ScriptType::MillerSquaring,
95 scr: scr.compile(),
96 }
97}
98
99// init_t4
100pub(crate) fn wrap_hint_init_t4(

Callers 1

Calls 1

chunk_fq12_squareFunction · 0.85

Tested by

no test coverage detected