feat(stm): enable plutus friendly hash#3417
Merged
Merged
Conversation
Test Results 5 files ± 0 209 suites ±0 1h 36m 14s ⏱️ - 1h 38m 31s Results for commit 3585373. ± Comparison against base commit e5f3c86. This pull request removes 51 tests.♻️ This comment has been updated with latest results. |
damrobi
temporarily deployed
to
testing-2-preview
July 17, 2026 14:51 — with
GitHub Actions
Inactive
damrobi
force-pushed
the
damrobi/msnark/3307-enable-plutus-friendly-hash
branch
from
July 17, 2026 15:00
7c6b351 to
f28e284
Compare
damrobi
temporarily deployed
to
testing-2-preview
July 17, 2026 16:12 — with
GitHub Actions
Inactive
damrobi
marked this pull request as ready for review
July 20, 2026 07:29
damrobi
requested review from
Alenar,
curiecrypt,
hjeljeli32,
jpraynaud and
turmelclem
as code owners
July 20, 2026 07:29
There was a problem hiding this comment.
Pull request overview
This PR updates the IVC transcript hash used by the experimental SNARK (future_snark) path to a Plutus-friendly Blake2b variant by switching from blake2b_simd::State to midnight_proofs::transcript::Blake2b256, and regenerates associated test assets.
Changes:
- Replace all
blake2b_simd::Statetranscript usages withBlake2b256across IVC proof generation and aggregate signature plumbing. - Update circuit test utilities to use
Sha256for shared-cache fingerprinting and removeblake2b_simddependency entries frommithril-stm. - Adjust IVC test/generator code to use the new transcript hash type.
Reviewed changes
Copilot reviewed 6 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-stm/src/protocol/aggregate_signature/signature.rs | Switch IVC aggregate-signature variant and helpers/tests to IvcProof<Blake2b256>. |
| mithril-stm/src/protocol/aggregate_signature/clerk.rs | Update IVC proving pipeline return type to IvcProof<Blake2b256>. |
| mithril-stm/src/proof_system/ivc_halo2_snark/proof.rs | Use Blake2b256 transcript for IVC proof generation and update tests accordingly. |
| mithril-stm/src/circuits/test_utils/file_mutex.rs | Replace Blake2b-based cache fingerprinting with Sha256 + hex::encode. |
| mithril-stm/src/circuits/halo2_ivc/tests/common/generators/proofs.rs | Update test proof generation/verification helpers to use Blake2b256. |
| mithril-stm/Cargo.toml | Remove blake2b_simd optional/dev dependency wiring from future_snark. |
| Cargo.lock | Drop blake2b_simd from the mithril-stm dependency list. |
Comments suppressed due to low confidence (1)
mithril-stm/src/proof_system/ivc_halo2_snark/proof.rs:392
- The local variable
blake2b_bytesis now produced with theBlake2b256transcript hash, so the name is misleading (it previously implied the older Blake2b variant). Renaming it toblake2b256_bytes(or similar) will make the transcript choice explicit and reduce confusion when reading/debugging proof generation.
let blake2b_bytes = IvcProof::<Blake2b256>::prove_with_transcript(
&self.ivc_setup.srs,
&self.ivc_setup.ivc_proving_key,
&circuit_data,
&public_inputs,
&mut self.rng,
)?;
let proof = IvcProof::new(
IvcProofBytes::new(blake2b_bytes),
prover_input.next_state,
prover_input.next_accumulator,
);
damrobi
force-pushed
the
damrobi/msnark/3307-enable-plutus-friendly-hash
branch
from
July 20, 2026 07:49
f30863d to
3585373
Compare
damrobi
temporarily deployed
to
testing-2-preview
July 20, 2026 08:54 — with
GitHub Actions
Inactive
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
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.
Content
This PR includes a switch of the Blake2b transcript hash function used when generating IVC proofs. The current implementation a version of Blake2b-512 that is not Plutus friendly. The latest update of MidnightZK introduced a
Blake2b256which is Plutus friendly and can be used as a transcript hash. More details in this discussion.Changes:
All
blake2b_simd::Stateuses were replaced byBlake2b256and the test assets were regenerated.Pre-submit checklist
Comments
Issue(s)
Closes #3307