From cf5d221243036cff7a5414e32e7c1cfc849ff4e6 Mon Sep 17 00:00:00 2001 From: Pedro Fontana Date: Fri, 10 Nov 2023 13:42:16 -0300 Subject: [PATCH 1/3] Make AirPublicInputs fields public --- vm/src/air_public_input.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/vm/src/air_public_input.rs b/vm/src/air_public_input.rs index 3b909f0be5..670b687ba8 100644 --- a/vm/src/air_public_input.rs +++ b/vm/src/air_public_input.rs @@ -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, - page: usize, + pub value: Option, + pub page: usize, } mod mem_value_serde { @@ -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 { @@ -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, + 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, #[serde(rename = "dynamic_params")] - layout_params: Option<&'a CairoLayout>, + pub layout_params: Option<&'a CairoLayout>, } impl<'a> PublicInput<'a> { From 509bed067ef718e2fa622b71f68351446f17ee5a Mon Sep 17 00:00:00 2001 From: Pedro Fontana Date: Fri, 10 Nov 2023 15:19:52 -0300 Subject: [PATCH 2/3] make private the layout_params field --- vm/src/air_public_input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/air_public_input.rs b/vm/src/air_public_input.rs index 670b687ba8..24cd0f08af 100644 --- a/vm/src/air_public_input.rs +++ b/vm/src/air_public_input.rs @@ -63,7 +63,7 @@ pub struct PublicInput<'a> { pub memory_segments: HashMap<&'a str, MemorySegmentAddresses>, pub public_memory: Vec, #[serde(rename = "dynamic_params")] - pub layout_params: Option<&'a CairoLayout>, + layout_params: Option<&'a CairoLayout>, } impl<'a> PublicInput<'a> { From 0d52a281a6a6a06fffad5df5f8cbc8cfe473e900 Mon Sep 17 00:00:00 2001 From: Pedro Fontana Date: Mon, 13 Nov 2023 11:49:14 -0300 Subject: [PATCH 3/3] update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c72ebe7e..ae9ee9ffec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ #### Upcoming Changes +* feat: Make PublicInput fields public [#1474](https://github.com/lambdaclass/cairo-vm/pull/1474) + * chore: bump starknet-crypto to v0.6.1 [#1469](https://github.com/lambdaclass/cairo-vm/pull/1469) * feat: Implement the Serialize and Deserialize methods for the Program struct [#1458](https://github.com/lambdaclass/cairo-vm/pull/1458)