Skip to content

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Nov 8, 2023
1 parent 694352b commit 2d0caad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(int argc, char *argv[])
bench = 1;
if (argc < 3)
{
printf("******************* ZPiE v0.4 *******************\n");
printf("******************* ZPiE v0.5 *******************\n");
printf("USAGE: ./zpie [ACTIONS] [OPTIONS]\n\n");
printf("[ACTIONS]:\n");
printf("-s <c>: Perform setup of 'c' constraints.\n");
Expand All @@ -38,7 +38,7 @@ int main(int argc, char *argv[])

if ((argc == 4) && (strcmp(argv[3], "-l") == 0)) logs = 1;

printf("******************* ZPiE v0.4 *******************\n");
printf("******************* ZPiE v0.5 *******************\n");

if ((strcmp(argv[1], "-s") == 0) || (strcmp(argv[1], "-p") == 0) || (strcmp(argv[1], "-v") == 0))
{
Expand All @@ -47,8 +47,8 @@ int main(int argc, char *argv[])

printf("--- Starting ZPiE - Groth'16...\n");
printf(" |--- # of constraints: %d\n", N);
printf(" |--- # of variables: %d\n", M);
printf(" |--- # of public outputs: %d\n", nPublic);
printf(" |--- # of elements: %d\n", M);
printf(" |--- # of public elements: %d\n", nPublic);
}
else
{
Expand Down
4 changes: 1 addition & 3 deletions src/common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ void init_prover(void *circuit, proving_key pk)
BsFr = (mclBnFr*) malloc((n) * sizeof(mclBnFr));
CsFr = (mclBnFr*) malloc((n) * sizeof(mclBnFr));

if (bench) printf(" |--- Mode: Prove\n");

mpz_init(pPrime);
mpz_set_str(pPrime, PRIMESTR, 10);
if (bench) printf(" |--- FFT constraints size : %d\n", n);
if (bench) printf(" |--- FFT domain size : %d\n", n);

rsigma = (mpz_t*) malloc((n) * sizeof(mpz_t));
rsigmaInv = (mpz_t*) malloc((n) * sizeof(mpz_t));
Expand Down
4 changes: 4 additions & 0 deletions src/zpie.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include "common/sha256.c"
#include "CUnit/Basic.h"

#ifndef IS_MAC_OS
#include <sys/sysinfo.h>
#endif

int init_suite(void) { return 0; }
int clean_suite(void) { return 0; }

Expand Down

0 comments on commit 2d0caad

Please sign in to comment.