scipr-lab / dizk

Java library for distributed zero knowledge proof systems
Other
232 stars 66 forks source link

Error in unit tests #2

Closed bh2smith closed 4 years ago

bh2smith commented 5 years ago

All of the following 4 errors on unit tests are nullPointerExceptions coming from what appear to be an issue with algebra.curves.barreto_naehrig.BNG1.one and algebra.curves.barreto_naehrig.BNG1.zero.

I am not overly familiar with Java development, but wonder if this could be a result of my java --version (which is 11). Otherwise, I am stumped on how to continue here.

Results of mvn test:

Tests in error: DistributedBN254bProofSystemTest(zk_proof_systems.zkSNARK.DistributedzkSNARKTest) SerialBN254bProofSystemTest(zk_proof_systems.zkSNARK.SerialzkSNARKTest) BN254bTest(algebra.curves.CurvesTest) BN254bTest(algebra.curves.BilinearityTest)

Tests run: 71, Failures: 0, Errors: 4, Skipped: 0

BN254bTest(algebra.curves.BilinearityTest) Time elapsed: 0 sec <<< ERROR! java.lang.NullPointerException at algebra.curves.barreto_naehrig.BNG1.zero(BNG1.java:113) at algebra.curves.barreto_naehrig.BNG1.zero(BNG1.java:17) at algebra.groups.AbstractGroup.mul(AbstractGroup.java:35) at algebra.groups.AbstractGroup.mul(AbstractGroup.java:54) etc...

BN254bTest(algebra.curves.CurvesTest) Time elapsed: 0 sec <<< ERROR! java.lang.NullPointerException at algebra.curves.barreto_naehrig.BNG1.zero(BNG1.java:113) at algebra.curves.barreto_naehrig.BNG1.zero(BNG1.java:17) at algebra.curves.CurvesTest.GroupTest(CurvesTest.java:33) at algebra.curves.CurvesTest.BN254bTest(CurvesTest.java:93) etc...

SerialBN254bProofSystemTest(zk_proof_systems.zkSNARK.SerialzkSNARKTest) Time elapsed: 0.077 sec <<< ERROR! java.lang.NullPointerException at algebra.curves.barreto_naehrig.BNG1.one(BNG1.java:117) at algebra.curves.barreto_naehrig.BNG1.random(BNG1.java:121) at algebra.curves.barreto_naehrig.BNG1.random(BNG1.java:17) at zk_proof_systems.zkSNARK.SerialSetup.generate(SerialSetup.java:89) at zk_proof_systems.zkSNARK.SerialzkSNARKTest.SerialBNProofSystemTest(SerialzkSNARKTest.java:82) at zk_proof_systems.zkSNARK.SerialzkSNARKTest.SerialBN254bProofSystemTest(SerialzkSNARKTest.java:142) etc...

DistributedBN254bProofSystemTest(zk_proof_systems.zkSNARK.DistributedzkSNARKTest) Time elapsed: 3.362 sec <<< ERROR! java.lang.NullPointerException at algebra.curves.barreto_naehrig.BNG1.one(BNG1.java:117) at algebra.curves.barreto_naehrig.BNG1.random(BNG1.java:121) at algebra.curves.barreto_naehrig.BNG1.random(BNG1.java:17) at zk_proof_systems.zkSNARK.DistributedSetup.generate(DistributedSetup.java:82) at zk_proof_systems.zkSNARK.DistributedzkSNARKTest.DistributedBNProofSystemTest(DistributedzkSNARKTest.java:103) at zk_proof_systems.zkSNARK.DistributedzkSNARKTest.DistributedBN254bProofSystemTest(DistributedzkSNARKTest.java:163) etc...

howardwu commented 5 years ago

Thanks @bh2smith, from an initial glance it appears to be an issue with the newer version(s) or a variant of the Java SDK. I'll look into this and report back.

Flav1us commented 5 years ago

also: Failed tests: BN254aTest(algebra.curves.CurvesTest) BN254bTest(algebra.curves.CurvesTest) FakeTest(algebra.curves.CurvesTest)

Tests run: 71, Failures: 3, Errors: 0, Skipped: 0 dizk_test.txt using jdk1.8.0_152

doutv commented 1 year ago

Same issue. I jump testing by mvn package -DskipTests