Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

* chore: bump pip `cairo-lang` 0.13.3 [#1884](https://github.com/lambdaclass/cairo-vm/pull/1884)

* chore: [#1880](https://github.com/lambdaclass/cairo-vm/pull/1880):
* Refactor vm crate to make it possible to use hint extension feature for nested programs with hints.

#### [2.0.0-rc1] - 2024-11-20

* feat: add `EvalCircuit` and `TestLessThanOrEqualAddress` hints [#1843](https://github.com/lambdaclass/cairo-vm/pull/1843)
Expand Down
16 changes: 8 additions & 8 deletions vm/src/types/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ use arbitrary::{Arbitrary, Unstructured};
// failures.
// Fields in `Program` (other than `SharedProgramData` itself) are used by the main logic.
#[derive(Clone, Default, Debug, PartialEq, Eq)]
pub(crate) struct SharedProgramData {
pub struct SharedProgramData {
pub(crate) data: Vec<MaybeRelocatable>,
pub(crate) hints_collection: HintsCollection,
pub hints_collection: HintsCollection,
pub(crate) main: Option<usize>,
//start and end labels will only be used in proof-mode
pub(crate) start: Option<usize>,
pub(crate) end: Option<usize>,
pub(crate) error_message_attributes: Vec<Attribute>,
pub(crate) instruction_locations: Option<HashMap<usize, InstructionLocation>>,
pub(crate) identifiers: HashMap<String, Identifier>,
pub(crate) reference_manager: Vec<HintReference>,
pub reference_manager: Vec<HintReference>,
}

#[cfg(feature = "test_utils")]
Expand Down Expand Up @@ -107,13 +107,13 @@ impl<'a> Arbitrary<'a> for SharedProgramData {
}

#[derive(Clone, Default, Debug, PartialEq, Eq)]
pub(crate) struct HintsCollection {
hints: Vec<HintParams>,
pub struct HintsCollection {
pub hints: Vec<HintParams>,
/// This maps a PC to the range of hints in `hints` that correspond to it.
#[cfg(not(feature = "extensive_hints"))]
pub(crate) hints_ranges: Vec<HintRange>,
#[cfg(feature = "extensive_hints")]
pub(crate) hints_ranges: HashMap<Relocatable, HintRange>,
pub hints_ranges: HashMap<Relocatable, HintRange>,
}

impl HintsCollection {
Expand Down Expand Up @@ -200,8 +200,8 @@ pub type HintRange = (usize, NonZeroUsize);
#[cfg_attr(feature = "test_utils", derive(Arbitrary))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Program {
pub(crate) shared_program_data: Arc<SharedProgramData>,
pub(crate) constants: HashMap<String, Felt252>,
pub shared_program_data: Arc<SharedProgramData>,
pub constants: HashMap<String, Felt252>,
pub(crate) builtins: Vec<BuiltinName>,
}

Expand Down
Loading