Merged
Conversation
chiro-hiro
reviewed
Mar 27, 2023
| let u_fold = AllocatedNum::alloc(cs.namespace(|| "u_fold"), || { | ||
| Ok(*self.u.get_value().get()? + r.get_value().get()?) | ||
| })?; | ||
| cs.enforce( |
Collaborator
There was a problem hiding this comment.
.enforce() do check A*B = C to the right constraint should be:
// u_fold = u_r + r
cs.enforce(
|| "Check u_fold",
|lc| lc + u_r * (1/r) + CS::one(),
|lc| lc + r,
|lc| lc + u_fold.get_variable(),
);
Collaborator
There was a problem hiding this comment.
cs.enforce(
|| "check i + 1",
|lc| lc,
|lc| lc,
|lc| lc + i_new.get_variable() - CS::one() - i.get_variable(),
);
Found this in original code, it worked for A = B = C = lc.
Collaborator
There was a problem hiding this comment.
chiro-hiro
reviewed
Mar 27, 2023
Comment on lines
+577
to
+582
| cs.enforce( | ||
| || "check outputEqual = true", | ||
| |lc| lc, | ||
| |lc| lc, | ||
| |lc| lc + outputEqual.get_variable() - CS::one(), | ||
| ); |
Collaborator
There was a problem hiding this comment.
This one is correct tho
chiro-hiro
reviewed
Mar 27, 2023
| ) -> Result<AllocatedRelaxedR1CSInstance<G>, SynthesisError> { | ||
| // Compute r: | ||
| let mut ro = G::ROCircuit::new(ro_consts, NUM_FE_FOR_RO); | ||
| ro.absorb(params); |
Collaborator
There was a problem hiding this comment.
Do this affect by the parallelization? like the order of absorb values?
hero78119
added a commit
to hero78119/SuperNova
that referenced
this pull request
Jan 3, 2024
* start SuperNova * setup unit test and start program counter * experimenting with the RunningClaims selector. * start conversion of RecursiveSNARK into NivcSnark * theta function needs to be defined. Starting from public param generator. * RunningClaims will be a user provide Struct. * moving CK out * setup public params in a nice way for SuperNova. * starting on phi logic * adding pci into code * move cks out and also start on U_i and pki as described in paper. * Start on SuperNova augmented circuit * work on augmented circuit2 * testing pci as output * closer to pci fin * push notes * more details and analysis of implementation method. * change to match paper * clarified wording * leave write up for review. * typo * clarity * inputize progam_counter * start on hash of U_i * swapping wording out for hash of Fpci' pre-image * testing U_i constraints * need to rethink how U_i works in the circuit. Might just be a hash. * decided on how to represent the running instance U_i in the cicruits. * change to U_i is preset amount of circuits. * refactor * got output of hash supernova from circuit * add new X2 for supernova_hash. All tests are a GO! * prep for SuperNova circuit sequence checking * generics for circuit passing * cleanup * verify supernova step * add supernova hash witness check * cleanup and bug fix * add Makefile * fix bugs and cleanup generics * compile pass but test failed due to shape mismatch * refactor to fit supernova implementation * introduce rom concept * constrain sequence execution by memory commitment * rom access commitment: program counter manipulation by step circuit * code cleanup * constrain pc[i]=z_i[x] in step circuit as well * remove number of arguments circuit constraint * adapt latest main * reuse nova nicv::prove for supernova * reuse nova runninginstance for supernova * more util function to serve supernova * disable supernova by default * error pruning: arity length check in synthesis function * primary circuit folding can be single element * optimise supernova proof size from 2*relax_rc1s to relax_rc1s + 1 * code cosmetics * cleanup and reuse compute_digest, fix typo * variable rename and cleanup some leftover * better naming and cleanup * proper naming on r1cs_shape * opt memory usage, remove unnessesary clone trait * docs decoration * isolated trait/lib for supernova * expose supernova module public * refactor and reuse most of reference * optimize pc handling in step circuit, opt running instance clone * fix comment format * retain constraint in Nova to narrow down the scope * clean up comment * add supernova bench * almost all passed by reference in supernova recursivesnark * supernova soundness and clippy fix * fix groupname in supernova bench * chores: polish reference usage in prove step * fix bug in recursive snark base case for only success on first running claim * simplify synthesis error handling * supernova align naming convention with nova * fix soundness in supernova sequence constraints * code cosmetics based on review comments * optimise util alloc_const and supernova usage * code cosmetics and clean up * optimize with less constriants, following-up fixing soundness on const index * eliminate program_counter from secondary circuit ro, better error handling * typo fix * supernova refactor test to separate mod * clean up UnSatMsg from Nova error * fix soundness: empty running instance under-constraint * refactor circuit test to test module * code cosmetics * fix soundness: use last_augmented_circuit_index consistently --------- Co-authored-by: WYATT <wyattbenno@gmail.com>
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.
Creates a draft of the R1CS F' for folding in parallel.