-
Notifications
You must be signed in to change notification settings - Fork 250
Use p3-miden cleanup-and-simplify branch and patched Plonky3 #2492
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
# Conflicts: # miden-vm/tests/integration/operations/crypto_ops.rs # processor/src/operations/crypto_ops.rs # processor/src/operations/ext2_ops.rs # processor/src/operations/field_ops.rs # processor/src/operations/fri_ops.rs # processor/src/operations/horner_ops.rs # processor/src/operations/u32_ops.rs # processor/src/parallel/core_trace_fragment/tests.rs # prover/src/lib.rs
Reduce diff against `next` by aligning API patterns. Some changes are
temporary simplifications that should be addressed in follow-up PRs.
## Changes Made
### Matching `next` branch patterns
- Remove `Copy` from `StackInputs`/`StackOutputs` (add `.clone()` calls)
- Rename field `precompile_requests` → `pc_requests` in ExecutionProof
- Remove `Default` derive from `HashFunction`
- Reorder `HashFunction` variants: Poseidon2=0x04, Keccak=0x05
- Use `.inverse()` instead of `.try_inverse().unwrap()` where appropriate
- Delete unused `air/src/utils.rs` and `processor/src/transpose.rs`
### Temporary simplifications
- Replace `.expect("...")` with `.unwrap()` on `QuadFelt::from_basis_coefficients_slice`
- Various formatting fixes (indentation, parentheses removal)
## Follow-up Issues to Create
### 1. Rename `pc_requests` back to `precompile_requests`
The abbreviated name reduces readability. The full name should be
restored after the migration is complete.
**Files**: `air/src/proof.rs`
### 2. Migrate to `QuadFelt::new(a, b)` API
The `next` branch uses `QuadFelt::new(a, b)` instead of
`QuadFelt::from_basis_coefficients_slice(&[a, b]).unwrap()`.
This is cleaner and avoids the unwrap entirely.
**Files**: ~33 occurrences across processor/, miden-vm/, crates/
### 3. Audit inverse method semantics
One test changed from `delta.inverse()` to `delta.try_inverse().unwrap_or(ZERO)`
which silently returns ZERO on zero input. Verify this matches production
behavior or restore panic semantics to match `next` which uses `.inv()`.
**Files**: `processor/src/chiplets/memory/tests.rs`
### 4. Restore helpful `.expect()` messages where appropriate
Replacing `.expect("context")` with `.unwrap()` loses error context.
Review and restore messages for non-obvious failure points.
### 5. Verify Keccak discriminant change is intentional
`HashFunction::Keccak` changed from 0x04 to 0x05. This is a serialization
breaking change for any existing proofs using Keccak. Confirm this is
acceptable or document the migration path.
**Files**: `air/src/proof.rs`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
…d Plonky3" This reverts commit 256f292.
02468c7 to
116efcf
Compare
|
@Al-Kindi-0 - is this PR still relevant? If so, let's merge the latest |
Yes, this is still relevant but I am thinking after the |
|
I can take care of this and then close this PR |
That would be great, thanks! |
|
Closing this one as we can open a new PR once support for periodic columns is integrated in upstream P3. |
Describe your changes
Checklist before requesting a review
nextaccording to naming convention.