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

Feat/add arkwork witness and prover #1

Closed

Conversation

KimiWu123
Copy link

No description provided.

@@ -0,0 +1,71 @@
use ark_bls12_381::Bls12_381;
Copy link
Author

Choose a reason for hiding this comment

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

copied from mopro-ffi and did interface modification.

@@ -0,0 +1,104 @@
use ark_ec::pairing::Pairing;
Copy link
Author

Choose a reason for hiding this comment

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

copied from mopro-ffi/cricom/serialization.rs and removed ethereum related logics.

let file = File::open(&zkey_path)?;
let mut reader = std::io::BufReader::new(file);
// check the prime in the header
// println!("{} {} {}", header.q, header.n8q, ark_bls12_381::Fq::MODULUS);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be removed


#[test]
fn test_serialization_deserialization() {
let r1cs_path = "../test-vectors/circom/multiplier2.r1cs";
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also fix this test as well?

Comment on lines -20 to +31
ark-ec = { version = "0.5.0", default-features = false, features = ["parallel"] }
ark-ff = { version = "0.5.0", default-features = false, features = ["parallel", "asm"] }
ark-std = { version = "0.5.0", default-features = false, features = ["parallel"] }
ark-bn254 = { version = "0.5.0" }
ark-groth16 = { version = "0.5.0", default-features = false, features = ["parallel"] }
ark-poly = { version = "0.5.0", default-features = false, features = ["parallel"] }
ark-relations = { version = "0.5.1", default-features = false }
ark-serialize = { version = "0.5.0", default-features = false }
ark-bls12-381 = { version = "0.5.0" }
ark-ec = { version = "0.4.1", default-features = false, features = ["parallel"] }
ark-ff = { version = "0.4.0", default-features = false, features = ["parallel", "asm"] }
ark-std = { version = "0.4.0", default-features = false, features = ["parallel"] }
ark-bn254 = { version = "0.4.0" }
ark-groth16 = { version = "0.4.0", default-features = false, features = ["parallel"] }
ark-poly = { version = "0.4.0", default-features = false, features = ["parallel"] }
ark-relations = { version = "0.4", default-features = false }
ark-serialize = { version = "0.4.0", default-features = false }
ark-bls12-381 = { version = "0.4.0" }
Copy link
Contributor

Choose a reason for hiding this comment

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

can we upgrade the version?
or it fails to upgrade?

Copy link
Author

Choose a reason for hiding this comment

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

No, we can't because of ark-circom, we're using our own branch
ark-circom = { git = "https://github.com/zkmopro/circom-compat.git", version = "0.1.0", branch = "wasm-delete", optional = true }

num = { version = "0.4.3" }
num = { version = "=0.4.0" }
Copy link
Contributor

Choose a reason for hiding this comment

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

sometimes we have problem with the fixed package version
I think we can keep it like

num = { version = "0.4.0" }

Copy link
Author

Choose a reason for hiding this comment

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

Actually, I like fixed version more. Usually, version upgradation makes more issues. But in this PR, I just followed compiler's suggestion to make this version fixed. Will modify it back.

@KimiWu123
Copy link
Author

Hi @vivianjeng , if there is no major design issues in this PR, I'll add a crate in mopro repo and move the code to mopro. Feel free to close this one.

@KimiWu123 KimiWu123 closed this Jan 23, 2025
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