Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
34dc167
feat(stark): port GKR, sumcheck, and Lagrange kernel modules from fea…
MauroToscano Jul 21, 2026
08463ca
docs(gkr): LogUp-GKR port plan and analysis of PR #485 vs current main
MauroToscano Jul 21, 2026
b1e5c88
style(gkr): clippy op-ref and clone-on-copy fixes in ported modules
MauroToscano Jul 21, 2026
2a3c13b
feat(stark): LogUpMode::Gkr — lookup-layer adapter and single-source …
MauroToscano Jul 21, 2026
c249c16
feat(stark): GKR wire format — rkyv proof types and GkrMultiProof wra…
MauroToscano Jul 21, 2026
6c53036
feat(stark): wire LogUp-GKR into multi_prove / multi_verify
MauroToscano Jul 21, 2026
af41001
feat(prover): VM-level LogUp-GKR enablement — GkrVmProof + explicit e…
MauroToscano Jul 21, 2026
ebbba68
feat(cli): --logup-mode flag, defaulting to gkr on this branch
MauroToscano Jul 21, 2026
d4ceb2e
perf(gkr): parallelize the batch sumcheck and cut redundant work
MauroToscano Jul 21, 2026
d4e64fa
feat(recursion): GKR proofs through the recursion guest
MauroToscano Jul 21, 2026
f8a9236
feat(continuation): LogUp-GKR mode for the continuation pipeline
MauroToscano Jul 21, 2026
9611190
test(recursion): shrink the GKR continuation fixture epoch to 2^3 cycles
MauroToscano Jul 21, 2026
b968671
test(recursion): use the fibonacci fixture for the GKR continuation r…
MauroToscano Jul 21, 2026
1bf2708
docs(gkr): design for the linear input layer (leaf-binding fix, shape…
MauroToscano Jul 21, 2026
6fe035d
feat(gkr): linear input layer — the leaf-binding soundness fix (stage 1)
MauroToscano Jul 21, 2026
69d24cf
docs(gkr): stage-2 implementation spec — streamed deep layers (weight…
MauroToscano Jul 21, 2026
57ad8cf
feat(gkr): stage 2 — streamed deep layers via a DeepLayerOracle
MauroToscano Jul 21, 2026
837b458
perf(gkr): stream the deep k-bit rounds — nothing below N is material…
MauroToscano Jul 21, 2026
36164f6
perf(gkr): cache per-instance fingerprints for the streamed deep rounds
MauroToscano Jul 21, 2026
d4d4d3b
perf(gkr): stream/materialize threshold for deep layers
MauroToscano Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ RECURSION_VERIFIER_PRESETS := min blowup2 blowup4 blowup8
# `continuation` feature: verify a multi-epoch ContinuationProof bundle instead
# of a monolithic VmProof. Only the presets the benchmarks actually measure.
RECURSION_CONT_PRESETS := min blowup2 blowup4
# `gkr` feature: verify a LogUpMode::Gkr inner proof (GkrGuestInput blob;
# with `continuation`, a GkrContinuationProof bundle). Experimental — only the
# presets the GKR guest-cycle measurements use.
RECURSION_GKR_PRESETS := min blowup2
RECURSION_VERIFIER_ARTIFACTS := $(addprefix $(RECURSION_ARTIFACTS_DIR)/recursion-, $(addsuffix .elf, $(RECURSION_VERIFIER_PRESETS))) \
$(addprefix $(RECURSION_ARTIFACTS_DIR)/recursion-cont-, $(addsuffix .elf, $(RECURSION_CONT_PRESETS)))
$(addprefix $(RECURSION_ARTIFACTS_DIR)/recursion-cont-, $(addsuffix .elf, $(RECURSION_CONT_PRESETS))) \
$(addprefix $(RECURSION_ARTIFACTS_DIR)/recursion-gkr-, $(addsuffix .elf, $(RECURSION_GKR_PRESETS))) \
$(addprefix $(RECURSION_ARTIFACTS_DIR)/recursion-gkr-cont-, $(addsuffix .elf, $(RECURSION_GKR_PRESETS)))

# Override with: make ... SYSROOT_DIR=$HOME/.lambda-vm-sysroot
# to install the sysroot in a user-writable location and avoid sudo.
Expand Down Expand Up @@ -245,6 +251,22 @@ $(RECURSION_ARTIFACTS_DIR)/recursion-cont-$(1).elf: FORCE | prepare-sysroot $(RE
endef
$(foreach preset,$(RECURSION_CONT_PRESETS),$(eval $(call recursion_cont_verifier_rule,$(preset))))

# GKR variants: same crate, `gkr` feature on top of the preset feature ->
# recursion-gkr-<preset>-bench -> recursion-gkr-<preset>.elf.
define recursion_gkr_verifier_rule
$(RECURSION_ARTIFACTS_DIR)/recursion-gkr-$(1).elf: FORCE | prepare-sysroot $(RECURSION_ARTIFACTS_DIR)
$$(call build_guest_elf,$$(RECURSION_GUESTS_DIR)/recursion,recursion-gkr-$(1)-bench,--features "gkr $(1)")
endef
$(foreach preset,$(RECURSION_GKR_PRESETS),$(eval $(call recursion_gkr_verifier_rule,$(preset))))

# GKR continuation variants: `gkr` + `continuation` on top of the preset ->
# recursion-gkr-cont-<preset>-bench -> recursion-gkr-cont-<preset>.elf.
define recursion_gkr_cont_verifier_rule
$(RECURSION_ARTIFACTS_DIR)/recursion-gkr-cont-$(1).elf: FORCE | prepare-sysroot $(RECURSION_ARTIFACTS_DIR)
$$(call build_guest_elf,$$(RECURSION_GUESTS_DIR)/recursion,recursion-gkr-cont-$(1)-bench,--features "gkr continuation $(1)")
endef
$(foreach preset,$(RECURSION_GKR_PRESETS),$(eval $(call recursion_gkr_cont_verifier_rule,$(preset))))

clean-asm:
-rm -rf $(ASM_ARTIFACTS_DIR)

Expand Down
24 changes: 24 additions & 0 deletions bench_vs/lambda/recursion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ blowup8 = []
# memory-bounded inner prove) instead of a monolithic VmProof. Selects the
# `recursion-cont-<preset>-bench` bins below.
continuation = []
# Orthogonal to the presets: verify a LogUpMode::Gkr inner proof
# (GkrGuestInput blob). Composes with `continuation` to select the
# GkrContinuationGuestInput layout (`recursion-gkr-cont-<preset>-bench`).
gkr = []

# One distinctly named binary per preset (selected by its feature) so a parallel
# `make -j` builds them to different filenames — structurally race-free, no cp
Expand Down Expand Up @@ -60,6 +64,26 @@ name = "recursion-cont-blowup4-bench"
path = "src/main.rs"
required-features = ["continuation", "blowup4"]

[[bin]]
name = "recursion-gkr-min-bench"
path = "src/main.rs"
required-features = ["gkr", "min"]

[[bin]]
name = "recursion-gkr-blowup2-bench"
path = "src/main.rs"
required-features = ["gkr", "blowup2"]

[[bin]]
name = "recursion-gkr-cont-min-bench"
path = "src/main.rs"
required-features = ["gkr", "continuation", "min"]

[[bin]]
name = "recursion-gkr-cont-blowup2-bench"
path = "src/main.rs"
required-features = ["gkr", "continuation", "blowup2"]

[dependencies]
lambda-vm-prover = { path = "../../../prover", default-features = false, features = [
"profile-markers",
Expand Down
17 changes: 15 additions & 2 deletions bench_vs/lambda/recursion/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ compile_error!("select exactly one of the `min`/`blowup2`/`blowup4`/`blowup8` fe
all(feature = "blowup4", feature = "blowup8"),
))]
compile_error!("select exactly one of the `min`/`blowup2`/`blowup4`/`blowup8` features");
// `continuation` and `gkr` compose: together they select the
// `GkrContinuationGuestInput` layout (a GKR-mode continuation bundle).

/// The build preset fixing the inner `ProofOptions` (see the module docs).
#[cfg(feature = "min")]
Expand Down Expand Up @@ -88,16 +90,27 @@ pub fn main() -> ! {
// not self-enforcing here.
let options = PRESET.options();

#[cfg(not(feature = "continuation"))]
#[cfg(not(any(feature = "continuation", feature = "gkr")))]
let attestation = lambda_vm_prover::recursion::verify_and_attest_blob(blob, &options)
.expect("verify errored")
.expect("inner proof failed verification");

#[cfg(feature = "continuation")]
#[cfg(all(feature = "continuation", not(feature = "gkr")))]
let attestation = lambda_vm_prover::recursion::verify_continuation_and_attest(blob, &options)
.expect("verify errored")
.expect("inner continuation proof failed verification");

#[cfg(all(feature = "gkr", not(feature = "continuation")))]
let attestation = lambda_vm_prover::recursion::verify_and_attest_gkr_blob(blob, &options)
.expect("verify errored")
.expect("inner GKR proof failed verification");

#[cfg(all(feature = "gkr", feature = "continuation"))]
let attestation =
lambda_vm_prover::recursion::verify_gkr_continuation_and_attest(blob, &options)
.expect("verify errored")
.expect("inner GKR continuation proof failed verification");

lambda_vm_syscalls::syscalls::commit(&attestation);
lambda_vm_syscalls::syscalls::sys_halt();
}
Loading
Loading