From 41a25ed976d5f4db3932c3e1433ac18ffd885c21 Mon Sep 17 00:00:00 2001 From: orizi <104711814+orizi@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:46:20 +0200 Subject: [PATCH] Orizi/update audited (#4364) --- .../src/allowed_libfuncs_lists/all.json | 18 ++--- .../src/allowed_libfuncs_lists/audited.json | 68 +++++++++++++++++-- .../allowed_libfuncs_lists/experimental.json | 34 +++++++--- 3 files changed, 96 insertions(+), 24 deletions(-) diff --git a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/all.json b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/all.json index d6993d0510d..1acd5346c67 100644 --- a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/all.json +++ b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/all.json @@ -126,13 +126,13 @@ "replace_class_syscall", "revoke_ap_tracking", "secp256k1_add_syscall", - "secp256k1_get_xy_syscall", "secp256k1_get_point_from_x_syscall", + "secp256k1_get_xy_syscall", "secp256k1_mul_syscall", "secp256k1_new_syscall", "secp256r1_add_syscall", - "secp256r1_get_xy_syscall", "secp256r1_get_point_from_x_syscall", + "secp256r1_get_xy_syscall", "secp256r1_mul_syscall", "secp256r1_new_syscall", "send_message_to_l1_syscall", @@ -150,21 +150,17 @@ "struct_construct", "struct_deconstruct", "struct_snapshot_deconstruct", - "u256_guarantee_inv_mod_n", - "u256_is_zero", - "u256_safe_divmod", - "u256_sqrt", + "u128_byte_reverse", "u128_const", "u128_eq", + "u128_guarantee_mul", "u128_is_zero", + "u128_mul_guarantee_verify", "u128_overflowing_add", "u128_overflowing_sub", "u128_safe_divmod", "u128_sqrt", - "u128_byte_reverse", "u128_to_felt252", - "u128_guarantee_mul", - "u128_mul_guarantee_verify", "u128s_from_felt252", "u16_bitwise", "u16_const", @@ -177,6 +173,10 @@ "u16_to_felt252", "u16_try_from_felt252", "u16_wide_mul", + "u256_guarantee_inv_mod_n", + "u256_is_zero", + "u256_safe_divmod", + "u256_sqrt", "u32_bitwise", "u32_const", "u32_eq", diff --git a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/audited.json b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/audited.json index e2863334bef..72908a4f7b9 100644 --- a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/audited.json +++ b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/audited.json @@ -17,6 +17,9 @@ "bool_to_felt252", "bool_xor_impl", "branch_align", + "bytes31_const", + "bytes31_to_felt252", + "bytes31_try_from_felt252", "call_contract_syscall", "class_hash_const", "class_hash_to_felt252", @@ -59,7 +62,52 @@ "get_block_hash_syscall", "get_builtin_costs", "get_execution_info_syscall", + "get_execution_info_v2_syscall", "hades_permutation", + "i128_const", + "i128_diff", + "i128_eq", + "i128_is_zero", + "i128_overflowing_add_impl", + "i128_overflowing_sub_impl", + "i128_to_felt252", + "i128_try_from_felt252", + "i16_const", + "i16_diff", + "i16_eq", + "i16_is_zero", + "i16_overflowing_add_impl", + "i16_overflowing_sub_impl", + "i16_to_felt252", + "i16_try_from_felt252", + "i16_wide_mul", + "i32_const", + "i32_diff", + "i32_eq", + "i32_is_zero", + "i32_overflowing_add_impl", + "i32_overflowing_sub_impl", + "i32_to_felt252", + "i32_try_from_felt252", + "i32_wide_mul", + "i64_const", + "i64_diff", + "i64_eq", + "i64_is_zero", + "i64_overflowing_add_impl", + "i64_overflowing_sub_impl", + "i64_to_felt252", + "i64_try_from_felt252", + "i64_wide_mul", + "i8_const", + "i8_diff", + "i8_eq", + "i8_is_zero", + "i8_overflowing_add_impl", + "i8_overflowing_sub_impl", + "i8_to_felt252", + "i8_try_from_felt252", + "i8_wide_mul", "into_box", "jump", "keccak_syscall", @@ -72,10 +120,15 @@ "replace_class_syscall", "revoke_ap_tracking", "secp256k1_add_syscall", - "secp256k1_get_xy_syscall", "secp256k1_get_point_from_x_syscall", + "secp256k1_get_xy_syscall", "secp256k1_mul_syscall", "secp256k1_new_syscall", + "secp256r1_add_syscall", + "secp256r1_get_point_from_x_syscall", + "secp256r1_get_xy_syscall", + "secp256r1_mul_syscall", + "secp256r1_new_syscall", "send_message_to_l1_syscall", "snapshot_take", "storage_address_from_base", @@ -91,20 +144,17 @@ "struct_construct", "struct_deconstruct", "struct_snapshot_deconstruct", - "u256_safe_divmod", - "u256_sqrt", - "u256_is_zero", + "u128_byte_reverse", "u128_const", "u128_eq", + "u128_guarantee_mul", "u128_is_zero", + "u128_mul_guarantee_verify", "u128_overflowing_add", "u128_overflowing_sub", "u128_safe_divmod", "u128_sqrt", - "u128_byte_reverse", "u128_to_felt252", - "u128_guarantee_mul", - "u128_mul_guarantee_verify", "u128s_from_felt252", "u16_bitwise", "u16_const", @@ -117,6 +167,10 @@ "u16_to_felt252", "u16_try_from_felt252", "u16_wide_mul", + "u256_guarantee_inv_mod_n", + "u256_is_zero", + "u256_safe_divmod", + "u256_sqrt", "u32_bitwise", "u32_const", "u32_eq", diff --git a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/experimental.json b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/experimental.json index 2676a2d62be..1acd5346c67 100644 --- a/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/experimental.json +++ b/crates/cairo-lang-starknet/src/allowed_libfuncs_lists/experimental.json @@ -66,33 +66,49 @@ "get_block_hash_syscall", "get_builtin_costs", "get_execution_info_syscall", + "get_execution_info_v2_syscall", "hades_permutation", "i128_const", + "i128_diff", "i128_eq", "i128_is_zero", + "i128_overflowing_add_impl", + "i128_overflowing_sub_impl", "i128_to_felt252", "i128_try_from_felt252", "i16_const", + "i16_diff", "i16_eq", "i16_is_zero", + "i16_overflowing_add_impl", + "i16_overflowing_sub_impl", "i16_to_felt252", "i16_try_from_felt252", "i16_wide_mul", "i32_const", + "i32_diff", "i32_eq", "i32_is_zero", + "i32_overflowing_add_impl", + "i32_overflowing_sub_impl", "i32_to_felt252", "i32_try_from_felt252", "i32_wide_mul", "i64_const", + "i64_diff", "i64_eq", "i64_is_zero", + "i64_overflowing_add_impl", + "i64_overflowing_sub_impl", "i64_to_felt252", "i64_try_from_felt252", "i64_wide_mul", "i8_const", + "i8_diff", "i8_eq", "i8_is_zero", + "i8_overflowing_add_impl", + "i8_overflowing_sub_impl", "i8_to_felt252", "i8_try_from_felt252", "i8_wide_mul", @@ -101,6 +117,7 @@ "keccak_syscall", "library_call_syscall", "match_nullable", + "match_nullable_snapshot", "null", "nullable_from_box", "pedersen", @@ -109,13 +126,13 @@ "replace_class_syscall", "revoke_ap_tracking", "secp256k1_add_syscall", - "secp256k1_get_xy_syscall", "secp256k1_get_point_from_x_syscall", + "secp256k1_get_xy_syscall", "secp256k1_mul_syscall", "secp256k1_new_syscall", "secp256r1_add_syscall", - "secp256r1_get_xy_syscall", "secp256r1_get_point_from_x_syscall", + "secp256r1_get_xy_syscall", "secp256r1_mul_syscall", "secp256r1_new_syscall", "send_message_to_l1_syscall", @@ -133,20 +150,17 @@ "struct_construct", "struct_deconstruct", "struct_snapshot_deconstruct", - "u256_safe_divmod", - "u256_sqrt", - "u256_is_zero", + "u128_byte_reverse", "u128_const", "u128_eq", + "u128_guarantee_mul", "u128_is_zero", + "u128_mul_guarantee_verify", "u128_overflowing_add", "u128_overflowing_sub", "u128_safe_divmod", "u128_sqrt", - "u128_byte_reverse", "u128_to_felt252", - "u128_guarantee_mul", - "u128_mul_guarantee_verify", "u128s_from_felt252", "u16_bitwise", "u16_const", @@ -159,6 +173,10 @@ "u16_to_felt252", "u16_try_from_felt252", "u16_wide_mul", + "u256_guarantee_inv_mod_n", + "u256_is_zero", + "u256_safe_divmod", + "u256_sqrt", "u32_bitwise", "u32_const", "u32_eq",