Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cairo 2.9.0 #20

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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."*"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/.),)
Expand Down
9 changes: 9 additions & 0 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use cairo_lang_sierra::{
nullable::NullableConcreteLibfunc,
pedersen::PedersenConcreteLibfunc,
poseidon::PoseidonConcreteLibfunc,
range::IntRangeConcreteLibfunc,
starknet::{
secp256::{Secp256ConcreteLibfunc, Secp256OpConcreteLibfunc},
testing::TestingConcreteLibfunc,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
},
}
}

Expand Down Expand Up @@ -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))
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ impl Value {
StarkNetTypeConcrete::Secp256Point(_) => matches!(self, Self::Struct(_)),
StarkNetTypeConcrete::Sha256StateHandle(_) => matches!(self, Self::Struct { .. }),
},
CoreTypeConcrete::IntRange(_) => todo!(),
};

if !res {
Expand Down
1 change: 1 addition & 0 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,5 +378,6 @@ fn eval<'a>(

EvalAction::NormalBranch(0, smallvec![value])
}
CoreConcreteLibfunc::IntRange(_) => todo!(),
}
}
1 change: 1 addition & 0 deletions src/vm/starknet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pub fn eval(
}
}
},
StarkNetConcreteLibfunc::GetClassHashAt(_) => todo!(),
}
}

Expand Down