Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AirPublicInputs fields public #1474

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the prover side, we don't really need the layout params as public, at least for the moment. With the name which appears in the layout field should be ok 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!
Done 509bed0

}

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