-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: hashdict_finalize #496
base: main
Are you sure you want to change the base?
Conversation
bae527b
to
064a9ac
Compare
cairo/src/utils/dict.cairo
Outdated
@@ -136,3 +137,83 @@ func hashdict_write{poseidon_ptr: PoseidonBuiltin*, dict_ptr: DictAccess*}( | |||
let dict_ptr = dict_ptr + DictAccess.SIZE; | |||
return (); | |||
} | |||
|
|||
func hashdict_finalize{range_check_ptr}( |
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.
maybe add some comments to explain the behaviors of merge=FALSE
and TRUE
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.
eventually, I think that this function should be called dict_update
, similarly to python dict.update()
because it's what it does: updating the value of dict 1 (original_mapping) here with the values of dict 2 (dict_ptr here). For soundness, we need to add a drop: bool
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.
done
Closes #403