Skip to content

Commit

Permalink
fix: initialize public committed (Consensys#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokub authored Nov 16, 2024
1 parent f5b9fd6 commit 7512178
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions std/recursion/groth16/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 7512178

Please sign in to comment.