Skip to content

Review TODO comments #1227

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

Merged
merged 30 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cf8efaa
Review TODO comments
hakymulla May 10, 2025
53d911c
Minor improvements to Sierra Emu crate (#1202)
JulianGCalderon May 6, 2025
1b9a370
Add Trace Dump feature (#1199)
JulianGCalderon May 6, 2025
6268f57
[Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205)
FrancoGiachetta May 7, 2025
9fab389
[Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#…
FrancoGiachetta May 7, 2025
a70680f
[Sierra-Emu] implement `get_available_gas` libfunc (#1210)
FrancoGiachetta May 7, 2025
36fbc0a
Improve sierra2casm-dbg (#1206)
JulianGCalderon May 8, 2025
04a3482
[Sierra-Emu] implement missing libfuncs from `int_range` and `array` …
FrancoGiachetta May 8, 2025
e31caae
[Sierra-Emu] Implement missing libfuncs from int (#1192)
FrancoGiachetta May 9, 2025
f42fd05
Update arch.rs
hakymulla May 12, 2025
59b6f61
Update main.rs
hakymulla May 12, 2025
aaa77ef
Update arch.rs
hakymulla May 12, 2025
cffb1ee
Update enum.rs
hakymulla May 12, 2025
4b83428
Update arch.rs
hakymulla May 15, 2025
4ec9601
Update executor.rs
hakymulla May 15, 2025
d915f82
Update contract.rs
hakymulla May 15, 2025
53ad154
Update bytes31.rs
hakymulla May 15, 2025
f3223c2
Update felt252.rs
hakymulla May 15, 2025
e9c3235
Update starknet.rs
hakymulla May 15, 2025
6c81a6b
Update starknet.rs
hakymulla May 15, 2025
8e23a27
implement circuit_single_limb_less_than_guarantee_verify (#1212)
FrancoGiachetta May 12, 2025
8fa3382
[Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implemen…
FrancoGiachetta May 13, 2025
b3f218e
cherry: Use dynamic arrays instead of static arrays for circuit data …
JulianGCalderon May 26, 2025
1c0488a
[Serra-Emu] Fix some libfuncs (#1223)
FrancoGiachetta May 30, 2025
c5155b5
Fix format
JulianGCalderon Jun 10, 2025
f27a64d
Gather compilation statistics (#1236)
JulianGCalderon Jun 2, 2025
07fd5c8
Don't fail on empty programs (#1248)
JulianGCalderon Jun 5, 2025
cbf93e7
Update version (#1249)
JulianGCalderon Jun 10, 2025
6858c37
Merge branch 'main' into review_todo
JulianGCalderon Jun 11, 2025
785462c
Merge branch 'main' into review_todo
JulianGCalderon Jun 11, 2025
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
3 changes: 2 additions & 1 deletion src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl AbiArgument for ValueWithInfoWrapper<'_> {
.to_bytes(buffer, find_dict_drop_override)?,

(Value::Array(_), CoreTypeConcrete::Array(_)) => {
// TODO: Assert that `info.ty` matches all the values' types.
// TODO: Assert that `info.ty` matches all the values' types. See: https://github.com/lambdaclass/cairo_native/issues/1216

let abi_ptr = self.value.to_ptr(
self.arena,
Expand All @@ -130,6 +130,7 @@ impl AbiArgument for ValueWithInfoWrapper<'_> {
abi.capacity.to_bytes(buffer, find_dict_drop_override)?;
}
(Value::BoundedInt { .. }, CoreTypeConcrete::BoundedInt(_)) => {
// See: https://github.com/lambdaclass/cairo_native/issues/1217
native_panic!("todo: implement AbiArgument for Value::BoundedInt case")
}
(Value::Bytes31(value), CoreTypeConcrete::Bytes31(_)) => {
Expand Down
1 change: 0 additions & 1 deletion src/bin/cairo-native-stress/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ fn main() {
let before_round = Instant::now();

let program = modify_starknet_contract(program.clone(), UNIQUE_CONTRACT_VALUE, round);
// TODO: use the program hash instead of round number.
let hash = round;

debug!(hash, "obtained test program");
Expand Down
2 changes: 1 addition & 1 deletion src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ fn invoke_dynamic(
_ if type_info.is_builtin() => {
if !type_info.is_zst(registry)? {
if let CoreTypeConcrete::BuiltinCosts(_) = type_info {
// todo: should we use this value?
// todo: should we use this value? See: https://github.com/lambdaclass/cairo_native/issues/1219
let _value = match &mut return_ptr {
Some(return_ptr) => unsafe { *read_value::<*mut u64>(return_ptr) },
None => ret_registers[0] as *mut u64,
Expand Down
2 changes: 1 addition & 1 deletion src/executor/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ mod tests {
use rayon::iter::ParallelBridge;
use rstest::*;

// todo add recursive contract test
// todo add recursive contract test See: https://github.com/lambdaclass/cairo_native/issues/1220

#[fixture]
fn starknet_program() -> ContractClass {
Expand Down
2 changes: 1 addition & 1 deletion src/libfuncs/bytes31.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ mod test {
use starknet_types_core::felt::Felt;

lazy_static! {
// TODO: Test `bytes31_const` once the compiler supports it.
// TODO: Test `bytes31_const` once the compiler supports it. See: https://github.com/lambdaclass/cairo_native/issues/1224
static ref BYTES31_ROUNDTRIP: (String, Program) = load_cairo! {
use core::bytes_31::{bytes31_try_from_felt252, bytes31_to_felt252};

Expand Down
8 changes: 4 additions & 4 deletions src/libfuncs/felt252.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ pub mod test {
}
};

// TODO: Add test program for `felt252_add_const`.
// TODO: Add test program for `felt252_sub_const`.
// TODO: Add test program for `felt252_mul_const`.
// TODO: Add test program for `felt252_div_const`.
// TODO: Add test program for `felt252_add_const`. See: https://github.com/lambdaclass/cairo_native/issues/1214
// TODO: Add test program for `felt252_sub_const`. See: https://github.com/lambdaclass/cairo_native/issues/1214
// TODO: Add test program for `felt252_mul_const`. See: https://github.com/lambdaclass/cairo_native/issues/1214
// TODO: Add test program for `felt252_div_const`. See: https://github.com/lambdaclass/cairo_native/issues/1214

static ref FELT252_CONST: (String, Program) = load_cairo! {
extern fn felt252_const<const value: felt252>() -> felt252 nopanic;
Expand Down
4 changes: 2 additions & 2 deletions src/starknet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl From<&Felt252Abi> for Felt {
}

/// Binary representation of a `u256` (in MLIR).
// TODO: This shouldn't need to be public.
// TODO: This shouldn't need to be public. See: https://github.com/lambdaclass/cairo_native/issues/1221
#[derive(
Debug,
Clone,
Expand Down Expand Up @@ -557,7 +557,7 @@ impl StarknetSyscallHandler for DummySyscallHandler {
}
}

// TODO: Move to the correct place or remove if unused.
// TODO: Move to the correct place or remove if unused. See: https://github.com/lambdaclass/cairo_native/issues/1222
pub(crate) mod handler {
use super::*;
use crate::utils::{libc_free, libc_malloc};
Expand Down
3 changes: 2 additions & 1 deletion src/types/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ pub fn get_layout_for_variants(
/// Extract the type and layout for the default enum representation, its discriminant and all its
/// payloads.
// TODO: Change this function to accept a slice of slices (for variants). Not all uses have a slice
// with one `ConcreteTypeId` per variant (deploy_syscalls has two types for the Ok() variant).
// with one `ConcreteTypeId` per variant (deploy_syscalls has two types for the Ok() variant).
// See: https://github.com/lambdaclass/cairo_native/issues/1187/
pub fn get_type_for_variants<'ctx>(
context: &'ctx Context,
module: &Module<'ctx>,
Expand Down
2 changes: 1 addition & 1 deletion src/types/starknet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! ## Secp256Point
//! TODO

// TODO: Maybe the types used here can be i251 instead of i252.
// TODO: Maybe the types used here can be i251 instead of i252. See https://github.com/lambdaclass/cairo_native/issues/1226

use super::WithSelf;
use crate::{
Expand Down
Loading