Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstract Felt Type so that we can have different implementation that …
…uses different big int libraries (#630) * Add felt and field types * Add felt and field types * Add operations * Changes to Structure * Update felt.rs * Change bigint to felt instruction * Change bigint to felt run_context * Make new method take integer param * Add and comment out ops; fix new signature * Use on * Remove bigint from macros * Remove bigint from memory * Remove unwrap * Remove bigint from utils * Change BigInt to Felt instruction * Change BigInt to Felt hint proce def * Change BigInt to Felt decoder * Change BigInt to Felt vm_core * More work on macros * Remove field * Fix imports * Remove Bigint from deserialize * Remove BigInt straggelers * Change BigInt to Felt hint proc utils * Update relocatable.rs * Change BigInt to Felt blake2s_utils * Change BigInt3 to Felt * Replace BigInt in hint_utils * Remove BigInt keccak * Replace BigInt in dict manager * Remove BigInt find_elem_hint * Remove bigint keccak hints * Add new functions * Remove Bigint from math utils * Remove bigint from memory cp and set * Remove field from error * Remove Bigint from range check * Remobe bigint pow, segments * Remove Bigint set hint * Remove BigInt * Remove bigint from usor hints * Remove bigint uint256 * Various replacements * Felt ops and fmt * Add comment * WIP * Add needed deps, Fix some std::ops impls * fix more std::ops and get it to compile * enable all tests * use the felt type from the felt library * make felt Add generic over into bigint * add Sub for usize - felt * Add to_str_radix to felt * fix felt tests * add Sub u32 - Felt because its needed in some places * Use felt in cairo_runner * fix vm_memory/memory tests * Add abs to felt * fix various issues in builtin_runner * fix to_field_element * add Neg to felt * partially port math,ec_utils,segments hints from bigint to felt * format * remove some clones, fix clippy warnings * assert the felt type implements the proper traits * implement more traits * Solve conflicts on main code * Main code is compiling * Fix macro import errors; Fix some tests * Unit tests now compile * Fix some math hint bugs * fix some errors and clippy warnings * add ibig dependency and create the module * Add felt neg test * Debug secp * Save work * Fix secp bugs * Remove clones; use lto fat * Fix misc unit tests; fix big assert_le_felt * Fix sqrt bug * Unit & integration tests work * Fix tests * Fix clippy warnings * Extend tratis check * Add missing sub checks * Add bench; remove ibig from branch * Reduce number * Remove dependency * Reverse bad changes * Merge with main * Move felt_str macro * Shorten From impls with macros * Remove benchmark * Remove monostate dep * Expand from macro * Change Felt internal type to BigUint * Use Integer trait * Use primitive instead of calling 'one' * Use primitive instead of calling 'one' * Use primitive instead of calling 'one' * Use primitive instead of calling 'one' * Small fixes * Create just one Felt in Pow hint * Use new_n instead of Zero * Fix Clippy warnings hyperlinks * Change usize to u128 * Create CAIRO_SIGNED_PRIME const * Use value into instead of conversion * Use div_mod_floor for mul_inverse * Return x instead of using mod_floor * Use SumAssign in loop * Remove unused function * Use acc in Sum trait * Use SubAssing in Sub for FeltBigInt * Use match num instead of self.0 * Use CAIRO_PRIME - 1 in max value * Make abs_sub implementation explicit * Use max value in signum * Simplify match math_utils * Use or(|) instead of add(+) * Remove clone from get_point_from_x * Use div rem * Remove clones and Felt from ec_double * Remove clones and Felt from ec_double_slope * Remove clones and Felt from ec_double_slope * Uncomment math tests * Create BigUint instead of converting * Uncomment builtin ec_op tests * Fix broken ec_op runner tests * Use Add Assign * Fix clippy warnings Co-authored-by: Mario J. Rugiero <[email protected]> Co-authored-by: Edgar Luque <[email protected]> Co-authored-by: Juanma <[email protected]>
- Loading branch information