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

Function generate_segments_using_mock_proof

bitvm/src/chunk/api_compiletime_utils.rs:106–183  ·  view source on GitHub ↗
(vk: Vkey, skip_evaluation: bool)

Source from the content-addressed store, hash-verified

104}
105
106fn generate_segments_using_mock_proof(vk: Vkey, skip_evaluation: bool) -> Vec<Segment> {
107 // values known only at runtime, can be mocked
108 let q4xc0: ark_bn254::Fq = ark_bn254::Fq::from(
109 BigUint::from_str(
110 "18327300221956260726652878806040774028373651771658608258634994907375058801387",
111 )
112 .unwrap(),
113 );
114 let q4xc1: ark_bn254::Fq = ark_bn254::Fq::from(
115 BigUint::from_str(
116 "2791853351403597124265928925229664715548948431563105825401192338793643440152",
117 )
118 .unwrap(),
119 );
120 let q4yc0: ark_bn254::Fq = ark_bn254::Fq::from(
121 BigUint::from_str(
122 "9203020065248672543175273161372438565462224153828027408202959864555260432617",
123 )
124 .unwrap(),
125 );
126 let q4yc1: ark_bn254::Fq = ark_bn254::Fq::from(
127 BigUint::from_str(
128 "21242559583226289516723159151189961292041850314492937202099045542257932723954",
129 )
130 .unwrap(),
131 );
132 let tx = ark_bn254::Fq2::new(q4xc0, q4xc1);
133 let ty = ark_bn254::Fq2::new(q4yc0, q4yc1);
134 let t2 = ark_bn254::G2Affine::new(tx, ty);
135
136 let g1x: ark_bn254::Fq = ark_bn254::Fq::from(
137 BigUint::from_str(
138 "5567084537907487155917146166615783238769284480674905823618779044732684151587",
139 )
140 .unwrap(),
141 );
142 let g1y: ark_bn254::Fq = ark_bn254::Fq::from(
143 BigUint::from_str(
144 "6500138522353517220105129525103627482682148482121078429366182801568786680416",
145 )
146 .unwrap(),
147 );
148 let t1 = ark_bn254::G1Affine::new(g1x, g1y);
149
150 let mut segments: Vec<Segment> = vec![];
151 let g1 = t1;
152 let g2 = t2;
153 let fr: ark_ff::BigInt<4> = ark_ff::BigInt::from(1u64);
154 let c = ark_bn254::Fq6::ONE;
155 let mocked_eval_ins: InputProof = InputProof {
156 p2: g1,
157 p4: g1,
158 q4: g2,
159 c,
160 ks: vec![fr.into(); NUM_PUBS],
161 };
162
163 // public values known at compile time

Calls 2

to_rawMethod · 0.80

Tested by

no test coverage detected