-
Notifications
You must be signed in to change notification settings - Fork 53
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.11 #329 +/- ##
=======================================
Coverage ? 89.28%
=======================================
Files ? 51
Lines ? 9049
Branches ? 0
=======================================
Hits ? 8079
Misses ? 970
Partials ? 0 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments but they are not too important, lgtm 👍
) -> Result<(Address, CallResult), SyscallHandlerError> { | ||
let request = match syscall_request { | ||
SyscallRequest::Deploy(request) => request, | ||
_ => return Err(SyscallHandlerError::IncorrectSyscall("Deploy".to_string())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use an Error like the other we already have:
SyscallHandlerError::ExpectedDeploySyscall
or SyscallHandlerError::ExpectedDeployRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is easier to use a generic one which can receive the name of the syscall, otherwise we will have to add an option for each syscall and i considerate it boiler plate.
fn allocate_segment( | ||
&mut self, | ||
_vm: &mut VirtualMachine, | ||
_data: Vec<cairo_rs::types::relocatable::MaybeRelocatable>, | ||
) -> Result<Relocatable, SyscallHandlerError> { | ||
todo!(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fn allocate_segment( | |
&mut self, | |
_vm: &mut VirtualMachine, | |
_data: Vec<cairo_rs::types::relocatable::MaybeRelocatable>, | |
) -> Result<Relocatable, SyscallHandlerError> { | |
todo!(); | |
} | |
fn allocate_segment( | |
&mut self, | |
vm: &mut VirtualMachine, | |
data: Vec<MaybeRelocatable>, | |
) -> Result<Relocatable, SyscallHandlerError> { | |
let segment_start = vm.add_memory_segment(); | |
let segment_end = vm.write_arg(segment_start, &data)?; | |
let sub = segment_end.sub(&segment_start.to_owned().into())?; | |
let segment = (segment_start.to_owned(), sub); | |
self.read_only_segments.push(segment); | |
Ok(segment_start) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to_owned
?
* Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Add new contracts to include Poseidon for computing class hash (#242) * Warnings * Cargo fmt * fmt * Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Rolling back using the deprecated names * Fixing VM to use included builtin * Removing dead code * fmt * Renames fmt --------- Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> * rename BusinessLogicSyscallHandler (#268) * Fix cargo lock * Fix merge issues from main (#278) * Update to the new release of cairo-rs (#269) * Update cairo-rs version & Fix new changes * Change cair-lang to 0.11 & Fix serialization issue * Remove old modules from starknet_rs_py * Comment starknet_rs_py_test due to failure in CI * Add BusinessLogicSyscallHandlerStruct (#279) * add new BLSH struct * Rename old trait * use renamed trait * Use segment arena builtin (#283) * Initialized SegmentArenaBuiltin for CairoRunner in execution_entry_point * Updated error message expected in test * add empty syscallhandler trait (#321) * Rename deprecated syscall request/response structs/modules (#327) * Prefix syscalls with Deprecated * Add SyscallResponse common fields * Rename `syscall_response` -> `body` * Remove `failure_flag` field * Add utils::get_felt_range * Add missing variants * Refactor: separate deprecated BLSyscallHandler and SyscallHandler into own files (#332) * Refactor SyscallResponse for crate visibility and optionality in ResponseBody (#331) * Refactor for optionality in field ResponseBody * Change visibility level to crate * Add new version of syscall send_message_to_l1 (#324) * Rename old syscall functions & Add new syscall req * Add implementation FromPtr to new syscall * Add new syscall to SyscallHandler * Add incomplete impl of BLSyscall Handler * Add send_message_to_L1 for BLSyscall Handler * Refactor ResponseBody as optional field * Add missing changes * Declare version2 (#243) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Implement declare version 2 * Add version 2 of declare * Sierra compiler * comments to fix sierra * Add structs for version 2 * Port functions to hash internal declare v2 * Add hash value into declare v2 structure * comment function to fix in another ticker * Fix clippy errors * test * delete core lib * add test json * Order change and poseidon builtin * Remove old comments * delete debug info * Comment declare v2 test till sierra compiler is working * move ContractClass to ContractClasses::ContractClass * Update starknet-rs-py * rename ContractClass to DeprecatedContractClass * Revert commits move ContractClass to ContractClasses::ContractClass, Update starknet-rs-py and rename ContractClass to DeprecatedContractClass * fix conflicts of merge * Restore pre commit --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Pedro Fontana <pedro.fontana@lamdaclass.com> * Add storage_write syscall (#345) * Add StorageWriteRequest * Add storage_write syscall * Update syscall_storage_write * Adding CompiledContractClass (#353) * Moved current ContractClass to deprecated_conctract_class module and added Casm and Compiled Contract Classes * Used Box to prevent clippy warning * Made to_cairo_runner_program function public * Add `deploy` syscall (#329) * Add SyscallHandler::deploy related methods * Rename old FromPtr trait and add new one * Add request * Code restructuration * Fix format * merge main * Add todo comment * Add to do comment * Fix merge * fix clippy * Fix merge conflict * Add allocate_segment function --------- Co-authored-by: Milton <milton.scuderi@lambdaclass.com> Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> * Selector to syscall map (#346) * Adding map * Adding missing newline after copying file * Initializing with lazy_static * Format macro code * Implement storage cached state (#363) * Implement functins in state reader trait * Fix function calls and borrow checker warnings * Fix internals * Add field to InMemoryStateReader * Add setters * Update storage_write syscall (#354) * Add call_contract syscall for cairo 0.11 (#326) * Add SyscallHandler * Add call_contract signature * Add cairo-lang reference code * Add SyscallHandler.read_and_validate_syscall_request * Add BusinessLogicSyscallHandler.increment_syscall_count() * Add SyscallHandler.read_syscall_request() * Refactor: separate deprecated syscall handler in different files * Add BusinessLogicSyscallHandler.expected_syscall_ptr * Add Call parameters * Add execution_entry_point * Add call execution * Update SyscallHandler.call_contract * Fix compile errors * Remove unused file * Update syscall call_contract * Implement new `library_call` syscall and deprecate older one (#325) * Library call syscall merge * Change syscall ptr to request * Merge fixes * clippy fmt * Fix merge issues * Fix ExecutionEntryPoint::new --------- Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Nacho <amigoigna@gmail.com> * Add StateDiff.class_hash_to_compiled_class (#352) * Add StateDiff.class_hash_to_compiled_class * Implement squash for class_hash_to_compiled_class * Update StateDiff.class_hash_to_compiled_class data type * Add StateCache.compiled_class_hash * Update StateDiff.from_cached_state * Fix tests * Add TODO * Remove unused CompiledClass * add necessary step for actions to run on queue (#373) * Add storage read syscall (#340) * save work * save work * add impl of req/res structs * fix clippy errors * use syscallRequest instead of reloc ptr * remove unnecessary allow * New version of syscall `emit_event` (#323) * Implement utils::get_felt_range * New SyscallRequest:EmitEvent and deprecate old one * Implement new syscall emit_event * use syscallResponse instead of empty result * rename EmitEvent request struct * refactor emit_event method to use request struct instead of pointer * fix function call * remove unnecessary allow --------- Co-authored-by: SantiagoPittella <pittellasantiago@gmail.com> * Implement `syscall()` and minor refactors (#371) * Implement cairo-lang's syscall() * Update business_logic_syscall_handler.rs * Retrieve gas as u64 * clippy fmt * merge fixes * Addressing reviews * Merge conflicts fix * add get_block_timestamp implementation (#378) * get block number syscall (#379) * Refactor execution entrypoint execute (#369) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Cairo 1 Hint Processor crate (#384) * Cleanup * Update hint_processor.rs * Execute internal declare v2 (#377) * Execution function * Rewrite verify version * Fix clippy * Add Cairo1HintProcessor.alloc_segment (#388) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Add test less than hint (#389) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * add test_less_than_or_equal hint (#397) --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Santiago Pittella <87827390+SantiagoPittella@users.noreply.github.com> * Linear Split (#399) * Assert le is first arc excluded (#407) * AssertLeIsFirstArcExcluded * activate actions * Fix clippy * Optional hash (#380) * Accept hash as a parameter * Fix clippy * Add sqrt hint (#390) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * Add Cairo1HintProcessor.square_root --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Add div mod hint (#391) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * Add Cairo1HintProcessor.square_root * Add Cairo1HintProcessor.div_mod * Fix state api * Uint256 Div Mod hint (#398) * Uint256_div_mod hint for hintprocessor * clippy * Clippy fmt * Fix merge error * Update Cargo.toml newline * Remove duplicate function * clippy fmt * Remove unused match --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Assert le is second arc excluded (#412) * Add assert_le_is_second_excluded hint * Reverse order for clarity * Add assert le find small arcs (#406) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Alloc felt256 (#422) * Alloc Felt 256 Dict * Add dict manager mod * Change hint interface * Remove panic in exchange for HintError::CustomHint * Add DebugPrint (#439) * Add get next dict key (#424) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add get_next_dict_key * Remove expect * update cairo-vm to latest version (#440) * update cairo-vm to latest version * remove unwraps * remove felt packages * fix wrong identifier * fix tests * U256squareroot (#442) * Uint256 square root * Fic clippy * ShouldSkipSquashLoop (#448) * ShouldSkipSquashLoop * Remove unwrap * fix clippy * Change pre commit (#453) * Change pre commit * Change pre commit to format * Add felt252 dict read and write (#423) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add Felt252 Dict Write hint (#425) * Add Felt252 Dict Write hint * Merge fixes, clippy fmt * Merge conflict resolution fixes * Remove expect * Remove other expects * Remove unnecesary match --------- Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Nacho <amigoigna@gmail.com> * Add assert_all_accesses_used (#452) * RandomEcPoint (#413) * RandomEcPoint * Import macro * remove expects (#451) * remove expects * remove unnecessary error mapping * GetCurrentAccessDelta (#444) * GetCurrentAccessDelta * remove unwrap * Remove unwrap and expected * Delete comment * Dict Entry Init (#441) * Implement dict entry init * Connflict resolution * Remove expect() * Init squash data (#446) * Init squash data * change expect for hint error * Add field_sqrt (#414) * add AssertLtAssertValidInput hint (#456) * GetCurrentAccessIndex (#445) * Felt252 dict entry update (#443) * Felt252DictEntryUpdate * merge 0.11 * Add should_continue_squash_loop (#447) * Add should_continue_squash_loop * Update current_access_indices * Commit * `AssertAllKeysUsed` hint implementation (#458) * Hint implementation * Remove unused arg * fmt fix * Add assert current indices is empty (#449) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add get_next_dict_key * Remove expect * Add assert_current_access_indices_is_empty * assert_current_access_indices_is_empty fails when no current_access_indices * Implement alloc constant size (#469) * Implement assert le assert third arc excluded (#471) * New execute (#426) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Added entry_point_execution v2 * Added some TODO comments and fixed a clippy warning * Fixed repeated implementation of allocate_segment function --------- Co-authored-by: matias-gonz <maigonzalez@fi.uba.ar> * Remove duplicate function (#460) * remove cairo 1 hint processor crate (#479) * Refactor syscall handlers (#473) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Added entry_point_execution v2 * Added some TODO comments and fixed a clippy warning * Fixed repeated implementation of allocate_segment function * Big execution refactor * removed unused casm_contract_class * Removed unneeded dummy StarknetRunner creation to initialize os_context * Added support_reverted parameter to execution_entry_point and removed unused code * Fixed some PR review comments * Fixed some PR review comments --------- Co-authored-by: matias-gonz <maigonzalez@fi.uba.ar> * Add casm compilation (#470) * Store casm class in InternalDeclare * Move store casm implementantion * Refactor casm compilation and storage * Refactor casm test * Refactor casm test to add sierra compilation * Little refactor to avoid clones * Check that can retrieve casm contract class from storage * Change panic for unreachable * delete cairo-hint-processor * Modificate .ignore to avoid cairo/ and sierra files * Modificate Makefile to pin a cairo repo version * Modificate Makefile to fetch repo with https * Modificate Makefile to compile sierra in coverage * Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Rename bl syscall handler with deprecated * add objects.rs tests (#482) * add replace_class syscall to deprecated bl * rename syscall handler with deprecated * use builtin arena * refactor deprecated structs * add new files for bl * Add utils function * Delete starknet-rs-py (#494) * merge 0.11 * remove references to rs-py * fix tests * Remove references to rs-py * update starknet-api version * add newline at EOF * Remove references in storage related things * Remove unused function * change wrong unreachable code * remove unnecessary clone() * fix tests --------- Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Milton <milton.scuderi@lambdaclass.com> Co-authored-by: Roberto Catalan <rcatalan@itba.edu.ar> Co-authored-by: ElFantasma <estebandh@gmail.com> Co-authored-by: Tomás <47506558+MegaRedHand@users.noreply.github.com> Co-authored-by: Matías Ignacio González <maigonzalez@fi.uba.ar> Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: Pedro Fontana <pedro.fontana@lamdaclass.com> Co-authored-by: Amin Arria <arria.amin@gmail.com> Co-authored-by: mfachal <647731+mfachal@users.noreply.github.com> Co-authored-by: juanbono <juanbono94@gmail.com>
* Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Add new contracts to include Poseidon for computing class hash (#242) * Warnings * Cargo fmt * fmt * Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Rolling back using the deprecated names * Fixing VM to use included builtin * Removing dead code * fmt * Renames fmt --------- Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> * rename BusinessLogicSyscallHandler (#268) * Fix cargo lock * Fix merge issues from main (#278) * Update to the new release of cairo-rs (#269) * Update cairo-rs version & Fix new changes * Change cair-lang to 0.11 & Fix serialization issue * Remove old modules from starknet_rs_py * Comment starknet_rs_py_test due to failure in CI * Add BusinessLogicSyscallHandlerStruct (#279) * add new BLSH struct * Rename old trait * use renamed trait * Use segment arena builtin (#283) * Initialized SegmentArenaBuiltin for CairoRunner in execution_entry_point * Updated error message expected in test * add empty syscallhandler trait (#321) * Rename deprecated syscall request/response structs/modules (#327) * Prefix syscalls with Deprecated * Add SyscallResponse common fields * Rename `syscall_response` -> `body` * Remove `failure_flag` field * Add utils::get_felt_range * Add missing variants * Refactor: separate deprecated BLSyscallHandler and SyscallHandler into own files (#332) * Refactor SyscallResponse for crate visibility and optionality in ResponseBody (#331) * Refactor for optionality in field ResponseBody * Change visibility level to crate * Add new version of syscall send_message_to_l1 (#324) * Rename old syscall functions & Add new syscall req * Add implementation FromPtr to new syscall * Add new syscall to SyscallHandler * Add incomplete impl of BLSyscall Handler * Add send_message_to_L1 for BLSyscall Handler * Refactor ResponseBody as optional field * Add missing changes * Declare version2 (#243) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * Implement declare version 2 * Add version 2 of declare * Sierra compiler * comments to fix sierra * Add structs for version 2 * Port functions to hash internal declare v2 * Add hash value into declare v2 structure * comment function to fix in another ticker * Fix clippy errors * test * delete core lib * add test json * Order change and poseidon builtin * Remove old comments * delete debug info * Comment declare v2 test till sierra compiler is working * move ContractClass to ContractClasses::ContractClass * Update starknet-rs-py * rename ContractClass to DeprecatedContractClass * Revert commits move ContractClass to ContractClasses::ContractClass, Update starknet-rs-py and rename ContractClass to DeprecatedContractClass * fix conflicts of merge * Restore pre commit --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Pedro Fontana <pedro.fontana@lamdaclass.com> * Add storage_write syscall (#345) * Add StorageWriteRequest * Add storage_write syscall * Update syscall_storage_write * Adding CompiledContractClass (#353) * Moved current ContractClass to deprecated_conctract_class module and added Casm and Compiled Contract Classes * Used Box to prevent clippy warning * Made to_cairo_runner_program function public * Add `deploy` syscall (#329) * Add SyscallHandler::deploy related methods * Rename old FromPtr trait and add new one * Add request * Code restructuration * Fix format * merge main * Add todo comment * Add to do comment * Fix merge * fix clippy * Fix merge conflict * Add allocate_segment function --------- Co-authored-by: Milton <milton.scuderi@lambdaclass.com> Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> * Selector to syscall map (#346) * Adding map * Adding missing newline after copying file * Initializing with lazy_static * Format macro code * Implement storage cached state (#363) * Implement functins in state reader trait * Fix function calls and borrow checker warnings * Fix internals * Add field to InMemoryStateReader * Add setters * Update storage_write syscall (#354) * Add call_contract syscall for cairo 0.11 (#326) * Add SyscallHandler * Add call_contract signature * Add cairo-lang reference code * Add SyscallHandler.read_and_validate_syscall_request * Add BusinessLogicSyscallHandler.increment_syscall_count() * Add SyscallHandler.read_syscall_request() * Refactor: separate deprecated syscall handler in different files * Add BusinessLogicSyscallHandler.expected_syscall_ptr * Add Call parameters * Add execution_entry_point * Add call execution * Update SyscallHandler.call_contract * Fix compile errors * Remove unused file * Update syscall call_contract * Implement new `library_call` syscall and deprecate older one (#325) * Library call syscall merge * Change syscall ptr to request * Merge fixes * clippy fmt * Fix merge issues * Fix ExecutionEntryPoint::new --------- Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Nacho <amigoigna@gmail.com> * Add StateDiff.class_hash_to_compiled_class (#352) * Add StateDiff.class_hash_to_compiled_class * Implement squash for class_hash_to_compiled_class * Update StateDiff.class_hash_to_compiled_class data type * Add StateCache.compiled_class_hash * Update StateDiff.from_cached_state * Fix tests * Add TODO * Remove unused CompiledClass * add necessary step for actions to run on queue (#373) * Add storage read syscall (#340) * save work * save work * add impl of req/res structs * fix clippy errors * use syscallRequest instead of reloc ptr * remove unnecessary allow * New version of syscall `emit_event` (#323) * Implement utils::get_felt_range * New SyscallRequest:EmitEvent and deprecate old one * Implement new syscall emit_event * use syscallResponse instead of empty result * rename EmitEvent request struct * refactor emit_event method to use request struct instead of pointer * fix function call * remove unnecessary allow --------- Co-authored-by: SantiagoPittella <pittellasantiago@gmail.com> * Implement `syscall()` and minor refactors (#371) * Implement cairo-lang's syscall() * Update business_logic_syscall_handler.rs * Retrieve gas as u64 * clippy fmt * merge fixes * Addressing reviews * Merge conflicts fix * add get_block_timestamp implementation (#378) * get block number syscall (#379) * Refactor execution entrypoint execute (#369) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Cairo 1 Hint Processor crate (#384) * Cleanup * Update hint_processor.rs * Execute internal declare v2 (#377) * Execution function * Rewrite verify version * Fix clippy * Add Cairo1HintProcessor.alloc_segment (#388) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Add test less than hint (#389) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * add test_less_than_or_equal hint (#397) --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Santiago Pittella <87827390+SantiagoPittella@users.noreply.github.com> * Linear Split (#399) * Assert le is first arc excluded (#407) * AssertLeIsFirstArcExcluded * activate actions * Fix clippy * Optional hash (#380) * Accept hash as a parameter * Fix clippy * Add sqrt hint (#390) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * Add Cairo1HintProcessor.square_root --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Add div mod hint (#391) * Cleanup * Update hint_processor.rs * Add Cairo1HintProcessor.alloc_segment * Fix merge * Add Cairo1HintProcessor.test_less_than * Add Cairo1HintProcessor.square_root * Add Cairo1HintProcessor.div_mod * Fix state api * Uint256 Div Mod hint (#398) * Uint256_div_mod hint for hintprocessor * clippy * Clippy fmt * Fix merge error * Update Cargo.toml newline * Remove duplicate function * clippy fmt * Remove unused match --------- Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> * Assert le is second arc excluded (#412) * Add assert_le_is_second_excluded hint * Reverse order for clarity * Add assert le find small arcs (#406) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Alloc felt256 (#422) * Alloc Felt 256 Dict * Add dict manager mod * Change hint interface * Remove panic in exchange for HintError::CustomHint * Add DebugPrint (#439) * Add get next dict key (#424) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add get_next_dict_key * Remove expect * update cairo-vm to latest version (#440) * update cairo-vm to latest version * remove unwraps * remove felt packages * fix wrong identifier * fix tests * U256squareroot (#442) * Uint256 square root * Fic clippy * ShouldSkipSquashLoop (#448) * ShouldSkipSquashLoop * Remove unwrap * fix clippy * Change pre commit (#453) * Change pre commit * Change pre commit to format * Add felt252 dict read and write (#423) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add Felt252 Dict Write hint (#425) * Add Felt252 Dict Write hint * Merge fixes, clippy fmt * Merge conflict resolution fixes * Remove expect * Remove other expects * Remove unnecesary match --------- Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Nacho <amigoigna@gmail.com> * Add assert_all_accesses_used (#452) * RandomEcPoint (#413) * RandomEcPoint * Import macro * remove expects (#451) * remove expects * remove unnecessary error mapping * GetCurrentAccessDelta (#444) * GetCurrentAccessDelta * remove unwrap * Remove unwrap and expected * Delete comment * Dict Entry Init (#441) * Implement dict entry init * Connflict resolution * Remove expect() * Init squash data (#446) * Init squash data * change expect for hint error * Add field_sqrt (#414) * add AssertLtAssertValidInput hint (#456) * GetCurrentAccessIndex (#445) * Felt252 dict entry update (#443) * Felt252DictEntryUpdate * merge 0.11 * Add should_continue_squash_loop (#447) * Add should_continue_squash_loop * Update current_access_indices * Commit * `AssertAllKeysUsed` hint implementation (#458) * Hint implementation * Remove unused arg * fmt fix * Add assert current indices is empty (#449) * Add get_segment_arena_index * Add assert_le_find_small_arcs * Add base hint * Add Cairo1HintProcessor.read_dict * Add get_next_dict_key * Remove expect * Add assert_current_access_indices_is_empty * assert_current_access_indices_is_empty fails when no current_access_indices * Implement alloc constant size (#469) * Implement assert le assert third arc excluded (#471) * New execute (#426) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Added entry_point_execution v2 * Added some TODO comments and fixed a clippy warning * Fixed repeated implementation of allocate_segment function --------- Co-authored-by: matias-gonz <maigonzalez@fi.uba.ar> * Remove duplicate function (#460) * remove cairo 1 hint processor crate (#479) * Refactor syscall handlers (#473) * Refactor StateReader.get_compiled_class * Remove unwrap * Add _execute_version0_class * Update InternalDeclare * Fix compile error * Revert "Fix compile error" This reverts commit 32fdc99. * Revert fix * Revert "Update InternalDeclare" This reverts commit 726b09e. * Remove get_compiled_classes * Fix get_compiled_class * Fix get_compiled_class * Move deprecated/casm branch execution to execute() * Added entry_point_execution v2 * Added some TODO comments and fixed a clippy warning * Fixed repeated implementation of allocate_segment function * Big execution refactor * removed unused casm_contract_class * Removed unneeded dummy StarknetRunner creation to initialize os_context * Added support_reverted parameter to execution_entry_point and removed unused code * Fixed some PR review comments * Fixed some PR review comments --------- Co-authored-by: matias-gonz <maigonzalez@fi.uba.ar> * Added Cairo1HintProcessor * removed unused casm_contract_class * add compile_hint impl * Add casm compilation (#470) * Store casm class in InternalDeclare * Move store casm implementantion * Refactor casm compilation and storage * Refactor casm test * Refactor casm test to add sierra compilation * Little refactor to avoid clones * Check that can retrieve casm contract class from storage * Change panic for unreachable * delete cairo-hint-processor * Modificate .ignore to avoid cairo/ and sierra files * Modificate Makefile to pin a cairo repo version * Modificate Makefile to fetch repo with https * Modificate Makefile to compile sierra in coverage * Added System Call Hints processing * Migrate to cairo 0.11 (#234) * Migrate to cairo 0.11 * Fix toml in starknet-rs-py * Change layout * add test and update deps * add comments * Rename bl syscall handler with deprecated * add objects.rs tests (#482) * add replace_class syscall to deprecated bl * rename syscall handler with deprecated * use builtin arena * refactor deprecated structs * add new files for bl * Add utils function * Delete starknet-rs-py (#494) * Working execution_entrypoint for cairo_1 * merge 0.11 * remove references to rs-py * fix tests * Improved code based on PR review * Improved code based on PR review * Delete remaining starknet-rs-py files (#497) * Fixing some Makefile targts * Fixing some Makefile targts * Fixing some Makefile targtes * Delete devnet docs (#499) * Delete devnet documentation * Remove script add-funds.sh * Re add script add-funds.sh * remove add_funds.sh --------- Co-authored-by: juanbono <juanbono94@gmail.com> * Remove references to rs-py * update starknet-api version * add newline at EOF * Process entrypoint builtins in `ExecuteEntryPoint::_execute` (#503) * Add fn to pasrse BuiltinNames from String * Rename fn and add it to _execute * Clippy * Remove references in storage related things * Iterating entrypoint_args * Remove unused function * change wrong unreachable code * remove unnecessary clone() * Properly advance syscall_ptr after fetching gas & selector (#507) * fix tests * Delete repeated cairo1 program * Remove `DeprecatedSyscallHandler` trait (#484) * Remove DeprecatedSyscallHandler trait * Remove trait `SyscallHandler` (#492) * Remove unused trait SyscallHandler * Move methods to BusinessLogicSyscallHandler * Misc fixes --------- Co-authored-by: Esteban Dimitroff Hódi <esteban.dimitroff@entropy1729.com> --------- Co-authored-by: mmsc2 <88055861+mmsc2@users.noreply.github.com> Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> Co-authored-by: Santiago Pittella <87827390+SantiagoPittella@users.noreply.github.com> Co-authored-by: Milton <milton.scuderi@lambdaclass.com> Co-authored-by: Roberto Catalan <rcatalan@itba.edu.ar> Co-authored-by: Tomás <47506558+MegaRedHand@users.noreply.github.com> Co-authored-by: Matías Ignacio González <maigonzalez@fi.uba.ar> Co-authored-by: Nacho <amigoigna@gmail.com> Co-authored-by: Pedro Fontana <pedro.fontana@lamdaclass.com> Co-authored-by: Amin Arria <arria.amin@gmail.com> Co-authored-by: SantiagoPittella <pittellasantiago@gmail.com> Co-authored-by: juanbono <juanbono94@gmail.com> Co-authored-by: mfachal <647731+mfachal@users.noreply.github.com> Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Closes: #287