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

Class ElemG2Eval

bitvm/src/chunk/elements.rs:297–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295
296#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
297pub struct ElemG2Eval {
298 /// G2 point accumulator of Miller's Algorithm
299 pub(crate) t: ark_bn254::G2Affine,
300
301 // We have,
302 // A <- (1 + a), B <- (1 + b), C <- (1 + c), C = A x B
303 // c = [(a+b)/(1 + ab w^2)]
304 // c = [a_plus_b/ one_plus_ab_j_sq]
305 // In our context,
306 // A <- evaluate_line_throught_t3_q3(at_p3), B <- evaluate_line_throught_t4_q4(at_p4)
307 // a_plus_b and one_plus_ab_j_sq are values corresponding to product of line evaluations
308 // It's "partial" because we haven't computed the entire result i.e.
309 // lev = evaluate_line_throught_t2_q2(at_p2) x evaluate_line_throught_t3_q3(at_p3) x evaluate_line_throught_t4_q4(at_p4)
310 /// partial product term for a+b
311 pub(crate) a_plus_b: [ark_bn254::Fq2; 2],
312
313 /// partial product term for (1 + ab w^2)
314 pub(crate) one_plus_ab_j_sq: ark_bn254::Fq6,
315
316 /// partial product term for p2le = evaluate_line_throught_t2_q2(at_p2)
317 pub(crate) p2le: [ark_bn254::Fq2; 2],
318}
319
320impl ElemG2Eval {
321 pub(crate) fn hash_t(&self) -> HashBytes {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected