Skip to content

CLI proof artifacts are incomplete and incompatible with RecursiveProof::from_bytes #4

Description

@blacks1ne

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions