Repository navigation
·
1 commit
to main
since this release
Cairo VM 4.0.0 splits the Cairo 1 hint processor into its own crate and adds a Stwo runner API. cairo-vm 4.0.0 · cairo1-hint-processor 4.0.0
Breaking changes
- Replace the
cairo-1-hintsfeature with a dependency oncairo1-hint-processor. Usecairo1_hint_processor::program_from_casm_contract_classto convert aCasmContractClassinto aProgram. - The VM rejects instructions that lack a dedicated Stwo opcode component with
VirtualMachineError::GenericInstruction. - The
extensive_hintsfeature has been removed. Runtime hints are always supported, andVirtualMachine::stepandstep_hinttake aRunHints. Themod_builtinfeature has also been removed. - Replace
CairoRunner::new_v2withCairoRunner::new(&Program, &CairoRunConfig). Pass theCairoLayouttoCairoRunConfig::new. The formercairo_run::CairoRunConfigis nowCairo0RunConfig, andVirtualMachine::newtakes&VirtualMachineConfig. CairoRunner::run_from_entrypointrequires thetest_utilsfeature. For calls by program counter, passEntryPoint::Pc(pc)and a slice ofCairoArgvalues.get_extended_execution_resourcesreturns counts asusize.
Other changes
- The Stwo runner API includes
StwoCairoRunConfig,cairo_run_stwo, andcairo_run_pie_stwo. - The VM caches decoded instructions across all executable segments, including segments that hold Starknet OS contracts.
- Fixed off-by-one comparisons in the
split_int,assert_250_bit, andsqrthints.