Skip to content

feat(sdk): add proof deserialization from bytes#2821

Open
peter941221 wants to merge 1 commit into
succinctlabs:mainfrom
peter941221:peter/issue-2521-proof-from-bytes
Open

feat(sdk): add proof deserialization from bytes#2821
peter941221 wants to merge 1 commit into
succinctlabs:mainfrom
peter941221:peter/issue-2521-proof-from-bytes

Conversation

@peter941221

Copy link
Copy Markdown

Issue: #2521

Failure mechanism
SP1ProofWithPublicValues supported file-based save -> load, but did not expose a direct byte-slice deserialization entrypoint even though callers may already have the serialized proof bytes in memory.

Semantic change
Add SP1ProofWithPublicValues::from_bytes(&[u8]), preserve fallback compatibility with ProofFromNetwork, and make load(path) reuse the same byte-based decode path.

Preserved invariants
The proof struct layout is unchanged. Existing file-based loading behavior is preserved, including the fallback path for serialized ProofFromNetwork values that do not carry tee_proof.

Testing
cargo +nightly fmt --all
Added focused unit coverage for round-trip byte decoding and ProofFromNetwork fallback decoding.
Full local cargo check/test on this Windows machine is still blocked upstream by a missing protoc binary for sp1-prover-types and by Unix-only sp1-jit imports in crates/core/jit.

@peter941221 peter941221 force-pushed the peter/issue-2521-proof-from-bytes branch from ea9ce7c to 29d215d Compare May 27, 2026 04:33
@peter941221 peter941221 marked this pull request as ready for review May 29, 2026 10:16
@peter941221 peter941221 force-pushed the peter/issue-2521-proof-from-bytes branch from 29d215d to 80b9ffb Compare June 2, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant