Skip to content

Commit

Permalink
Make AirPublicInputs fields public
Browse files Browse the repository at this point in the history
  • Loading branch information
pefontana committed Nov 10, 2023
1 parent 22f08f5 commit cf5d221
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions vm/src/air_public_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ use crate::{

#[derive(Serialize, Debug)]
pub struct PublicMemoryEntry {
address: usize,
pub address: usize,
#[serde(serialize_with = "mem_value_serde::serialize")]
value: Option<Felt252>,
page: usize,
pub value: Option<Felt252>,
pub page: usize,
}

mod mem_value_serde {
Expand All @@ -39,9 +39,9 @@ mod mem_value_serde {
}

#[derive(Serialize, Debug)]
struct MemorySegmentAddresses {
begin_addr: usize,
stop_ptr: usize,
pub struct MemorySegmentAddresses {
pub begin_addr: usize,
pub stop_ptr: usize,
}

impl From<(usize, usize)> for MemorySegmentAddresses {
Expand All @@ -56,14 +56,14 @@ impl From<(usize, usize)> for MemorySegmentAddresses {

#[derive(Serialize, Debug)]
pub struct PublicInput<'a> {
layout: &'a str,
rc_min: isize,
rc_max: isize,
n_steps: usize,
memory_segments: HashMap<&'a str, MemorySegmentAddresses>,
public_memory: Vec<PublicMemoryEntry>,
pub layout: &'a str,
pub rc_min: isize,
pub rc_max: isize,
pub n_steps: usize,
pub memory_segments: HashMap<&'a str, MemorySegmentAddresses>,
pub public_memory: Vec<PublicMemoryEntry>,
#[serde(rename = "dynamic_params")]
layout_params: Option<&'a CairoLayout>,
pub layout_params: Option<&'a CairoLayout>,
}

impl<'a> PublicInput<'a> {
Expand Down

0 comments on commit cf5d221

Please sign in to comment.