This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test calling a contract that uses keccak in testnet submodule (#…
…1110) * Updated submodule to latest commit * wip * Added a usage target to makefile (#1069) * Added a usage target to makefile * Fixed typo * Implement `NativeSyscallHandler::deploy` (#1106) * wip * Minor improvements + add test * Improve make clippy * Clippy + fmt * Update error messages * Add failure flag test * Fix typo * Apply suggestions + run formatter * Add llvm setup so we can run clippy with `cairo-native` feature * Fix * Remove todo * Use a proper class_hash * Fix test assertion --------- Co-authored-by: Juan Bono <[email protected]> * update cairo native to use gas consumed (#1102) * update cairo native to use gas consumed * gas consumed * update native rev * fix gas consumed * remove comments * fixes --------- Co-authored-by: Juan Bono <[email protected]> * Save `SierraProgram` + `ContractEntryPoints` instead of `SierraContractClass` in `CompiledProgram` (#1112) * Save Program + EntryPoints instead of ContractClass * clippy * `get_execution_info`test (#1067) * Added cairo native flag * Added cairo_native as dependency * Partial progress * Progress * Partial progress * Point to newly created branch on cairo native * Use updated version of cairo native and make test pass * Run test with storage_write and storage_read with cairo native * Tidy up code * Start unhardcoding stuff * Handle return values * Tidy up code a little * Added sierra programs cache * Add impl for emit_event and send_l1_message * Fix tests * Install LLVM on CI * Test * Test CI * Fix lint step * Save work in progress * Unhardcode calldata and entry point * Unhardcode more stuff * Fix test * Add basic implementation for call_contract * Add call to get_name to integration test * Make call_contract impl compile * Fix test * Pass the correct amount of builtins for every function * Improve test legibility * Write call_contract test skeleton * Finish writing test, still bugs to fix * implement get_execution_info, make increase_allowance work * More debugging * Basic test for call_contract working * More progress on testing ERC20 * More progress on test * Add caller and callee contracts * Fix call_contract test after merge * Fix callee address in tests * Polish some details * Remove use_cairo_native from TransactionExecutionContext * Write test skeleton * Add test contracts * Fix tests * Readd deleted contracts * Echo contract test passing * Update cairo compiler to version 2.2.0 * Calling another contract with events test is passing * Fix failing tests * Remove internal_calls field TODO in CallInfo returned by native_execute * Add event_emitter contract * Add cairo vm execution to the erc20 test for comparison * Add simple implementation for panics in native execution * Add some documentation in code * Assert equality between events, accessed_storage_keys and l1_l2 messages between native and vm runs * Add event_emitter contract * Remove print * Remove comments * Move native syscall handler to its own file * Add felt decode to string when program panics * Make cairo native an optional dependency behind a feature * Move execution result to cairo native * Add a README section explaining how to setup cairo native * Fix some clippy issues * Fix test compilation * CI test * Revert "CI test" This reverts commit 4631e5e. * CI test * Test * Test * Address comment about multiple cfgs * Remove unnecessary clone * Test * Test * Switch to special workflow for native integration tests * Fix workflow * Fix stuff after merge. * Fix clippy warnings. * Fix after merge. * Fix comments. * Fix `Makefile`. * Remove unused import. * Use transactional state. * update cairo native to llvm 17 and remove nightly requirement * update ci * upd ci * try to fix ci * use ubuntu on native * try to fix ci * not needed? * fix ci * update cairo native * fix nightly usage * try to fix ci * dont need a transactional state reader, simply clone the state reader * try to fix ci * format * fix again * fix if * values * force rebuild * make cache track cairo 2 version to trigger rebuilds * try no restore key * Added get_execution_info test * mend * fix test + update native latest * add deleted test * mend * delete unused struct --------- Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: Mariano Nicolini <[email protected]> Co-authored-by: Esteve Soler Arderiu <[email protected]> Co-authored-by: Edgar Luque <[email protected]> Co-authored-by: toni-calvin <[email protected]> * Cairo native: Implement library_call syscall (#1074) * cairo-native initial implementation of library call * rebase * clippy * fix * library call test * suggestion * Replace class native (#1105) * update cairo native to use gas consumed * implement native replace class syscall * gas consumed * add test * update native rev * add failing test * fix gas consumed * remove comments * minor changes * update cairo-native dependency * improve test * update latest native version * use add sierra contract to cache method * update latest native version * Replace class contract call native (#1115) * add last native version * add failing test * fix test * easier merge * fix test --------- Co-authored-by: Edgar Luque <[email protected]> * `get_block_hash` syscall native (#1048) * Added cairo native flag * Added cairo_native as dependency * Partial progress * Progress * Partial progress * Point to newly created branch on cairo native * Use updated version of cairo native and make test pass * Run test with storage_write and storage_read with cairo native * Tidy up code * Start unhardcoding stuff * Handle return values * Tidy up code a little * Added sierra programs cache * Add impl for emit_event and send_l1_message * Fix tests * Install LLVM on CI * Test * Test CI * Fix lint step * Save work in progress * Unhardcode calldata and entry point * Unhardcode more stuff * Fix test * Add basic implementation for call_contract * Add call to get_name to integration test * Make call_contract impl compile * Fix test * Pass the correct amount of builtins for every function * Improve test legibility * Write call_contract test skeleton * Finish writing test, still bugs to fix * implement get_execution_info, make increase_allowance work * More debugging * Basic test for call_contract working * More progress on testing ERC20 * More progress on test * Add caller and callee contracts * Fix call_contract test after merge * Fix callee address in tests * Polish some details * Remove use_cairo_native from TransactionExecutionContext * Write test skeleton * Add test contracts * Fix tests * Readd deleted contracts * Echo contract test passing * Update cairo compiler to version 2.2.0 * Calling another contract with events test is passing * Fix failing tests * Remove internal_calls field TODO in CallInfo returned by native_execute * Add event_emitter contract * Add cairo vm execution to the erc20 test for comparison * Add simple implementation for panics in native execution * Add some documentation in code * Assert equality between events, accessed_storage_keys and l1_l2 messages between native and vm runs * Add event_emitter contract * Remove print * Remove comments * Move native syscall handler to its own file * Add felt decode to string when program panics * Make cairo native an optional dependency behind a feature * Move execution result to cairo native * Add a README section explaining how to setup cairo native * Fix some clippy issues * Fix test compilation * CI test * Revert "CI test" This reverts commit 4631e5e. * CI test * Test * Test * Address comment about multiple cfgs * Remove unnecessary clone * Test * Test * Switch to special workflow for native integration tests * Fix workflow * Fix stuff after merge. * Fix clippy warnings. * Fix after merge. * Fix comments. * Fix `Makefile`. * Remove unused import. * WIP: Implementing get_block_hash syscall * Fix stuff. * Use transactional state. * update cairo native to llvm 17 and remove nightly requirement * update ci * upd ci * try to fix ci * use ubuntu on native * try to fix ci * not needed? * fix ci * update cairo native * fix nightly usage * try to fix ci * dont need a transactional state reader, simply clone the state reader * try to fix ci * format * fix again * fix if * values * force rebuild * make cache track cairo 2 version to trigger rebuilds * try no restore key * make get_hash_test syscall work with native and vm * update readme * implement get_block_hash on vm * fmt * fix tests on ci * update cairo native commit * fix more tests on ci * fix cairo native interface * try ci without cache * checout earlier * fix ci clippy * test rpc reader execution * try ci without cache * setup rustup home * make param passing to cairo native not obscure * try * try again * remove large packages * remove large dirs * remove android too * polly is needed * needs sudo * fix cov * fix test for now * format * cleanup ci file * use pyenv if available * nightly not needed in readme * add .sierra as generated to gitattributes * fix gitattributes * add casm too * implement get_block_hash_native * remove debug * add vm execution * merge * add less code * fix syscall * fmt * update native to last version * correctly insert sierra class into cache test * update latest native version * remove comments --------- Co-authored-by: Esteban Dimitroff Hódi <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: Mariano Nicolini <[email protected]> Co-authored-by: Esteve Soler Arderiu <[email protected]> Co-authored-by: toni-calvin <[email protected]> Co-authored-by: Edgar Luque <[email protected]> * Add logging to syscalls (#1111) * replace println by tracing::debug * replace MLIR with Cairo Native * fmt --------- Co-authored-by: juanbono <[email protected]> * Add error handling to `RpcState` (#1107) * Remove explicit and implicit unwraps in RpcCallInfo deserialization * Handle errors in RpcState::new_infura * push RpcStateError * Progress * Remove all unwraps from rpc code * Adapt tests * Clippy * Unify RpcError & RpcStateError * Guard potential panicks + fmt * clippy * Convert my_contract/target from a submodule to a regular directory * Add my_contract/target files * added test that check fees and return data * Add Keccak_contract folder * add test price and retdata * add test to check retdata and fee * wip * wip * wip * wip * wip * corrected format * removed unused files * Merge remote-tracking branch 'origin/rpc_state_reader-add-test-calling-contract-uses-keccak-testnet' --------- Co-authored-by: fannyguthmann <[email protected]> Co-authored-by: Iñaki Garay <[email protected]> Co-authored-by: fmoletta <[email protected]> Co-authored-by: Juan Bono <[email protected]> Co-authored-by: Edgar <[email protected]> Co-authored-by: ElFantasma <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: Mariano Nicolini <[email protected]> Co-authored-by: Esteve Soler Arderiu <[email protected]> Co-authored-by: toni-calvin <[email protected]> Co-authored-by: juanbono <[email protected]> Co-authored-by: Pedro Fontana <[email protected]>
- Loading branch information