-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce a host circuit friendly transaction slicer (#296)
* prepare for v2 transaction helper * feat: support heuristic host transaction slicer * cli: add pre/post image col consistency checking * cli: perf: opt verification for perf * mask function related to applying weak checkpoint * add db in cli --------- Co-authored-by: sinka <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,178 additions
and
197 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
use halo2_proofs::pairing::bn256::Bn256; | ||
use halo2_proofs::pairing::bn256::G1Affine; | ||
use halo2_proofs::plonk::get_advice_commitments_from_transcript; | ||
use halo2_proofs::plonk::VerifyingKey; | ||
use halo2aggregator_s::transcript::poseidon::PoseidonRead; | ||
|
||
pub fn get_named_advice_commitment( | ||
vkey: &VerifyingKey<G1Affine>, | ||
proof: &[u8], | ||
named_advice: &str, | ||
) -> G1Affine { | ||
let img_col_idx = vkey | ||
.cs | ||
.named_advices | ||
.iter() | ||
.find(|(k, _)| k == named_advice) | ||
.unwrap() | ||
.1; | ||
|
||
get_advice_commitments_from_transcript::<Bn256, _, _>(vkey, &mut PoseidonRead::init(proof)) | ||
.unwrap()[img_col_idx as usize] | ||
} |
Oops, something went wrong.