Skip to content

Commit

Permalink
feat: create garaga branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix committed Dec 20, 2023
1 parent 8a2ef24 commit 8d7e559
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use crate::{
},
ec_utils::{chained_ec_op_random_ec_point_hint, random_ec_point_hint, recover_y_hint},
find_element_hint::{find_element, search_sorted_lower},
garaga::get_felt_bitlenght,
garaga::get_felt_bitlength,
hint_code,
keccak_utils::{
split_input, split_n_bytes, split_output, split_output_mid_low_high, unsafe_keccak,
Expand Down Expand Up @@ -466,7 +466,7 @@ impl HintProcessorLogic for BuiltinHintProcessor {
&hint_data.ap_tracking,
),
hint_code::GET_FELT_BIT_LENGTH => {
get_felt_bitlenght(vm, &hint_data.ids_data, &hint_data.ap_tracking)
get_felt_bitlength(vm, &hint_data.ids_data, &hint_data.ap_tracking)
}
hint_code::BIGINT_PACK_DIV_MOD => bigint_pack_div_mod_hint(
vm,
Expand Down
9 changes: 8 additions & 1 deletion vm/src/hint_processor/builtin_hint_processor/garaga.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! # Garaga Module
//!
//! Implementation of elliptic curve math hints, coupled with Garaga Cairo repository.
//! These hints are used jointly with Garaga to enable efficient pairing operations in Starknet,
//! by using polynomial representation of field elements.
//! Source: <https://github.com/keep-starknet-strange/garaga/tree/main>
use crate::stdlib::collections::HashMap;
use crate::stdlib::prelude::String;

Expand All @@ -14,7 +21,7 @@ use super::hint_utils::{get_integer_from_var_name, insert_value_from_var_name};
/// x = ids.x,
/// ids.bit_length = x.bit_length()
/// ```
pub fn get_felt_bitlenght(
pub fn get_felt_bitlength(
vm: &mut VirtualMachine,
ids_data: &HashMap<String, HintReference>,
ap_tracking: &ApTracking,
Expand Down

0 comments on commit 8d7e559

Please sign in to comment.