Description
prove-elf, prove-boot, and prove-block write MVMPROOF files using duplicated local serialize_proof functions. Those functions do not use the canonical RecursiveProof::to_bytes() format and no matching decoder exists.
The custom encoding also omits proof data needed by current RecursiveProof/ExecutionProof structures, including:
accumulator.scalar_acc;
- shifted evaluations and shifted opening proof;
- LogUp commitments/evaluations/shifted evaluations;
- other fields handled by
ExecutionProof::to_bytes().
As a result, a file advertised as a proof artifact cannot be decoded by RecursiveProof::from_bytes() or independently verified through the library. In-process verification succeeds only because it uses the original in-memory object before serialization.
Evidence
- Local serializers:
crates/riscv/src/bin/prove-elf.rs:461, crates/riscv/src/bin/prove-boot.rs:835, and crates/evm/src/bin/prove-block.rs:739.
- Canonical round-trip encoding:
crates/zkp/src/recursive.rs:51-87.
- The local format starts with
MVMPROOF and little-endian fields; RecursiveProof::from_bytes() expects a big-endian length-prefixed ExecutionProof followed by the complete accumulator and optional state hashes.
Expected behavior
Proof files produced by CLI commands should round-trip through a public decoder and verify in a separate process.
Suggested resolution
- Replace the three local serializers with one shared, versioned envelope built around
RecursiveProof::to_bytes().
- Include scheme/curve identification and any constraint-system/version metadata needed for independent verification.
- Add a
verify-proof CLI or equivalent subcommands.
- Add integration tests: produce file -> restart/decode -> verify; reject truncation, corruption, wrong curve, and unknown versions.
Existing MVMPROOF v1 files should either receive a decoder/migration path or be explicitly declared unusable and superseded by a new version.
Description
prove-elf,prove-boot, andprove-blockwriteMVMPROOFfiles using duplicated localserialize_prooffunctions. Those functions do not use the canonicalRecursiveProof::to_bytes()format and no matching decoder exists.The custom encoding also omits proof data needed by current
RecursiveProof/ExecutionProofstructures, including:accumulator.scalar_acc;ExecutionProof::to_bytes().As a result, a file advertised as a proof artifact cannot be decoded by
RecursiveProof::from_bytes()or independently verified through the library. In-process verification succeeds only because it uses the original in-memory object before serialization.Evidence
crates/riscv/src/bin/prove-elf.rs:461,crates/riscv/src/bin/prove-boot.rs:835, andcrates/evm/src/bin/prove-block.rs:739.crates/zkp/src/recursive.rs:51-87.MVMPROOFand little-endian fields;RecursiveProof::from_bytes()expects a big-endian length-prefixedExecutionProoffollowed by the complete accumulator and optional state hashes.Expected behavior
Proof files produced by CLI commands should round-trip through a public decoder and verify in a separate process.
Suggested resolution
RecursiveProof::to_bytes().verify-proofCLI or equivalent subcommands.Existing
MVMPROOFv1 files should either receive a decoder/migration path or be explicitly declared unusable and superseded by a new version.