-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure exactly one selection in get_from_vec_alloc_relaxed_r1cs. #97
Conversation
bd30e2c
to
916d8b6
Compare
I think with this we can remove this comment. Checking the sum of the Otherwise the change looks good to me. |
Done. |
@@ -658,7 +658,7 @@ fn test_recursive_circuit() { | |||
let ro_consts1: ROConstantsCircuit<G2> = PoseidonConstantsCircuit::default(); | |||
let ro_consts2: ROConstantsCircuit<G1> = PoseidonConstantsCircuit::default(); | |||
|
|||
test_recursive_circuit_with::<G1, G2>(¶ms1, ¶ms2, ro_consts1, ro_consts2, 9836, 12035); | |||
test_recursive_circuit_with::<G1, G2>(¶ms1, ¶ms2, ro_consts1, ro_consts2, 9835, 12028); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay
I played around, and this was the best I could do for constraints. I think it's a good stopping point. Now we reuse the selector, and I added an optimization for allocation of equality with constant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! The comments on the multicase could benefit from being more descriptive about what they designate (this should be clear to Lurk developers, but I'm thinking about the nova context where we'd upstream this code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second optimization round looks good to me. Left a small suggestion for the future "case" gadget.
src/gadgets/utils.rs
Outdated
let t = AllocatedNum::alloc(cs.namespace(|| "t"), || { | ||
Ok(if *a.get_value().get()? == b { | ||
F::ONE | ||
} else { | ||
(*a.get_value().get()? - b).invert().unwrap() | ||
}) | ||
})?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In situations where we want to compute a boolean selector vector, we may want to leverage batch_invert
when computing the t
s for each bit. Inversion is an expensive operation, and the threshold at which batch_invert
becomes cheaper than individual inversions is very low (each additional element to the batch is only 3 field multiplications.
7e1d08b
to
77f6ead
Compare
This backports the following Arecibo PRs: - #2 - #3 - #10 - #16 - #23 - #30 - #28 - #41 - #45 - #50 - #56 - #51 - #72 - #92 - #95 - #97 - #101 - #110 - #106 - #112 - #114 - #119 - #120 - #127 - #123 - #131 - #174 - #175 - #182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This implements [Supernova](https://eprint.iacr.org/2022/1758), allowing: - a 'pay-as-you-go' cost structure for folding operations, through the SuperNova folding scheme, - a final SNARK that efficiently compresses an instance of this folded proof, through batching techniques. References: - the [blog post](https://blog.lurk-lang.org/posts/arecibo-supernova/#technical-release-note-supernova-protocol-integration-into-nova) goes into our construction, and links to two more specialized notes on [the `CompressedSNARK` for Supernova](https://hackmd.io/@adr1anh/BJw1g0aBT) along with our variant of the [public input padding issue](https://hackmd.io/@adr1anh/Sy08YaVBa). - the Readme at `src/supernova/Readme.md` This backports the following Arecibo PRs: - lurk-lang/arecibo#2 - lurk-lang/arecibo#3 - lurk-lang/arecibo#10 - lurk-lang/arecibo#16 - lurk-lang/arecibo#23 - lurk-lang/arecibo#30 - lurk-lang/arecibo#28 - lurk-lang/arecibo#41 - lurk-lang/arecibo#45 - lurk-lang/arecibo#50 - lurk-lang/arecibo#56 - lurk-lang/arecibo#51 - lurk-lang/arecibo#72 - lurk-lang/arecibo#92 - lurk-lang/arecibo#95 - lurk-lang/arecibo#97 - lurk-lang/arecibo#101 - lurk-lang/arecibo#110 - lurk-lang/arecibo#106 - lurk-lang/arecibo#112 - lurk-lang/arecibo#114 - lurk-lang/arecibo#119 - lurk-lang/arecibo#120 - lurk-lang/arecibo#127 - lurk-lang/arecibo#123 - lurk-lang/arecibo#131 - lurk-lang/arecibo#174 - lurk-lang/arecibo#175 - lurk-lang/arecibo#182 Co-authored-by: WYATT <[email protected]> Co-authored-by: Hanting Zhang <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: porcuquine <[email protected]> Co-authored-by: Samuel Burnham <[email protected]> Co-authored-by: Matej Penciak <[email protected]> Co-authored-by: Adrian Hamelink <[email protected]>
This PR fixes #94. I think the alternate approach (checking consistency of the chosen and received target index) is probably a little better. I may take a shot at this along with investigating a refactoring to avoid duplication of the bit-checking, etc. in a separate PR. Meanwhile, this should fix the immediate issue straightforwardly.