fix: use proper predicate keys derived from proof backend verifying keys#70
fix: use proper predicate keys derived from proof backend verifying keys#70
Conversation
|
Commit: 5237e04
|
Codecov Report❌ Patch coverage is
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…te predicate information
248e411 to
23f956f
Compare
| moho-runtime-impl = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" } | ||
| moho-runtime-interface = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" } | ||
| moho-types = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" } | ||
| moho-recursive-proof = { git = "https://github.com/alpenlabs/moho", rev = "18d515b3ff60b1f48e4070d0b4b9a5e7af82f99b" } |
There was a problem hiding this comment.
Critical: guest-moho still pins the old moho revision — causes SP1 CI failure
The workspace moho deps were bumped here to 18d515b, but guest-builder/sp1/guest-moho/Cargo.toml line 9 still references the old revision 28ef75c.
The host-side code now serializes inputs using the new moho types (StepMohoAttestation, StepMohoProof, RecursiveMohoProof), but the guest program deserializes them with the old types — causing an OffsetOutOfBounds SSZ deserialization panic inside the SP1 guest. This is the direct cause of the failing prover-perf (SP1) CI check.
# guest-builder/sp1/guest-moho/Cargo.toml line 9 — needs:
moho-recursive-proof = { git = "https://github.com/alpenlabs/moho", rev = "18d515b3ff60b1f48e4070d0b4b9a5e7af82f99b" }The corresponding guest-builder/sp1/guest-moho/Cargo.lock will also need to be regenerated.
| pub(crate) asm_predicate: PredicateKey, | ||
| pub(crate) moho_predicate: PredicateKey, | ||
| } | ||
|
|
There was a problem hiding this comment.
Suggestion: Consider consuming ProofBackend via pattern destructuring at the call site instead of field-by-field access. This makes the intent clearer and prevents accidental partial moves:
let ProofBackend { asm_host, moho_host, asm_predicate, moho_predicate } = ProofBackend::new()?;Minor — the current pub(crate) field approach works fine.
| /// [`ProofBackend::new`] and consumed by the proof orchestrator (hosts) and | ||
| /// the input builder (predicates). | ||
| pub(crate) struct ProofBackend { | ||
| pub(crate) asm_host: ProofHost, |
There was a problem hiding this comment.
Suggestion: Consider adding #[derive(Debug)] here (if ProofHost implements Debug). The workspace lints warn on missing_debug_implementations, and while pub(crate) structs are likely exempt, the derive would be consistent with the project's conventions and useful for logging/diagnostics during startup.
Description
PredicateKey::always_accept()with real predicate keys derived from each proof host's verifying key (SP1Groth16for sp1 builds,Bip340Schnorrfor native builds)ProofBackendstruct that centralizes zkvm-specific host construction and predicate key resolution behind feature gates, replacing scattered#[cfg]blocks in bootstrapStepMohoAttestation,StepMohoProof,RecursiveMohoProof) and bump moho dependency to 18d515bType of Change
Notes to Reviewers
This is built on top of alpenlabs/moho#79.
Checklist
Related Issues