-
Notifications
You must be signed in to change notification settings - Fork 78
Re-organize top-level crate exports #736
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
Conversation
|
|
||
| ## STARK proving system | ||
|
|
||
| The STARK module exports foundational components for the STARK proving system. It primarily consists of re-exports from the [Plonky3](https://github.com/Plonky3/Plonky3) project with some Miden-specific [adaptations](https://github.com/0xMiden/p3-miden). |
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.
We should expand this quite a bit in the future. Let's add it to the list of follow-ups.
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.
A few possible additional re-exports were mentioned here:
#720 (comment)
But the re-exports we have as of 7ba721b are rather extensive.
| pub mod stark { | ||
| //! Foundational components for the STARK proving system based on Plonky3. | ||
| //! | ||
| //! This module contains components needed to build a STARK prover/verifier and define | ||
| //! Algebraic Intermediate Representation (AIR) for the Miden VM and other components. | ||
| //! It primarily consists of re-exports from the Plonky3 project with some Miden-specific | ||
| //! adaptations. | ||
| pub use p3_miden_prover::{ | ||
| Commitments, Domain, Entry, OpenedValues, PackedChallenge, PackedVal, PcsError, Proof, | ||
| ProverConstraintFolder, StarkConfig, StarkGenericConfig, SymbolicAirBuilder, | ||
| SymbolicExpression, SymbolicVariable, Val, VerificationError, VerifierConstraintFolder, | ||
| generate_logup_trace, get_log_quotient_degree, get_max_constraint_degree, | ||
| get_symbolic_constraints, prove, quotient_values, recompose_quotient_from_chunks, verify, | ||
| verify_constraints, | ||
| }; | ||
|
|
||
| pub mod air { | ||
| pub use p3_air::{ | ||
| Air, AirBuilder, AirBuilderWithPublicValues, BaseAir, BaseAirWithPublicValues, | ||
| ExtensionBuilder, FilteredAirBuilder, PairBuilder, PairCol, PermutationAirBuilder, | ||
| VirtualPairCol, | ||
| }; | ||
| pub use p3_miden_air::{ | ||
| BaseAirWithAuxTrace, FilteredMidenAirBuilder, MidenAir, MidenAirBuilder, | ||
| }; | ||
| } | ||
| } |
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.
This is my stab at how I think the module should be organized, but we can change this later in case another structure is more logical.
Also, same as last comment: we should expand this in the future to provide a more comprehensive explanation of what this module is and how the provided functionality is different from stock Plonky3. This would include adding comments for the air submodule and to many structs/functions here that are currently missing comments. Let's note this in the same issue.
|
In the last commit, I've also grouped FF-related re-exports under the |
| get_symbolic_constraints, prove, quotient_values, recompose_quotient_from_chunks, verify, | ||
| verify_constraints, | ||
| }; | ||
| pub use p3_miden_goldilocks::Goldilocks as Felt; |
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.
In the longer run, I wonder if we should create a newtype for this - i.e.:
pub struct Felt(p3_miden_goldilocks::Goldilocks);And implement a bunch of "pass-through" methods in it directly so that we don't have to import various traits when we need to get specific functionality.
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.
This doesn't export RpoPermutation256 and RpxPermutation256, which are needed to construct hashers, compressors, and challengers in miden-vm. I might need other modifications, investigating.
Fixed! |
huitseeker
left a comment
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.
- 0xMiden/miden-vm#2472 updates cleanly
- 0xMiden/miden-base#2213 is undergoing CI, but my local tests show it should update cleanly as well
This PR re-organizes crate exports. The main changes are:
starkmodule.algebraic_spongemodule from the public interface.test_utilsmodule underrandmodule.