Skip to content

feat(zkvm): state transition function proving using zkvm's - #531

Draft
Sahilgill24 wants to merge 8 commits into
lambdaclass:mainfrom
Sahilgill24:feat/zk-stf-proving
Draft

feat(zkvm): state transition function proving using zkvm's #531
Sahilgill24 wants to merge 8 commits into
lambdaclass:mainfrom
Sahilgill24:feat/zk-stf-proving

Conversation

@Sahilgill24

@Sahilgill24 Sahilgill24 commented Jul 21, 2026

Copy link
Copy Markdown

Description / Motivation

#156

What Changed

The approach is based on this doc ethlambda's stf proving using zkvm's.

Current Progress

  • added the StfInput type, which shall be used by the guest-program
  • scaffolded the sp1 guest program inside a new guest-program crate
  • prover core and prover backend for sp1 with a mock prover is complete

Verification Checklist

  • Ran make fmt — clean
  • Ran make lint (clippy with -D warnings) — clean
  • Ran cargo test --workspace --release — all passing

@Sahilgill24

Sahilgill24 commented Jul 21, 2026

Copy link
Copy Markdown
Author

Note

I will be updating and adding proper comments where ever necessary and also try to write a more idiomatic approach for the StfInput if possible, the current version is a basic scaffold as mentioned in the 1st step of the implementation plan in the doc.
Also will add more steps to the PR heading as well once sp1 integration is complete, currently on kept the progress status

Comment thread Cargo.toml Outdated
Comment thread crates/guest-program/sp1/src/main.rs Outdated
Comment thread crates/common/types/src/stf.rs Outdated
Comment thread crates/guest-program/sp1/src/main.rs Outdated
@Sahilgill24
Sahilgill24 force-pushed the feat/zk-stf-proving branch from e43aee5 to f4c5e96 Compare July 21, 2026 20:23
@Sahilgill24

Copy link
Copy Markdown
Author

Hey @MegaRedHand, for the commit#d62d221,

the zkVM target is specified for the guest program and it's dependencies, I have currently set the target inside the code in the types and metrics crate, but there might be other ways to do so like creating a different no-op module and setting it to the zkVM target. Could you have a look once and confirm which approach would better set with ethlambda's code design format.

@MegaRedHand

Copy link
Copy Markdown
Collaborator

Having a no-op module for metrics sounds better than having #[cfg(not(target_os = "zkvm"))] everywhere. But for crates/common/types/src/signature.rs, I think we should move the signatures logic to crypto instead of types (feel free to refactor this in another PR).

@Sahilgill24

Copy link
Copy Markdown
Author

Thanks, I will refactor the metrics and make a no-op metrics module as well.
I will open the refactor PR once this one is complete :)

@Sahilgill24

Sahilgill24 commented Jul 28, 2026

Copy link
Copy Markdown
Author

I will open the refactor PR once this one is complete :)

I think I would need to make this refactor first, so while testing out the prover, the prover has dependency conflicts with lean-sig (the prover runs naitvely, where as the guest runs for the zkvm target that's why guest had no such issues) , there are some temporary solutions, but I think as anyways a refactor needs to be done, I will complete that first :)

The changes were quite trivial for this signature logic port, made them here #541 .

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.

3 participants