From 317d08359739e7dc8c9fd89dd06394bfe64cc70e Mon Sep 17 00:00:00 2001 From: Artem Skriabin Date: Wed, 11 Sep 2024 12:16:03 +0300 Subject: [PATCH] Update zk lib, allow only 23 pub signal --- go.mod | 2 +- go.sum | 2 ++ internal/service/requests/verification_callback.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b50306c..e46b267 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/iden3/go-iden3-crypto v0.0.15 github.com/iden3/go-rapidsnark/types v0.0.3 github.com/pkg/errors v0.9.1 - github.com/rarimo/zkverifier-kit v1.2.1 + github.com/rarimo/zkverifier-kit v1.2.3 github.com/rubenv/sql-migrate v1.7.0 github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 gitlab.com/distributed_lab/ape v1.7.1 diff --git a/go.sum b/go.sum index e9c474a..65273ad 100644 --- a/go.sum +++ b/go.sum @@ -1905,6 +1905,8 @@ github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rarimo/zkverifier-kit v1.2.1 h1:sO6qgm6OBm+sBD53g3/xxo9WSvQoz1RiXsH+/jRw/X8= github.com/rarimo/zkverifier-kit v1.2.1/go.mod h1:3YDg5dTkDRr4IdfaDHGYetopd6gS/2SuwSeseYTWwNw= +github.com/rarimo/zkverifier-kit v1.2.3 h1:4UQWGSWA4klDoS5MNYA6R4PNC4QRak6kauH/cDncZwc= +github.com/rarimo/zkverifier-kit v1.2.3/go.mod h1:3YDg5dTkDRr4IdfaDHGYetopd6gS/2SuwSeseYTWwNw= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= diff --git a/internal/service/requests/verification_callback.go b/internal/service/requests/verification_callback.go index 5157cf1..bb46bc9 100644 --- a/internal/service/requests/verification_callback.go +++ b/internal/service/requests/verification_callback.go @@ -29,7 +29,7 @@ func GetVerificationCallbackByID(r *http.Request) (req resources.ProofRequest, e return req, val.Errors{ "data/attributes/proof/proof": val.Validate(attr.Proof.Proof, val.Required), - "data/attributes/proof/pub_signals": val.Validate(attr.Proof.PubSignals, val.Required, val.Length(22, 22)), + "data/attributes/proof/pub_signals": val.Validate(attr.Proof.PubSignals, val.Required, val.Length(23, 23)), }.Filter() }