This issue seems to be because we are serializing the setup keypair directly to JsValue. When calling JsValue::from_serde, the function will serialize the provided value to a JSON string, send the JSON string to JS, parse it into a JS object, and then return a handle to the JS object.
This is fine in most cases, but in some extreme cases with circuits that end up with a large proving key, this serialization method would fail because of a large JSON string that gets produced. This PR solves this issue with the same method we use for compilation artifacts.
Fixes https://github.com/Zokrates/ZoKrates/issues/1276
This issue seems to be because we are serializing the setup keypair directly to
JsValue
. When callingJsValue::from_serde
, the function will serialize the provided value to a JSON string, send the JSON string to JS, parse it into a JS object, and then return a handle to the JS object.This is fine in most cases, but in some extreme cases with circuits that end up with a large proving key, this serialization method would fail because of a large JSON string that gets produced. This PR solves this issue with the same method we use for compilation artifacts.