Consensys / Consensys/zero-knowledge-proofs

Run-time errors on OSX

Open
#13 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
138
Forks
57
PR merge metrics
No merged PRs in 30d

Description

I'm trying to compile and run this on OSX.

I can compile fine. However, I'm getting the following errors when I go to run ("Single payment in and single payment out"):

`terminating with uncaught exception of type std::invalid_argument: libff::get_root_of_unity: expected n == (1u << logn)`

```
node index.js startBalance=10000

Please select an option:
1) Single payment in and single payment out
2) Multiple payments in and multiple payments out
3) Simulation of an RTGS payment node
0) Quit
prompt: option: 1

The provingKey and verificationKey need to be generated

libc++abi.dylib: terminating with uncaught exception of type std::invalid_argument: libff::get_root_of_unity: expected n == (1u << logn)

Loading proving key from file. This will take a few seconds
..payment_in_out_generate_proof(91763,0x7fff9d3e33c0) malloc: *** mach_vm_map(size=1125876303986688) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

.........................................................................................
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the OSX failure with `node index.js startBalance=10000` and option 1. Inspect the reported `libff::get_root_of_unity` exception and subsequent `std::bad_alloc`; done means option 1 runs successfully on OSX without these runtime errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
cryptography, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.