From 242461b2da89cf19d69543df5d64b7b637372535 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 6 Feb 2024 10:15:16 -0600 Subject: [PATCH] add circuit static params and adjust input sizes (wip) --- codex/slots/proofs/backends/circomcompat.nim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codex/slots/proofs/backends/circomcompat.nim b/codex/slots/proofs/backends/circomcompat.nim index 3b66a65b..ebd0452c 100644 --- a/codex/slots/proofs/backends/circomcompat.nim +++ b/codex/slots/proofs/backends/circomcompat.nim @@ -28,6 +28,14 @@ import pkg/constantine/math/io/io_bigints export circomcompat +const + # TODO: this defaults need to be adjusted and/or replased with cli config params + DefaultMaxDepth* = 32 + DefaultMaxLog2NSlots* = 8 + DefaultBlockTreeDepth* = 5 + DefaultNCellFldElms* = 67 + DefaultNSamples* = 5 + type CircomCompat* = object slotDepth : int # max depth of the slot tree @@ -116,7 +124,7 @@ proc prove*[H]( return failure("Failed to push data set root") if backend.pushInputU256Array( - "slotRoot".cstring, slotRoot.addr, slotRoot.len.uint32) != ERR_OK: + "slotRoot".cstring, slotRoot[0].addr, slotRoot.len.uint32) != ERR_OK: return failure("Failed to push data set root") if backend.pushInputU32(