Skip to content

Commit 7512178

Browse files
authored
fix: initialize public committed (Consensys#1317)
1 parent f5b9fd6 commit 7512178

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

std/recursion/groth16/verifier.go

+5
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
367367
return ret, fmt.Errorf("commitment key[%d]: %w", i, err)
368368
}
369369
}
370+
s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted
370371
case *VerifyingKey[sw_bls12377.G1Affine, sw_bls12377.G2Affine, sw_bls12377.GT]:
371372
tVk, ok := vk.(*groth16backend_bls12377.VerifyingKey)
372373
if !ok {
@@ -394,6 +395,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
394395
return ret, fmt.Errorf("commitment key[%d]: %w", i, err)
395396
}
396397
}
398+
s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted
397399
case *VerifyingKey[sw_bls12381.G1Affine, sw_bls12381.G2Affine, sw_bls12381.GTEl]:
398400
tVk, ok := vk.(*groth16backend_bls12381.VerifyingKey)
399401
if !ok {
@@ -421,6 +423,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
421423
return ret, fmt.Errorf("commitment key[%d]: %w", i, err)
422424
}
423425
}
426+
s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted
424427
case *VerifyingKey[sw_bls24315.G1Affine, sw_bls24315.G2Affine, sw_bls24315.GT]:
425428
tVk, ok := vk.(*groth16backend_bls24315.VerifyingKey)
426429
if !ok {
@@ -448,6 +451,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
448451
return ret, fmt.Errorf("commitment key[%d]: %w", i, err)
449452
}
450453
}
454+
s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted
451455
case *VerifyingKey[sw_bw6761.G1Affine, sw_bw6761.G2Affine, sw_bw6761.GTEl]:
452456
tVk, ok := vk.(*groth16backend_bw6761.VerifyingKey)
453457
if !ok {
@@ -475,6 +479,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
475479
return ret, fmt.Errorf("commitment key[%d]: %w", i, err)
476480
}
477481
}
482+
s.PublicAndCommitmentCommitted = tVk.PublicAndCommitmentCommitted
478483
default:
479484
return ret, fmt.Errorf("unknown parametric type combination")
480485
}

0 commit comments

Comments
 (0)