Fixed verifier for ethproofs proofs =)#161
Open
OttoVT wants to merge 1 commit intomatter-labs:devfrom
Open
Conversation
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.
What ❔
This PR fixes incomplete log23 proof verification support in the CLI verification pipeline and introduces a new utility tool for converting bincode proofs to JSON.
Changes in this PR
🧩 CLI Verification Fixes
verify_all()function for log23 proofs (todo!()removed)flatten_all()functionflatten_two()assertions to accept both reduced and log23 proof typesverify_all_program_proof()to call the correct verifier based on proof typeUseReducedLog23Machineto count both reduced and log23 proofsThese updates ensure that
ProgramProofobjects converted viato_metadata_and_proof_list()(which now always produces
reduced_log_23_proofs) can be properly verified through all CLI verification paths.🧰 New Tool:
convert_bincode_to_json.rsA standalone CLI utility for converting serialized
ProgramProofdata from bincode format to JSON,making it easier to inspect and debug proofs generated in binary form.
File:
tools/cli/src/bin/convert_bincode_to_json.rsUsage Example:
$ cargo run --bin convert_bincode_to_json -- proof.bin proof.json Reading bincode from: proof.bin Deserializing ProgramProof from bincode... Serializing to JSON... Writing JSON to: proof.json Conversion complete!Why ❔
The method
ProgramProof::to_metadata_and_proof_list()(lines 135–158 inexecution_utils/src/proofs.rs) was modified to convert all base layer proofs toreduced_log_23_proofsinstead ofreduced_proofs.However, the CLI verification pipeline was not updated to handle this new proof type, causing:
verify_recursion_layer()instead ofverify_recursion_log_23_layer())These issues broke the verification pipeline for proofs generated through the updated
to_metadata_and_proof_list()conversion.This PR restores full functionality and ensures consistency between proof generation and verification.
Is this a breaking change?
Note: While this addresses behavior resulting from a prior breaking change in
ProgramProofserialization, this PR itself is not breaking — it restores expected functionality and remains backward compatible with existing reduced proofs.Checklist ✅
cargo checkpasses successfully)Additional Context 🧠
Files Modified:
tools/cli/src/main.rs— 4 functions updated for log23 supportexecution_utils/src/recursion_strategy.rs— 1 function updated to count both proof typestools/cli/src/bin/convert_bincode_to_json.rs— new tool addedVerification: