Skip to content
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

Integrated verifier with deserializer #105

Merged
merged 47 commits into from
Dec 20, 2023
Merged

Conversation

xqft
Copy link
Contributor

@xqft xqft commented Dec 11, 2023

The original idea of this PR was to add serialization for the full URS and completely integrate the verifier with the deserializer. Nonetheless this was not possible because Foundry's readBinaryFile(path) function (used in a forge script for locally deploying and running the contract) doesn't retrieve the original bytes of the file but the RLP encoded version of them, which can't be decoded in Solidity for some reason using abi.decode(), so we can't read the serialized URS from a file and because of its size it's impossible to hard-code it. The same problem exists now for the verifier index, but this can be, and was, hardcoded.

So the PR adds somewhat unused deserialization logic, code for generating a fake URS in Solidity, a forge script for running verification in Anvil, small fixes in the verifier contract and the ability for the prover to serialize the full SRS.

xqft and others added 30 commits November 17, 2023 16:41
* Add foreign group usage

* KZG Prover generate verifier index

* [WIP] Debug ForeignGroup assertEquals

* Replaced job's OS. (#88)

* Use foreign EC addition gate

* Deserialize verifier index

* Added remaining msgpack primitives

* Go back to min Kimchi verifier

* Use foreign EC op gates

* Fix uint deser

* Remove unused imports

* Update o1js

* Add public_len field

* Add ForeignFieldMul gate case

* Initialize alphas

* Kimchi o1js prover: combine_point_evaluations function deleted (#91)

Co-authored-by: Pablo Deymonnaz <[email protected]>

* Final fixes

---------

Co-authored-by: gabrielbosio <[email protected]>
Co-authored-by: Tomás Casagrande <[email protected]>
Co-authored-by: Gabriel Bosio <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
* KZG Prover generate verifier index

* Deserialize verifier index

* Added remaining msgpack primitives

* Fix uint deser

* Add public_len field

* Initialize alphas

* Final fixes

* Add constraint count for pows of alpha

* Added combined evaluations step

* Added fake witness

* Fixed issues regarding fake witness

* Added comments, removed printlns

* Satisfy copy constraints

* Revert fake witness development

* Added test circuit kzg proof

* Disable test circuit proof gen

* Added vanishing poly

* Continuing final comm step
Base automatically changed from eth_verifier_continued3 to main December 13, 2023 17:33
@xqft xqft marked this pull request as ready for review December 18, 2023 16:12
Copy link
Contributor

@pablodeymo pablodeymo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xqft xqft merged commit 9ca5b8e into main Dec 20, 2023
5 checks passed
@xqft xqft deleted the eth_verifier_integrate_deser branch December 20, 2023 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants