From 38377c28b5560641416493ae4b915c89fb109370 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Sat, 16 Nov 2024 22:10:01 +0700 Subject: [PATCH] fix: initialize public committed --- std/recursion/groth16/verifier.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/std/recursion/groth16/verifier.go b/std/recursion/groth16/verifier.go index ad760db91..067158b44 100644 --- a/std/recursion/groth16/verifier.go +++ b/std/recursion/groth16/verifier.go @@ -367,6 +367,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT, return ret, fmt.Errorf("commitment key[%d]: %w", i, err) } } + s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted case *VerifyingKey[sw_bls12377.G1Affine, sw_bls12377.G2Affine, sw_bls12377.GT]: tVk, ok := vk.(*groth16backend_bls12377.VerifyingKey) if !ok { @@ -394,6 +395,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT, return ret, fmt.Errorf("commitment key[%d]: %w", i, err) } } + s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted case *VerifyingKey[sw_bls12381.G1Affine, sw_bls12381.G2Affine, sw_bls12381.GTEl]: tVk, ok := vk.(*groth16backend_bls12381.VerifyingKey) if !ok { @@ -421,6 +423,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT, return ret, fmt.Errorf("commitment key[%d]: %w", i, err) } } + s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted case *VerifyingKey[sw_bls24315.G1Affine, sw_bls24315.G2Affine, sw_bls24315.GT]: tVk, ok := vk.(*groth16backend_bls24315.VerifyingKey) if !ok { @@ -448,6 +451,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT, return ret, fmt.Errorf("commitment key[%d]: %w", i, err) } } + s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted case *VerifyingKey[sw_bw6761.G1Affine, sw_bw6761.G2Affine, sw_bw6761.GTEl]: tVk, ok := vk.(*groth16backend_bw6761.VerifyingKey) if !ok { @@ -475,6 +479,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT, return ret, fmt.Errorf("commitment key[%d]: %w", i, err) } } + s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted default: return ret, fmt.Errorf("unknown parametric type combination") }