perf(recursion): use inline Blake2b-256 for transcript#1232
Closed
perf(recursion): use inline Blake2b-256 for transcript#1232
Conversation
Add a Blake2b-256 hasher to jolt-inlines and wire jolt-core's non-host (minimal) transcript to use it, reducing cycle counts in recursive verification.
Factor shared streaming/hash logic into a const-generic internal Blake2b implementation and keep Blake2b/Blake2b256 as thin wrappers.
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.
Summary
Use Jolt’s Blake2 inline implementation for the Fiat–Shamir transcript in non-host (recursion/guest-verifier) builds to reduce zkVM cycle counts.
Key Changes
jolt-inlines-blake2(output-length parameterized to 32 bytes; not truncation).Blake2bTranscriptto use the inline Blake2b-256 backend whenfeature = \"host\"is disabled.jolt-coreminimalfeature to includejolt-inlines-blake2, with target-specific dependency features so it compiles on non-RISC-V while emitting the custom instruction on RISC-V.Testing
cargo fmt --allcargo test -p jolt-inlines-blake2 --features hostcargo test -p jolt-corecargo test -p jolt-core --no-default-features --features minimalcargo clippy -p jolt-inlines-blake2 --all-targets --features hostcargo clippy -p jolt-core --all-targetscargo clippy -p jolt-core --no-default-features --features minimal --lib --testsReview Guidance
hostvsminimal) and ensuring equivalence between the inline and reference implementations.