Skip to content

Commit

Permalink
test: enable custom hash-to-field test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokub committed Oct 19, 2023
1 parent f664d3d commit 13581ee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/plonk/plonk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestProver(t *testing.T) {
}

func TestCustomHashToField(t *testing.T) {
t.Skip()
assert := test.NewAssert(t)
assignment := &commitmentCircuit{X: 1}
for _, curve := range getCurves() {
Expand All @@ -75,15 +74,15 @@ func TestCustomHashToField(t *testing.T) {
witness, err := frontend.NewWitness(assignment, curve.ScalarField())
assert.NoError(err)
assert.Run(func(assert *test.Assert) {
proof, err := plonk.Prove(ccs, pk, witness, backend.WithBackendOption(backend.WithHashToFieldFunction(constantHash{})))
proof, err := plonk.Prove(ccs, pk, witness, backend.WithProverHashToFieldFunction(constantHash{}))
assert.NoError(err)
pubWitness, err := witness.Public()
assert.NoError(err)
err = plonk.Verify(proof, vk, pubWitness, backend.WithHashToFieldFunction(constantHash{}))
err = plonk.Verify(proof, vk, pubWitness, backend.WithVerifierHashToFieldFunction(constantHash{}))
assert.NoError(err)
}, "custom success")
assert.Run(func(assert *test.Assert) {
proof, err := plonk.Prove(ccs, pk, witness, backend.WithBackendOption(backend.WithHashToFieldFunction(constantHash{})))
proof, err := plonk.Prove(ccs, pk, witness, backend.WithProverHashToFieldFunction(constantHash{}))
assert.NoError(err)
pubWitness, err := witness.Public()
assert.NoError(err)
Expand Down

0 comments on commit 13581ee

Please sign in to comment.