diff --git a/.github/workflows/hint_accountant.yml b/.github/workflows/hint_accountant.yml index a73d2bb272..e8a418c313 100644 --- a/.github/workflows/hint_accountant.yml +++ b/.github/workflows/hint_accountant.yml @@ -17,6 +17,8 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Checkout uses: actions/checkout@v3 + - name: Check Build + run: cargo build -p hint_accountant - name: Run the hint accounting script run: cargo r -p hint_accountant | tee comment.md - name: Update comment in tracking issue diff --git a/hint_accountant/src/main.rs b/hint_accountant/src/main.rs index e1e1af8de0..17ee5dcf18 100644 --- a/hint_accountant/src/main.rs +++ b/hint_accountant/src/main.rs @@ -1,5 +1,6 @@ #![deny(warnings)] #![forbid(unsafe_code)] +use cairo_vm::stdlib::collections::{HashMap, HashSet}; use cairo_vm::{ hint_processor::{ builtin_hint_processor::builtin_hint_processor_definition::BuiltinHintProcessor, @@ -8,8 +9,8 @@ use cairo_vm::{ serde::deserialize_program::ApTracking, types::exec_scope::ExecutionScopes, vm::{errors::hint_errors::HintError, vm_core::VirtualMachine}, - with_std::collections::{HashMap, HashSet}, }; + use serde::Deserialize; use serde_json::Value; diff --git a/hint_accountant/whitelists/cairo_secp.json b/hint_accountant/whitelists/cairo_secp.json index 5524324efe..73315e0703 100644 --- a/hint_accountant/whitelists/cairo_secp.json +++ b/hint_accountant/whitelists/cairo_secp.json @@ -87,6 +87,13 @@ "x = pack(ids.x, PRIME) % SECP_P" ] }, + { + "allowed_expressions": [], + "hint_lines": [ + "from starkware.cairo.common.cairo_secp.secp_utils import pack", + "value = pack(ids.x, PRIME) % SECP_P" + ] + }, { "allowed_expressions": [], "hint_lines": [ diff --git a/hint_accountant/whitelists/latest.json b/hint_accountant/whitelists/latest.json index cedd734e31..6e31f75cee 100644 --- a/hint_accountant/whitelists/latest.json +++ b/hint_accountant/whitelists/latest.json @@ -276,18 +276,6 @@ "ids.multiplicities = segments.gen_arg([len(positions_dict[k]) for k in output])" ] }, - { - "allowed_expressions": [], - "hint_lines": [ - "from starkware.cairo.common.keccak_utils.keccak_utils import keccak_func", - "_keccak_state_size_felts = int(ids.KECCAK_STATE_SIZE_FELTS)", - "assert 0 <= _keccak_state_size_felts < 100", - "", - "output_values = keccak_func(memory.get_range(", - " ids.keccak_ptr - _keccak_state_size_felts, _keccak_state_size_felts))", - "segments.write_arg(ids.keccak_ptr, output_values)" - ] - }, { "allowed_expressions": [], "hint_lines": [ @@ -419,6 +407,18 @@ "segments.write_arg(ids.res.address_, split(value))" ] }, + { + "allowed_expressions": [], + "hint_lines": [ + "from starkware.cairo.common.keccak_utils.keccak_utils import keccak_func", + "_keccak_state_size_felts = int(ids.KECCAK_STATE_SIZE_FELTS)", + "assert 0 <= _keccak_state_size_felts < 100", + "", + "output_values = keccak_func(memory.get_range(", + " ids.keccak_ptr - _keccak_state_size_felts, _keccak_state_size_felts))", + "segments.write_arg(ids.keccak_ptr, output_values)" + ] + }, { "allowed_expressions": [], "hint_lines": [ @@ -887,13 +887,13 @@ { "allowed_expressions": [], "hint_lines": [ - "syscall_handler.send_message_to_l1(segments=segments, syscall_ptr=ids.syscall_ptr)" + "syscall_handler.replace_class(segments=segments, syscall_ptr=ids.syscall_ptr)" ] }, { "allowed_expressions": [], "hint_lines": [ - "syscall_handler.replace_class(segments=segments, syscall_ptr=ids.syscall_ptr)" + "syscall_handler.send_message_to_l1(segments=segments, syscall_ptr=ids.syscall_ptr)" ] }, { diff --git a/vm/src/lib.rs b/vm/src/lib.rs index 1d60dfaebf..178ceb94c3 100644 --- a/vm/src/lib.rs +++ b/vm/src/lib.rs @@ -20,7 +20,7 @@ include!("./with_std.rs"); #[cfg(not(feature = "std"))] include!("./without_std.rs"); -mod stdlib { +pub mod stdlib { pub mod collections { #[cfg(feature = "std")] pub use crate::with_std::collections::*;