Skip to content

Conversation

@huitseeker
Copy link
Contributor

Update project dependencies to use Plonky3-based miden versions:
- miden-crypto v0.20
- miden-vm from github.com/0xMiden/miden-vm (branch al-migrate-p3-ver2)
- miden-base from github.com/0xMiden/miden-base (branch huitseeker/update-miden-deps-p3)
- Add miden-core git dependency

Fix breaking API changes:
- Replace StarkField::MODULUS with PrimeField64::ORDER_U64
- Remove FieldElement imports (no longer exported)
- Change Felt::ZERO/ONE to ZERO/ONE constants
- Update MMR proof field access to use methods (.forest(), .merkle_path())
- Add missing LargeSmtError enum variants (RootMismatch, StorageNotEmpty)
- Replace ExecutionProof::new_dummy() with struct construction
- Handle HashFunction type conflicts from aliased git repos using transmute
…ntime detection

The miden-vm prover's prove_sync() method detects when it's called from
within a Tokio runtime and panics, recommending to use the async prove()
method instead. Even tokio::task::spawn_blocking() still runs within the
Tokio runtime context and triggers this check.

Changes:
- Wrap Prover enum's Mutex types in Arc to allow cloning
- Use std::thread::spawn() instead of spawn_blocking() for prove_tx
- Use tokio::sync::oneshot channel to communicate result back to async context
- This allows the sync prove() call to run outside Tokio's runtime detection

The prove_batch and prove_block methods remain unchanged as they are
synchronous and not called from async context in the same way.

Fixes the test_prove_transaction test failure.
- Change try_from to from for infallible u64 to Felt conversions
- Add clippy::missing_transmute_annotations allow for HashFunction transmutes
- Remove unused miden-air dependency from stress-test crate
- Remove let-and-return pattern in test utilities

These are cleanup items from the new miden dependencies that have
stricter type conversions and new clippy lints.
@huitseeker huitseeker requested a review from bobbinth December 30, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants