cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
fix: Handle error in hint UINT256_MUL_DIV_MOD
when divides by zero #1367
Add HintError::SyscallError and VmErrors::HINT_ERROR_STR constant #1357
feat: make arbitrary feature also enable a proptest::arbitrary::Arbitrary
implementation for Felt252
#1355
fix: correctly display invalid signature error message #1361
fix: Program
comparison depending on hints_ranges
ordering #1351
feat: implement the --air_public_input
flag to the runner for outputting public inputs into a file #1268
fix: CLI errors bad formatting and handling
fix: return error when a parsed hint's PC is invalid #1340
chore(deps): bump cairo-lang dependencies to v2.1.0-rc2 #1345
chore(examples): remove wee_alloc dependency from wasm-demo example and ensure-no_std dummy crate #1337
docs: improved crate documentation #1334
chore!: made deserialize_utils
module private #1334
BREAKING:
deserialize_utils
is no longer exportedmaybe_add_padding
, parse_value
, and take_until_unbalanced
are no longer exportedReferenceParseError
is no moreperf: changed ok_or
usage for ok_or_else
in expensive cases #1332
feat: updated the old WASM example and moved it to examples/wasm-demo
#1315
feat(fuzzing): add arbitrary
feature to enable arbitrary derive in Program
and CairoRunConfig
#1306 #1330
perf: remove pointless iterator from rc limits tracking #1316
feat(felt): add from_bytes_le
and from_bytes_ne
methods to Felt252
#1326
perf: change Program::shared_program_data::hints
from HashMap<usize, Vec<Box<dyn Any>>>
to Vec<Box<dyn Any>>
and refer to them as ranges stored in a Vec<_>
indexed by PC with run time reductions of up to 12% #931
BREAKING:
get_hint_dictionary(&self, &[HintReference], &mut dyn HintProcessor) -> Result<HashMap<usize, Vec<Box<dyn Any>>, VirtualMachineError>
->
get_hint_data(self, &[HintReference], &mut dyn HintProcessor) -> Result<Vec<Box<dyn Any>, VirtualMachineError>
&[Box<dyn Any>]
rather than &HashMap<usize, Vec<Box<dyn Any>>>
Full Changelog: https://github.com/lambdaclass/cairo-vm/compare/v0.6.1...v0.6.2
chore: update dependencies, particularly lamdaworks 0.1.2 -> 0.1.3 #1323
fix: fix UINT256_MUL_DIV_MOD
hint #1320
feat: add dependency installation script install.sh
#1298
fix: specify resolver version 2 in the virtual workspace's manifest #1311
feat: add lambdaworks-felt
feature to cairo-vm-cli
#1308
chore: update dependencies, particularly clap 3.2 -> 4.3 #1309
chore: remove unused dependencies #1307
chore: bump cairo-lang-starknet
and cairo-lang-casm
dependencies to 2.0.0 #1313
chore: change mentions of cairo-rs-py to cairo-vm-py #1296
rename github repo from https://github.com/lambdaclass/cairo-rs to https://github.com/lambdaclass/cairo-vm #1289
fix(security): avoid OOM crashes when programs jump to very high invalid addresses.
fix: add to_bytes_be
to the felt when lambdaworks-felt
feature is active #1290
chore: mark modpow
and to_signed_bytes_le
as deprecated #1290
fix: bump lambdaworks-math to latest version, that fixes no-std support #1293
build: remove dependency to thiserror
(use thiserror-no-std/std
instead)
chore: use LambdaWorks' implementation of bit operations for Felt252
#1291
update cairo-lang-starknet
and cairo-lang-casm
dependencies to v2.0.0-rc6 #1299
feat: Add feature lambdaworks-felt
to felt
& cairo-vm
crates #1218
Changes under this feature:
Felt252
now uses lambdaworks' FieldElement
internallyFelt252
were removed, namely: modpow
and to_bytes_be
BREAKING: Integrate RunResources
logic into HintProcessor
trait #1274
HintProcessor
to HintProcessorLogic
ResourceTracker
HintProcessor
is now HintProcessor: HintProcessorLogic + ResourceTracker
BuiltinHintProcessor::new
& Cairo1HintProcessor::new
now receive the argumet run_resources: RunResources
HintProcessorLogic::execute_hint
no longer receives run_resources: &mut RunResources
run_resources: &mut RunResources
from CairoRunner::run_until_pc
& CairoRunner::run_from_entrypoint
build: remove unused implicit features from cairo-vm #1266
fix: dibit
hint no longer fails when called with an m
of zero #1247
fix(security): avoid denial of service on malicious input exploiting the scientific notation parser #1239
BREAKING: Change RunResources
usage:
Modify field type RunResources.n_steps: Option<usize>,
Public Api Changes:
&mut RunResources
instead of an &mut Option<RunResources>
&mut RunResources
instead of an &mut Option<RunResources>
&mut RunResources
as input&mut RunResources
as an inputperf: accumulate min
and max
instruction offsets during run to speed up range check #1080
BREAKING: Cairo_runner::get_perm_range_check_limits
no longer returns an error when called without trace enabled, as it no longer depends on it
perf: process reference list on Program
creation only #1214
Also keep them in a Vec<_>
instead of a HashMap<_, _>
since it will be continuous anyway.
BREAKING:
HintProcessor::compile_hint
now receies a &[HintReference]
rather than &HashMap<usize, HintReference>
CairoRunner::get_reference_list
has been removedBREAKING: Add no_std compatibility to cairo-vm (cairo-1-hints feature still not supported)
Move the vm to its own directory and crate, different from the workspace #1215
Add an ensure_no_std
crate that the CI will use to check that new changes don't revert no_std
support #1215 #1232
replace the use of num-prime::is_prime
by a custom implementation, therefore restoring no_std
compatibility #1238
BREAKING: Compute ExecutionResources.n_steps
without requiring trace #1222
CairoRunner::get_execution_resources
return's n_steps
field value is now set to vm.current_step
instead of 0
if both original_steps
and trace
are set to None
Add RunResources::get_n_steps
method #1225
refactor: simplify mem_eq
fix: pin Cairo compiler version #1220
perf: make inner_rc_bound
a constant, improving performance of the range-check builtin
fix: substraction of MaybeRelocatable
always behaves as signed #1218