Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Apr 15, 2024
1 parent 0dcbe84 commit d968eaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions jolt-core/src/host/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ use self::analyze::ProgramSummary;

pub mod analyze;

const DEFAULT_MEMORY_SIZE: usize = 10 * 1024 * 1024;
const DEFAULT_STACK_SIZE: usize = 4096;

#[derive(Clone)]
pub struct Program {
guest: String,
Expand Down Expand Up @@ -148,7 +145,7 @@ impl Program {
self.build();
let elf = self.elf.unwrap();
let (trace, io_device) =
tracer::trace(&elf, self.input, self.max_input_size, self.max_output_size);
tracer::trace(&elf, &self.input, self.max_input_size, self.max_output_size);

let bytecode_trace: Vec<BytecodeRow> = trace
.par_iter()
Expand Down Expand Up @@ -195,7 +192,7 @@ impl Program {
pub fn trace_analyze<F: PrimeField>(mut self) -> ProgramSummary {
self.build();
let elf = self.elf.as_ref().unwrap();
let (raw_trace, _) = tracer::trace(&elf, self.input, self.max_input_size, self.max_output_size);
let (raw_trace, _) = tracer::trace(&elf, &self.input, self.max_input_size, self.max_output_size);

let (bytecode, memory_init) = self.decode();
let (io_device, bytecode_trace, instruction_trace, memory_trace, circuit_flags) =
Expand Down
4 changes: 2 additions & 2 deletions tracer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::decode::decode_raw;
#[tracing::instrument(skip_all)]
pub fn trace(
elf: &PathBuf,
inputs: Vec<u8>,
inputs: &[u8],
input_size: u64,
output_size: u64,
) -> (Vec<RVTraceRow>, JoltDevice) {
Expand All @@ -33,7 +33,7 @@ pub fn trace(
emulator.update_xlen(get_xlen());

let mut jolt_device = JoltDevice::new(input_size, output_size);
jolt_device.inputs = inputs;
jolt_device.inputs = inputs.to_vec();
emulator.get_mut_cpu().get_mut_mmu().jolt_device = jolt_device;

let mut elf_file = File::open(elf).unwrap();
Expand Down

0 comments on commit d968eaf

Please sign in to comment.