-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: pil2circom, r1cs2plonk * chore: develop * feat: pil2circom, r1cs2plonk * chore: develop * chore: develop * chore: develop * feat: pil2circom, r1cs2plonk
- Loading branch information
Showing
12 changed files
with
1,747 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
use crate::digest::ElementDigest; | ||
use crate::errors::Result; | ||
use crate::starkinfo::Program; | ||
use crate::starkinfo::StarkInfo; | ||
use crate::types::{StarkStruct, PIL}; | ||
|
||
pub struct StarkOption { | ||
pub enable_input: bool, | ||
pub verkey_input: bool, | ||
pub skip_main: bool, | ||
} | ||
|
||
pub fn pil2circom( | ||
pil: &PIL, | ||
const_root: &ElementDigest, | ||
stark_struct: &StarkStruct, | ||
starkinfo: &mut StarkInfo, | ||
program: &mut Program, | ||
options: &StarkOption, | ||
) -> Result<String> { | ||
starkinfo.set_code_dimensions_first(&mut program.verifier_code)?; | ||
starkinfo.set_code_dimensions_first(&mut program.verifier_query_code)?; | ||
|
||
let res; | ||
if stark_struct.verificationHashType.as_str() == "GL" { | ||
res = crate::stark_verifier_gl_circom::render( | ||
starkinfo, | ||
program, | ||
pil, | ||
stark_struct, | ||
const_root, | ||
options, | ||
); | ||
} else { | ||
panic!("BN128 not supported"); | ||
} | ||
|
||
return Ok(res); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use crate::f3g::F3G; | ||
use plonky::r1cs_file::R1CSFile; | ||
use plonky::reader::load_r1cs; | ||
|
||
pub fn r1cs2plonk(r1cs: &R1CSFile) { | ||
|
||
} |
Oops, something went wrong.