madztheo / noir-react-native-starter

A simple template to generate ZK proofs with Noir on mobile using React Native
MIT License
20 stars 5 forks source link

Not able to pre-download SRS for my specific circuit #4

Closed ewynx closed 3 months ago

ewynx commented 3 months ago

Hi! Thanks for this great starter 🚀 I haven't been able to successfully follow the steps in the README to pre-download the SRS based on my circuit. For the default circuit size it did work, so that's what I'm using atm.

Executing the download-srs script gives this type of error:

Circuit decoded. Downloading SRS...
fatal runtime error: Rust cannot catch foreign exceptions
./scripts/download-srs.sh: line 4:  8845 Abort trap: 6           cargo run --manifest-path $DIR/srs_downloader/Cargo.toml -- $@

Running the cargo command from the script directly doesn't give more info. I'm working on MacOS. (Currently working in this repo https://github.com/hashcloak/noir-bigint-bench/tree/main/mobile)

madztheo commented 3 months ago

My bad, I forgot to change the version of noir_rs used by the Rust script to download the SRS. It couldn't interpret the bytecode from Noir 0.32 as it was using Noir 0.30, thus the error you were getting. Now it should be fixed with the latest commit (https://github.com/madztheo/noir-react-native-starter/commit/c3649f67ddc54809b02d05aea6e1b645eea68a22). Try it out and tell me if that works for you.

ewynx commented 3 months ago

With the update it works. Thank you!