From cd512df3bdf2c8de4bc1559d84505f72ccd7b202 Mon Sep 17 00:00:00 2001 From: Vesselin Velichkov Date: Thu, 8 Sep 2022 14:45:00 +0100 Subject: [PATCH] plonk: set transcript hasher constants alpha, beta, ... to type const. see PR #61 --- libsnark/zk_proof_systems/plonk/verifier.hpp | 24 ++++++++++---------- libsnark/zk_proof_systems/plonk/verifier.tcc | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libsnark/zk_proof_systems/plonk/verifier.hpp b/libsnark/zk_proof_systems/plonk/verifier.hpp index cae73f192..c1645627b 100644 --- a/libsnark/zk_proof_systems/plonk/verifier.hpp +++ b/libsnark/zk_proof_systems/plonk/verifier.hpp @@ -73,19 +73,19 @@ template struct verifier_preprocessed_input_t { /// Verifier step 4 output template struct step_four_out_t { - libff::Fr beta; - libff::Fr gamma; - libff::Fr alpha; - libff::Fr zeta; - libff::Fr nu; - libff::Fr u; + const libff::Fr beta; + const libff::Fr gamma; + const libff::Fr alpha; + const libff::Fr zeta; + const libff::Fr nu; + const libff::Fr u; step_four_out_t( - libff::Fr &beta, - libff::Fr &gamma, - libff::Fr &alpha, - libff::Fr &zeta, - libff::Fr &nu, - libff::Fr &u); + const libff::Fr &beta, + const libff::Fr &gamma, + const libff::Fr &alpha, + const libff::Fr &zeta, + const libff::Fr &nu, + const libff::Fr &u); }; /// Verifier step 5 output diff --git a/libsnark/zk_proof_systems/plonk/verifier.tcc b/libsnark/zk_proof_systems/plonk/verifier.tcc index 1b23eeca2..134311749 100644 --- a/libsnark/zk_proof_systems/plonk/verifier.tcc +++ b/libsnark/zk_proof_systems/plonk/verifier.tcc @@ -59,12 +59,12 @@ template void plonk_verifier::step_three(const srs &srs) template step_four_out_t::step_four_out_t( - libff::Fr &beta, - libff::Fr &gamma, - libff::Fr &alpha, - libff::Fr &zeta, - libff::Fr &nu, - libff::Fr &u) + const libff::Fr &beta, + const libff::Fr &gamma, + const libff::Fr &alpha, + const libff::Fr &zeta, + const libff::Fr &nu, + const libff::Fr &u) : beta(beta), gamma(gamma), alpha(alpha), zeta(zeta), nu(nu), u(u) { }