From 704f0caed8f2ffff575d4cbdb5b914b096d90cf4 Mon Sep 17 00:00:00 2001 From: munna0908 Date: Tue, 5 May 2026 21:11:58 +0530 Subject: [PATCH] code cleanup --- groth16.nimble | 4 ---- groth16/prover/shared.nim | 4 ++-- tests/groth16/testMultithreading.nim | 8 -------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/groth16.nimble b/groth16.nimble index cc6dccc..29b38d3 100644 --- a/groth16.nimble +++ b/groth16.nimble @@ -13,7 +13,3 @@ requires "nim >= 2.2.0" requires "https://github.com/status-im/nim-taskpools >= 0.0.5" requires "https://github.com/mratsim/constantine" # requires "https://github.com/mratsim/constantine#bc3845aa492b52f7fef047503b1592e830d1a774" - - -task test, "Run All Tests": - exec "nim c -r -d:release --opt=speed tests/test.nim " \ No newline at end of file diff --git a/groth16/prover/shared.nim b/groth16/prover/shared.nim index e9bc358..3862205 100644 --- a/groth16/prover/shared.nim +++ b/groth16/prover/shared.nim @@ -134,10 +134,10 @@ proc shiftEvalDomainTask( var local = newSeq[FrBN](n) for i in 0 ..< n: local[i] = values.payload[i] - let result = shiftEvalDomain(local, D, eta) + let res = shiftEvalDomain(local, D, eta) # Copy result → caller's output buffer through the SharedBuf payload pointer. - for i in 0 ..< n: output.payload[i] = result[i] + for i in 0 ..< n: output.payload[i] = res[i] return true # computes the quotient polynomial Q = (A*B - C) / Z diff --git a/tests/groth16/testMultithreading.nim b/tests/groth16/testMultithreading.nim index f801c02..8e85911 100644 --- a/tests/groth16/testMultithreading.nim +++ b/tests/groth16/testMultithreading.nim @@ -1,4 +1,3 @@ - {.used.} # Multi-threading determinism tests. @@ -7,19 +6,12 @@ # the proof is a pure deterministic function of (zkey, witness). Sweeping the # taskpool thread count must produce byte-identical proof points. Any # divergence ⇒ data race in the multi-threaded MSM/NTT path. -# -# These tests run under both --mm:arc and --mm:refc via the `test` nimble import std/unittest import std/sequtils import taskpools -# Without this, unittest's echo of the trailing `[OK]` line for the last test -# can stay in stdio buffers when the process exits right after pool.shutdown() -# joins its worker threads — making the suite look like it stopped early. -#setStdIoUnbuffered() - import groth16/prover import groth16/prover/groth16 as proverImpl import groth16/verifier