Skip to content

Commit

Permalink
update unimplemented hints list
Browse files Browse the repository at this point in the history
  • Loading branch information
ftheirs committed Dec 10, 2024
1 parent d46a987 commit 7e79c24
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion crates/starknet-os/src/hints/unimplemented.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
use indoc::indoc;

#[allow(unused)]
pub const HINT_4: &str = indoc! {r#"exit_syscall(selector=ids.SHA256_PROCESS_BLOCK_SELECTOR)"#};
const LOG2_CEIL: &str = indoc! {r#"
from starkware.python.math_utils import log2_ceil
ids.res = log2_ceil(ids.value)"#
};

#[allow(unused)]
const COMPRESS: &str = indoc! {r#"
from starkware.starknet.core.os.data_availability.compression import compress
data = memory.get_range_as_ints(addr=ids.data_start, size=ids.data_end - ids.data_start)
segments.write_arg(ids.compressed_dst, compress(data))"#
};

#[allow(unused)]
pub const DICTIONARY_FROM_BUCKET: &str =
indoc! {r#"initial_dict = {bucket_index: 0 for bucket_index in range(ids.TOTAL_N_BUCKETS)}"#};

#[allow(unused)]
const GET_PREV_OFFSET: &str = indoc! {r#"
dict_tracker = __dict_manager.get_tracker(ids.dict_ptr)
ids.prev_offset = dict_tracker.data[ids.bucket_index]"#
};

0 comments on commit 7e79c24

Please sign in to comment.