From 9844d088c9297d586b4b3f7ef62bee3b3a27612d Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Tue, 28 Jan 2025 13:19:27 +0200 Subject: feat(zkvms/sp1): Adapt to new input type --- zkvms/sp1/host/src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'zkvms/sp1/host/src') diff --git a/zkvms/sp1/host/src/main.rs b/zkvms/sp1/host/src/main.rs index 28cc319..ef069fb 100644 --- a/zkvms/sp1/host/src/main.rs +++ b/zkvms/sp1/host/src/main.rs @@ -1,16 +1,14 @@ -use zkvms_host_io::{read_args, RunType::{ Execute, Prove, Verify }}; +use zkvms_host_io::{Input, foreach_input_field, read_args, RunType::{ Execute, Prove, Verify }}; use sp1_sdk::{ProverClient, EnvProver, SP1Stdin, SP1ProofWithPublicValues, SP1VerifyingKey}; /// The ELF (executable and linkable format) file for the Succinct RISC-V zkVM. pub const FIBONACCI_ELF: &[u8] = include_bytes!("./guest"); -type Input = (Vec>, u32, Vec>); - -fn build_stdin((graph, colors, coloring): &Input) -> SP1Stdin { +fn build_stdin(input: &Input) -> SP1Stdin { let mut stdin = SP1Stdin::new(); - stdin.write(&graph); - stdin.write(&colors); - stdin.write(&coloring); + foreach_input_field!{ + stdin.write(&input.yield); + } stdin } -- cgit v1.2.3