works fine. but issue with compatibility of public hashes generated on solidity vs gnarkjs generatecall command.#14
Open
RustNinja wants to merge 7 commits into
Conversation
proof.json + public.json does not work with a .sol verifier.
blasrodri
reviewed
Feb 28, 2024
| @@ -0,0 +1,16 @@ | |||
| [31;22m[ERROR] [39;1msnarkJS[0m: Error: ENOENT: no such file or directory, open 'public.json' | |||
blasrodri
reviewed
Feb 28, 2024
| writeFileSync(`./circuits/batchverify_js/batchinput.json`, JSON.stringify(inputJson, null, 2)); | ||
|
|
||
| const witness = await cir.calculateWitness(inputJson, true); | ||
| // const witness = await cir.calculateWitness(inputJson, true); |
Author
There was a problem hiding this comment.
it is a test that need just to generate a an input file.
this calculateWitness use old circuit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY of our call with Mike:
proof.json + public.json does not work with a .sol verifier.
So the final agreement with @matchv is that:
BUT
public.json + proof.json+.sol verifier=>FALSEreturn from verify_proof function.so if
gnarkjs generatecalloutput + .sol verify isTRUEwe do not have a part of public inputs on solidity side to feed this type of inputs into
verify_function.On solidity side we have
msgs, sigs, pub keysthat translated into the format that the same that we have on proof.json file:example:
But we need the format and not actually the format but the data generated the same way that it was genetated by
snarkjs generatecall["0x139855728d26774998f6a74260935dbf2b41a2e1e12ff0ef546605ac921d94e5", "0x0c6f6e5ab5df25ea175f8831649bd2f0154ca8544043c61b450b12118d4d6b1f"],[["0x2ac4e68c7d097f2ba324b71166e313585b77e13e1d6faae52ffea257d951d88e", "0x00514c55fcab6a307d412bac507efd1bdb2e032763210c8179a9141a81d84c5b"],["0x0668d08425135c162009904e97c22e8588b17c6241b4ab9da812902f253d09a5", "0x2fd2174a9298f2ccc505ca4a3aac4c8ea67de8ba8ed0fa0ac22c26f693d6d551"]],["0x0d779a0cfb66e2a20e9e87f82dce62932ee6b168c31a46073f9e77c24bc10c16", "0x2c2e380c15566e22acfd22aba8eec47e0d9575dabec24e7f75d4d5a05c25e551"],
["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000013b7cff91a80a211b9ce7146aea27e4b","0x00000000000000000000000000000000c2d1b2e882294a7aa8f726e774bb008c"]And only then we can use a proof and newly generated hashes to feed into verify proof function and get a TRUE.