-
Notifications
You must be signed in to change notification settings - Fork 57
integrate whir into Expander #293
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
Open
zhenfeizhang
wants to merge
61
commits into
main
Choose a base branch
from
zz/whir_api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
306fd69
simplify benches
zhenfeizhang 5447786
wip
zhenfeizhang 598d574
wip
zhenfeizhang 86dbbd5
kzg batch verify works
zhenfeizhang f525e60
clean up
zhenfeizhang 6cef0f8
bring back the tests
zhenfeizhang 310683e
fmt
zhenfeizhang 5bd3d3e
better API
zhenfeizhang c0b64ed
update gkr verifier
zhenfeizhang 22d47da
clippy
zhenfeizhang 19fdff9
wip
zhenfeizhang 65b8778
hyrax batch opening now works properly
zhenfeizhang 330425e
update bench
zhenfeizhang 51474a7
cargo fmt
zhenfeizhang 4b304fa
Merge branch 'main' into zz/defer_kzg_pairing_check
zhenfeizhang ab05261
Merge branch 'zz/defer_kzg_pairing_check' into zz/hyrax_batch_verify
zhenfeizhang 0278307
ExpanderPCS api
zhenfeizhang a3e0063
impl batch opening for kzg
zhenfeizhang 7cc57f8
clean up
zhenfeizhang 231844d
add bench
zhenfeizhang 606c9f6
fix warning
zhenfeizhang 09fafa3
lint
zhenfeizhang 46ba7dd
fix warnings
zhenfeizhang 7d97254
refactor pcs trait
zhenfeizhang 1cb3117
finally gets sumcheck correct
zhenfeizhang 01c0b49
finished sumcheck
zhenfeizhang 4624176
clean up generic sumcheck
zhenfeizhang aed30f2
wip
zhenfeizhang 9979816
wip
zhenfeizhang 1e67e25
wip
zhenfeizhang fa5cd00
degree 2 sumcheck
zhenfeizhang 1c99242
works now!
zhenfeizhang e66e0ba
hyrax works properly now
zhenfeizhang 83e8eb4
kzg works now
zhenfeizhang ff83111
fix ci
zhenfeizhang accad15
remove pairing accumulator
zhenfeizhang 9b2aba8
clean up
zhenfeizhang fb3f5d6
Update test_kzg.rs
zhenfeizhang 425eb5d
refactor hyrax
zhenfeizhang c38d5b3
fix
zhenfeizhang 9c44e62
fix clippy
zhenfeizhang 428567b
refactoring kzg
zhenfeizhang c9faa9d
wip
zhenfeizhang 4be7c38
wip
zhenfeizhang 7dde99c
wip
zhenfeizhang ebdb4e0
refactor bikzg and unikzg
zhenfeizhang 8257bf5
performance tuning
zhenfeizhang 9ec57e5
mirco benches
zhenfeizhang f72e2eb
performance tuning
zhenfeizhang a8ede0f
performance tuning
zhenfeizhang c733eb7
Merge branch 'main' into zz/hyrax_batch_verify
zhenfeizhang b74ed0f
fix after merge
zhenfeizhang 1f0d4e6
fix tests
zhenfeizhang f1e9dc7
batch with variable length polys
zhenfeizhang 22022d8
zz/whir api
zhenfeizhang 834595f
fix bug with scratch pad
zhenfeizhang 9035ab8
clean up
zhenfeizhang c52e7f9
Merge remote-tracking branch 'origin/main' into zz/whir_api
zhenfeizhang d3acbf8
fix clippy
zhenfeizhang e00e69e
clean up
zhenfeizhang 6361e3f
clean up
zhenfeizhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -5,9 +5,11 @@ use std::{ | |
| }; | ||
|
|
||
| use arith::{field_common, FFTField, Field, SimdField}; | ||
| use ark_ff::{BigInteger64, PrimeField}; | ||
| use ethnum::U256; | ||
| use rand::RngCore; | ||
| use serdes::{ExpSerde, SerdeResult}; | ||
| use whir::crypto::fields::Field64; | ||
|
|
||
| use crate::goldilocks::p2_instructions::{assume, branch_hint, reduce128, try_inverse_u64}; | ||
|
|
||
|
|
@@ -603,3 +605,34 @@ pub(crate) mod p2_instructions { | |
| // ) | ||
| // } | ||
| } | ||
|
|
||
| impl From<Field64> for Goldilocks { | ||
| #[inline(always)] | ||
| fn from(x: Field64) -> Self { | ||
| Goldilocks { | ||
| v: x.into_bigint().0[0], | ||
| } | ||
| } | ||
| } | ||
|
|
||
| impl From<&Field64> for Goldilocks { | ||
| #[inline(always)] | ||
| fn from(x: &Field64) -> Self { | ||
| Goldilocks { | ||
| v: x.into_bigint().0[0], | ||
| } | ||
| } | ||
| } | ||
|
|
||
| impl From<Goldilocks> for Field64 { | ||
| #[inline(always)] | ||
| fn from(x: Goldilocks) -> Self { | ||
| Field64::from_bigint(BigInteger64::new([x.v])).unwrap() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| } | ||
| impl From<&Goldilocks> for Field64 { | ||
| #[inline(always)] | ||
| fn from(x: &Goldilocks) -> Self { | ||
| Field64::from_bigint(BigInteger64::new([x.v])).unwrap() | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinning the
whirdependency to a specific commit hash or tag improves reproducibility and prevents unexpected changes from upstream.