Skip to content

Commit

Permalink
fix commitment serialization
Browse files Browse the repository at this point in the history
Commitment was serialized differently at proving and verifying times.
  • Loading branch information
imikushin committed Jan 18, 2025
1 parent 7996ba8 commit 51979c9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions charms-spell-checker/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ use charms_data::{util, App};
pub fn main() {
// Read an input to the program.
let input_vec = sp1_zkvm::io::read_vec();

dbg!(input_vec.len());

let input: SpellProverInput = util::read(input_vec.as_slice()).unwrap();

dbg!(&input);

let output = run(input);

eprintln!("about to commit");

// Commit to the public values of the program.
sp1_zkvm::io::commit_slice(util::write(&output).unwrap().as_slice());
sp1_zkvm::io::commit(&output);
}

pub fn run(input: SpellProverInput) -> (String, NormalizedSpell) {
Expand Down
Binary file modified src/bin/charms-spell-checker
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub mod utils;

pub const SPELL_CHECKER_BINARY: &[u8] = include_bytes!("./bin/charms-spell-checker");

pub const SPELL_VK: &str = "0x0061d4c45041155bfb34ee39a01d47e21cc56baf69e4be25f1320d36eb19ff6c";
pub const SPELL_VK: &str = "0x0094c6013afd4d6ee47722ab5c557f695399b451d71b4495ea58165cb12864d6";

#[cfg(test)]
mod test {
Expand Down

0 comments on commit 51979c9

Please sign in to comment.