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

refactor: bump to current Kimchi proof system revision #20

Merged

Conversation

binadamu-isiyoonekana
Copy link
Contributor

Description

This Pull Request (PR) aims at refactoring the current version of Noname so that it supports a more recent version of the Kimchi proof system.

The present code compiles and executes successfully with revision a5d8883ddf649c22f38aaac122d368ecb9fa2230 of Kimchi.

All current tests passed and none (i.e. unit, integration or property-based tests) were added.

Type of change

Minor refactoring changes impacting mostly the prover, witness and some cryptographic primitives.

Test Configuration

  • Rust version: 1.76.0-nightly
  • Hardware: MacBook Pro (x86)
  • OS: MacOS 14.1.2 (Sonoma)

@mimoo
Copy link
Contributor

mimoo commented Dec 6, 2023

Thanks for the PR! what prompted you to do this btw if I may ask :) ? working on anything interesting?

"package `{}` has neither a `lib.no` nor a `main.no` file. At least one of them is required"),
(false, true) if must_be_lib => miette::bail!("package `{user}/{repo}` is missing a `lib.no` file"),
"package has neither a `lib.no` nor a `main.no` file. At least one of them is required"),
(false, true) if must_be_lib => miette::bail!("package is missing a `lib.no` file"),
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch, I'm wondering how that was compiling

@mimoo
Copy link
Contributor

mimoo commented Dec 6, 2023

can you run cargo fmt? Then I can merge it! Thanks again :)

@binadamu-isiyoonekana
Copy link
Contributor Author

Thanks for the PR! what prompted you to do this btw if I may ask :) ? working on anything interesting?

Hi David. I'm currently exploring folding schemes on Plonk with Sangria, and ultimately, the Kimchi proof system. I thank you very much for your language, as it is the perfect starting point for generating Plonk circuits. Merci :)

@binadamu-isiyoonekana
Copy link
Contributor Author

Hello David,
I know this is not the right place to ask (and issue will be more appropriate), but I would just like to know if you're aware of this error when running the simple arithmetic.no circuit?

$ cargo run -- test --path examples/arithmetic.no --debug --private-inputs '{"private_input": ["1"]}' --public-inputs '{"public_input":["1"]}'

thread 'main' panicked at src/circuit_writer/mod.rs:307:13:
the circuit is either too small or does not constrain anything (TODO: better error)

Why this constraint of 2 gates for Kimchi, by the way?

Thanks David.

@mimoo
Copy link
Contributor

mimoo commented Dec 7, 2023

Ah, there was some assumptions in kimchi that don't work with circuits that are too small, it's probably fixable but since people don't generally write small circuits like that we didn't. Now I'm wondering why arithmetic.no produces such a small circuit though... I'll have to investigate.

Anyway thanks for the PR again! If you're interested there's more opportunities to contribute to this repo :D we also have a group chat for questions/discussions https://t.me/+VSChAOmJQgQzODcx

@mimoo
Copy link
Contributor

mimoo commented Dec 7, 2023

ah clippy is not happy, well we should take care of that in another PR anyway.

@mimoo mimoo merged commit 13db678 into zksecurity:main Dec 7, 2023
1 check failed
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.

2 participants