diff --git a/Cargo.toml b/Cargo.toml index 64f1aae..cde8535 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,12 +4,12 @@ version = "0.1.0" edition = "2021" [dependencies] -cairo-lang-compiler = "2.8.4" -cairo-lang-filesystem = "2.8.4" -cairo-lang-sierra = "2.8.4" -cairo-lang-sierra-ap-change = "2.8.4" -cairo-lang-sierra-gas = "2.8.4" -cairo-lang-utils = "2.8.4" +cairo-lang-compiler = "2.9.0-dev.0" +cairo-lang-filesystem = "2.9.0-dev.0" +cairo-lang-sierra = "2.9.0-dev.0" +cairo-lang-sierra-ap-change = "2.9.0-dev.0" +cairo-lang-sierra-gas = "2.9.0-dev.0" +cairo-lang-utils = "2.9.0-dev.0" clap = { version = "4.5.20", features = ["derive"] } k256 = "0.13.4" keccak = "0.1.5" @@ -31,8 +31,8 @@ tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } [dev-dependencies] -cairo-lang-compiler = "2.8.4" -cairo-lang-starknet = "2.8.4" +cairo-lang-compiler = "2.9.0-dev.0" +cairo-lang-starknet = "2.9.0-dev.0" # On dev optimize dependencies a bit so it's not as slow. [profile.dev.package."*"] diff --git a/Makefile b/Makefile index 82e3043..8441644 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ UNAME := $(shell uname) -CAIRO_2_VERSION=2.8.0 -SCARB_VERSION = 2.8.0 +CAIRO_2_VERSION=2.9.0-dev.0 +SCARB_VERSION = 2.8.4 needs-cairo2: ifeq ($(wildcard ./cairo2/.),) diff --git a/src/debug.rs b/src/debug.rs index 8d14588..7c0924c 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -26,6 +26,7 @@ use cairo_lang_sierra::{ nullable::NullableConcreteLibfunc, pedersen::PedersenConcreteLibfunc, poseidon::PoseidonConcreteLibfunc, + range::IntRangeConcreteLibfunc, starknet::{ secp256::{Secp256ConcreteLibfunc, Secp256OpConcreteLibfunc}, testing::TestingConcreteLibfunc, @@ -378,6 +379,7 @@ pub fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { StarkNetConcreteLibfunc::Sha256ProcessBlock(_) => "sha256_process_block", StarkNetConcreteLibfunc::Sha256StateHandleInit(_) => "sha256_state_handle_init", StarkNetConcreteLibfunc::Sha256StateHandleDigest(_) => "sha256_state_handle_digest", + StarkNetConcreteLibfunc::GetClassHashAt(_) => "get_class_hash_at", }, CoreConcreteLibfunc::Debug(value) => match value { DebugConcreteLibfunc::Print(_) => "debug_print", @@ -414,6 +416,10 @@ pub fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { BoundedIntConcreteLibfunc::IsZero(_) => "bounded_int_is_zero", BoundedIntConcreteLibfunc::WrapNonZero(_) => "bounded_int_wrap_non_zero", }, + CoreConcreteLibfunc::IntRange(selector) => match selector { + IntRangeConcreteLibfunc::TryNew(_) => "int_range_try_new", + IntRangeConcreteLibfunc::PopFront(_) => "int_range_pop_front", + }, } } @@ -533,6 +539,9 @@ pub fn type_to_name( CoreTypeConcrete::SegmentArena(_) => String::from("SegmentArena"), CoreTypeConcrete::Bytes31(_) => String::from("Bytes31"), CoreTypeConcrete::BoundedInt(_) => String::from("BoundedInt"), + CoreTypeConcrete::IntRange(info) => { + format!("IntRange<{}>", type_to_name(&info.ty, registry)) + } } } diff --git a/src/value.rs b/src/value.rs index de61868..e386753 100644 --- a/src/value.rs +++ b/src/value.rs @@ -199,6 +199,7 @@ impl Value { StarkNetTypeConcrete::Secp256Point(_) => matches!(self, Self::Struct(_)), StarkNetTypeConcrete::Sha256StateHandle(_) => matches!(self, Self::Struct { .. }), }, + CoreTypeConcrete::IntRange(_) => todo!(), }; if !res { diff --git a/src/vm.rs b/src/vm.rs index 0d6b27d..4426b77 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -378,5 +378,6 @@ fn eval<'a>( EvalAction::NormalBranch(0, smallvec![value]) } + CoreConcreteLibfunc::IntRange(_) => todo!(), } } diff --git a/src/vm/starknet.rs b/src/vm/starknet.rs index 502b11e..1b5abe4 100644 --- a/src/vm/starknet.rs +++ b/src/vm/starknet.rs @@ -122,6 +122,7 @@ pub fn eval( } } }, + StarkNetConcreteLibfunc::GetClassHashAt(_) => todo!(), } }