-
Notifications
You must be signed in to change notification settings - Fork 32
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
Dict hints #455
Dict hints #455
Conversation
crates/starknet-os/src/hints/dict.rs
Outdated
|
||
let bucket_index = get_maybe_relocatable_from_var_name(vars::ids::BUCKET_INDEX, vm, ids_data, ap_tracking)?; | ||
|
||
let prev_offset = dict_tracker.get(&bucket_index).unwrap().clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handling this unwrap is the only thing I can thing of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, but I would suggest one thing:
In cairo-lang
this all comes from a file called compression.cairo
, and we have tried to keep our file structure similar to theirs. So, my suggestions:
- Rename
dict.rs
->compression.rs
- Drop
constants.rs
and include its contents incompression.rs
Implement dictionary hints related to compression process.
Add constants.rs file to define constants that are needed across several hints
KZG tests still require extra hints.
Check orphan hints is failing because it detects two extra hints that will be covered in compress PR (
COMPRESS
andSET_DECOMPRESSED_DST
)Issue Number: N/A
Type
Description
Breaking changes?