Skip to content

v0.5.1

Compare
Choose a tag to compare
@pefontana pefontana released this 07 Jun 23:25
· 362 commits to main since this release
061b2c3

What's Changed

  • fix: fix overflow for QUAD_BIT and DI_BIT hints #1209
    Fixes #1205

  • fix: fix hints UINT256_UNSIGNED_DIV_REM && UINT256_EXPANDED_UNSIGNED_DIV_REM #1203

  • bugfix: fix deserialization of scientific notation with fractional values #1202

  • feat: implement mem_eq function to test for equality of two ranges in memory #1198

  • perf: use mem_eq in set_add #1198

  • feat: wrap big variants of HintError, VirtualMachineError, RunnerError, MemoryError, MathError, InsufficientAllocatedCellsError in Box #1193

    • BREAKING: all tuple variants of HintError with a single Felt252 or multiple elements now receive a single Box
  • Add Program::builtins_len method #1194

  • fix: Handle the deserialization of serde_json::Number with scientific notation (e.g.: Number(1e27)) in felt_from_number function #1188

  • feat: Add RunResources Struct #1175

    • BREAKING: Modify CairoRunner::run_until_pc arity. Add run_resources: &mut Option<RunResources> input
    • BREAKING: Modify CairoRunner::run_from_entrypoint arity. Add run_resources: &mut Option<RunResources> input
  • fix: Fix 'as_int' conversion usage in hints ASSERT_250_BIT & SIGNED_DIV_REM #1191

  • bugfix: Use cairo constants in ASSERT_250_BIT hint #1187

  • bugfix: Fix EC_DOUBLE_ASSIGN_NEW_X_V2 hint not taking SECP_P value from the current execution scope #1186

  • fix: Fix hint BIGINT_PACK_DIV_MOD #1189

  • fix: Fix possible subtraction overflow in QUAD_BIT & DI_BIT hints #1185

    • These hints now return an error when ids.m equals zero
  • fix: felt_from_number not properly returning parse errors #1012

  • fix: Fix felt sqrt and Signed impl #1150

    • BREAKING: Fix Felt252 methods abs, signum, is_positive, is_negative and sqrt
    • BREAKING: Remove function math_utils::sqrt(Now moved to Felt252::sqrt)
  • feat: Add method CairoRunner::initialize_function_runner_cairo_1 #1151

    • Add method pub fn initialize_function_runner_cairo_1( &mut self, vm: &mut VirtualMachine, program_builtins: &[BuiltinName], ) -> Result<(), RunnerError> to CairoRunner

    • BREAKING: Move field builtins from SharedProgramData to Program

    • BREAKING: Remove argument add_segment_arena_builtin from CairoRunner::initialize_function_runner, it is now always false

    • BREAKING: Add segment_arena enum variant to BuiltinName

  • Fix implementation of InitSquashData and ShouldSkipSquashLoop

  • Add more hints to Cairo1HintProcessor #1171
    #1143

    • Cairo1HintProcessor can now run the following hints:
      • Felt252DictEntryInit
      • Felt252DictEntryUpdate
      • GetCurrentAccessDelta
      • InitSquashData
      • AllocConstantSize
      • GetCurrentAccessIndex
      • ShouldContinueSquashLoop
      • FieldSqrt
      • Uint512DivMod
  • Add some small considerations regarding Cairo 1 programs #1144:

    • Ignore Casm and Sierra files
    • Add special flag to compile Cairo 1 programs
  • Make the VM able to run CasmContractClass files under cairo-1-hints feature #1098

    • Implement TryFrom<CasmContractClass> for Program
    • Add Cairo1HintProcessor