From 257e2e20f00b2b2867d56cd2e323ed46d9882ea6 Mon Sep 17 00:00:00 2001 From: Balazs Komuves Date: Tue, 16 Jun 2026 12:29:54 +0200 Subject: [PATCH] preparation for multiple versions of the dynamic prover --- groth16/bn128/arrays.nim | 10 +++++++ groth16/dynamic/types.nim | 19 ------------ groth16/dynamic/{ => v1}/finish.nim | 4 +-- groth16/dynamic/{ => v1}/preprocess.nim | 31 +++++++++++++++++-- groth16/dynamic/{ => v1}/setup.nim | 2 +- groth16/dynamic/v1/types.nim | 40 +++++++++++++++++++++++++ groth16/partial/finish.nim | 4 +-- groth16/zkey_types.nim | 2 +- 8 files changed, 84 insertions(+), 28 deletions(-) rename groth16/dynamic/{ => v1}/finish.nim (99%) rename groth16/dynamic/{ => v1}/preprocess.nim (87%) rename groth16/dynamic/{ => v1}/setup.nim (99%) create mode 100644 groth16/dynamic/v1/types.nim diff --git a/groth16/bn128/arrays.nim b/groth16/bn128/arrays.nim index 18146e3..aac4830 100644 --- a/groth16/bn128/arrays.nim +++ b/groth16/bn128/arrays.nim @@ -100,6 +100,16 @@ func orBoolSeqs*( us: seq[bool] , vs: seq[bool]): seq[bool] = ws[i] = us[i] or vs[i] return ws +#------------------------------------------------------------------------------- +# int arrays + +func sumIntSeq*(xs : seq[int]): int = + let n = xs.len + var s = 0 + for i in 0..