forked from Plonky3/Plonky3
-
Notifications
You must be signed in to change notification settings - Fork 1
Clean up and update #41
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
Closed
Closed
Conversation
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
…r` trait (Plonky3#1152) * challenger: add observe_lifted to FieldChallenger trait * change name * fix name * fix trait bounds * minor change * minor change
…nky3#1155) * challenger: add unit tests for observe_base_as_algebra_element * fix comments
* Update lib.rs * Update Cargo.toml * Update koala_bear.rs * Update baby_bear.rs * Update bn254.rs * Update Cargo.toml * Update bn254.rs * Update baby_bear.rs * Update bn254.rs * Update koala_bear.rs * Update bn254.rs * Update baby_bear.rs * Update Cargo.toml * Update lib.rs * Update lib.rs * Update Cargo.toml * Update Cargo.toml * Update lib.rs * Update koala_bear.rs * Update baby_bear.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update Cargo.toml * Update lib.rs * Update lib.rs * Update field-testing/src/lib.rs --------- Co-authored-by: AngusG <[email protected]>
* Change traits and add folders with lookups * Apply comments * Apply comment
* matrix: make HorizontallyTruncated more generic * small cleanup
Updates the requirements on [criterion](https://github.com/criterion-rs/criterion.rs) to permit the latest version. - [Release notes](https://github.com/criterion-rs/criterion.rs/releases) - [Changelog](https://github.com/criterion-rs/criterion.rs/blob/master/CHANGELOG.md) - [Commits](criterion-rs/criterion.rs@criterion-plot-v0.7.0...criterion-v0.8.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.8.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* uni stark: small touchups * Update uni-stark/src/symbolic_expression.rs Co-authored-by: Robin Salen <[email protected]> * small touchup --------- Co-authored-by: Robin Salen <[email protected]>
* core: add error messages to Error enums via thiserror * sort cargo file
* feat: add SubAirBuilder * refactor: remove SubMatrixRowSlices and reuse HorizontallyTruncated * chore: clippy * chore: fmt * Update sub_builder.rs Co-authored-by: Thomas Coratger <[email protected]> * Update sub_builder.rs Co-authored-by: Thomas Coratger <[email protected]> * Update sub_builder.rs Co-authored-by: Thomas Coratger <[email protected]> * Update rc_sub_builder.rs Co-authored-by: Thomas Coratger <[email protected]> --------- Co-authored-by: Thomas Coratger <[email protected]>
* doc: add rustdoc links * more linking
* Allow users to impl either permute or permute_mut * Add comment to Permutation trait method indicating the circular nature of the trait definitions.
* Integrate lookups to prover and verifier * Apply comments * Apply comments and Clippy
* Work on automated releases - Added CI to trigger a crates.io release when a release PR is merged. - Added a script to generate a release PR (and temporarily modify sub-crate `Cargo.toml`s. - Added `release-plz.toml`. * A bit more work on automated release logic * Fixed some things * Now only runs on main * Cleanup * Removed old release scripts * `release-plz` CI now looks for the "release" label * Docs * Various squashed commits Removed unused release logic REMOVE ME!! Now using `GIT_TOKEN` again * (AI) Finished the logic to release * Apply suggestions from code review - Applied Syxton's new packages. Co-authored-by: AngusG <[email protected]> --------- Co-authored-by: AngusG <[email protected]>
* challenger: add observe_algebra_elements method * Update challenger/src/lib.rs Co-authored-by: AngusG <[email protected]> * fix comment * fix comment --------- Co-authored-by: AngusG <[email protected]>
* core: small touchups * touchups * touchups
* challenger: use observe_algebra_slice when possible * clippy * chore: pacify clippy --------- Co-authored-by: Robin Salen <[email protected]>
Add a proof-of-work phase before each commit-phase fold challenge, using new configuration parameter `commit_proof_of_work_bits`. Note for simplicity, there is a single `commit_proof_of_work_bits` shared across all rounds. We also change the `check_witness` logic to be a no-op when `bits == 0`.
…ky3#1177) * fix(keccak-air): align state indexing with Keccak specification - Add transpose after transmute to convert from row-major to standard Keccak indexing (state[x + 5*y]) - Add tiny-keccak as dev-dependency for reference testing - Add 5 unit tests comparing output against tiny-keccak reference Fixes Plonky3#672 * refactor(keccak-air): use p3-keccak instead of tiny-keccak for tests Replace tiny-keccak dev-dependency with p3-keccak for testing the keccak-air implementation. The p3-keccak crate is already validated against tiny-keccak in its own tests, so this avoids redundant external dependencies while maintaining test correctness.
* implement `UniformSamplingField` and `CanSampleUniformBits` traits The former is the trait a field will implement to define the parameters needed for the `sample_uniform_bits` function via the `CanSampleUniformBits` (which the challengers need to implement). * implement `UniformSamplingField` for all small fields * implement `CanSampleUniformBits` for `DuplexChallenger` This also adds the `uniform-sampling-may-panic` feature, which decides whether finding a field element >= m_k will resample (rejection sampling) or panic. In some contexts, e.g. recursive zkVMs it may be preferable to panic and just accept a very small probability of a proof failing. * implement `UniformGrindingChallenger` This goes hand in hand with the uniform sampling for the duplex challenger. Instead of grinding using regular sampling, this one samples using uniform sampling. * fix regression in `sample_bits` Accidentally cut off the normal implementation, oops * split sampling of values into may panic / resampling approach We'll make it so that the user can choose which variant to call. * remove feature for sampling with panic, split into two functions `_may_panic` suffix for functions that may trigger a panic. * implement `_may_panic` variants for UniformGrindingChallenger As it is now not a feature flag, but requires a different function call, we simply add different overloads for variants that may panic to make it clear at the callsite. * implement UniformSamplingField for Monty31 field Due to the orphan rule we have to implement this trait either in the challenger trait or in the Monty31 crate. It seems to make sense to implement this in the challenger, as the Monty crate is more fundamental than the challenger, which anyway requires the notion of fields. * use `Self` for BabyBear / KoalaBear prime * remove outdated grinding challenger code * remove duplicated doc comments for UniformSamplingField for each field * remove doc comment for blanket implementation We keep a basic comment to clarify the reader as to why it exists. * implement sampling of bits based on a strategy-like pattern * implement uniform grinding with generic fn * check bits are >0 in grind fns * add doc comments to `check_witness[_may_panic]` * fix sort order of dependencies * apply fixes for `cargo +stable clippy --all-targets -- -D -warnings` * address cargo +nightly fmt --all fixes * improve doc comment about m_k * allow `bits = 0` argument, just return zero always * remove `_strategy` argument, use explicit generic call instead * have single `sample_value` function with a PANIC_ON_REJECTION const * switch to Result based API for uniform sampling of bits In order to allow the verifier called functions to just return false if a panic would have happened on the prover's side * have single `sample_uniform_bits` with const generic to choose * allow bits == 0 in grind, grind_uniform again * add doc comment about CanSampleUniformBits trait * rename all panic -> error * remove bits > 0 from last grind fn as well * address Clippy errors * cargo fmt fixes
- Needed for the final bit of work to automate releases.
* matrix: add pad_to_power_of_two_height * fix comments * Update matrix/src/dense.rs Co-authored-by: AngusG <[email protected]> * fmt --------- Co-authored-by: AngusG <[email protected]>
* feat: revert `builder.assert_bool` to previous impl * Update field.rs
- This was breaking the release CI.
* mersenne 31: optimize Poseidon2 for aarch64 Neon * small doc touchup * fix comment
…en-uni-stark for Miden extensions
Author
|
We changed the approach to using https://github.com/0xMiden/p3-miden |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR merges changes from the original Plonky3. It also renames our version of FRI to
p3-miden-friwhich will ease our transition to lifted FRI.More precisely, we add the following
p3-miden-goldilocksp3-goldilocksp3-miden-uni-starkp3-uni-starkp3-miden-frip3-frip3-miden-airp3-airp3-miden-prover1. p3-miden-goldilocks
Based on:
p3-goldilocksPurpose: Provides the Goldilocks field with additional APIs for compatibility with miden-crypto, especially
constsupport.Key Changes from p3-goldilocks
Why These Changes
new()andfrom_u64_unchecked(): Const constructors needed for compile-time field element creationas_int(): Compatibility alias, should be easy to drop.try_checked(): ReplacesTryFrom<u64>which conflicts with the blanket impl fromFrom<u64>2. p3-miden-uni-stark
Based on:
p3-uni-starkPurpose: Extends the
Entryenum with Miden-specific variants for auxiliary traces and periodic columns.Key Changes from p3-uni-stark
Re-exports from p3-uni-stark
The crate re-exports
StarkGenericConfig,StarkConfig, and related types fromp3-uni-starkto ensure a single trait definition across the codebase:Why These Changes
Entry::Aux: Required for Miden's auxiliary trace columns used in permutation argumentsEntry::Periodic: Required for periodic columns (columns with values that repeat with a fixed period)3. p3-miden-fri
Based on:
p3-friPurpose: Miden-specific naive FRI implementation supporting higher arity folding factors.
4. p3-miden-air
Based on:
p3-airPurpose: Miden AIR (Algebraic Intermediate Representation) traits and types.
Key Components
5. p3-miden-prover
Based on: Combines multiple crates
Purpose: The main Miden prover that orchestrates proof generation and supports aux trace generation.
Dependencies
Key Components
prove()andverify()functionsUpstream Compatibility
The following core Plonky3 crates remain unchanged from upstream:
p3-field- Core field traits and implementationsp3-uni-stark- Base univariate STARK frameworkp3-fri- Base FRI implementationp3-air- Base AIR traitsp3-matrix- Matrix operationsp3-commit- Polynomial commitment schemesp3-challenger- Fiat-Shamir challengerp3-symmetric- Symmetric cryptography primitivesp3-merkle-tree- Merkle tree implementation