Skip to content

prove-sbf and prove-slot ignore --output and discard generated proofs #2

Description

@blacks1ne

Description

Both Solana-facing proving binaries accept a documented --output argument but never use it:

  • crates/sbf/src/bin/prove-sbf.rs stores the value in _output_path at lines 34 and 42.
  • crates/sbf/src/bin/prove-slot.rs stores the value in _output_path at lines 149 and 168.

Neither binary serializes a proof or writes a file. Proofs are only verified in memory and then dropped. This contradicts the README, which documents sbf_proof.bin and slot_proof.bin output files.

Reproduction

After resolving the workspace's missing trusted-setup build blocker:

cargo run --release --bin prove-sbf -- \
  --asm $'mov64 r0, 1\nexit' \
  --output /tmp/sbf-proof.bin

test -e /tmp/sbf-proof.bin

The prover reports success, but the requested file is not created. Static inspection shows the same behavior in prove-slot.

Expected behavior

  • prove-sbf --output PATH writes the verified RecursiveProof to PATH.
  • prove-slot --output PATH writes a documented slot/transaction proof bundle to PATH, or rejects the option until a bundle format is defined.
  • Write failures produce a non-zero exit status.

Suggested resolution

Use the canonical RecursiveProof::to_bytes() encoding for individual proofs. For slot output, define a versioned container that associates each proof with its transaction signature/index and records failures or skipped instructions.

Add CLI integration tests that pass a temporary output path, decode the artifact, and verify it.

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