From 247f3f042b4b7fbd650087f5f0505b0680a99116 Mon Sep 17 00:00:00 2001 From: David Rusu Date: Mon, 22 Jul 2024 19:02:30 +0400 Subject: [PATCH] cl: give a name to the balance unit point in zero commitment --- goas/cl/cl/src/balance.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/goas/cl/cl/src/balance.rs b/goas/cl/cl/src/balance.rs index 3e5fcf7..b49f18b 100644 --- a/goas/cl/cl/src/balance.rs +++ b/goas/cl/cl/src/balance.rs @@ -23,11 +23,8 @@ impl Balance { // So we use the generator point as a stand in for the unit point. // // TAI: we can optimize this further from `0*G + r*H` to just `r*H` to save a point scalar mult + point addition. - Self(balance( - 0, - curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT, - blinding.0, - )) + let unit = curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT; + Self(balance(0, unit, blinding.0)) } pub fn to_bytes(&self) -> [u8; 32] {