Skip to content

Commit

Permalink
fix: remove hardcode (#184)
Browse files Browse the repository at this point in the history
* fix: remove hardcode

* fix: fmt
  • Loading branch information
eigmax authored Nov 18, 2024
1 parent 061d0a2 commit 7cd2e69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions prover/src/cpu/kernel/assembler.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::elf::Program;
use zkm_emulator::utils::get_block_path;

use crate::all_stark::NUM_PUBLIC_INPUT_USERDATA;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use std::{collections::HashMap, io::Read};
use zkm_emulator::utils::get_block_path;

#[derive(PartialEq, Eq, Debug, Serialize, Deserialize)]
pub struct Kernel {
Expand Down Expand Up @@ -55,12 +55,12 @@ impl Kernel {
let public_input = if let Some(first) = self.program.input_stream.first() {
// bincode::deserialize::<Vec<u8>>(first).expect("deserialization failed")
if first.is_empty() {
&vec![0u8; 32]
&vec![0u8; NUM_PUBLIC_INPUT_USERDATA]
} else {
first
}
} else {
&vec![0u8; 32]
&vec![0u8; NUM_PUBLIC_INPUT_USERDATA]
};

hasher.update(public_input);
Expand Down
1 change: 0 additions & 1 deletion runtime/entrypoint/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Ported from Entrypoint for SP1 zkVM.
#![feature(asm_experimental_arch)]
pub mod heap;
pub mod syscalls;
pub mod io {
Expand Down

0 comments on commit 7cd2e69

Please sign in to comment.