Update DicManager
+ add FinalizeDict
hint
#5628
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does the following:
DictManger
that were merged intocairo-vm
'sCairo1HintProcessor
but are yet to be included here. They were introduced by PR Added segment arena cairo1 runner validation. lambdaclass/cairo-vm#1721. It also includes the fixes to dictionary relocation added by PR Move dict finalization toFinalizeDict
Hint lambdaclass/cairo-vm#1774FinalizeDict
. This hint is in charge of finalizing and relocating the current dictionary after it has been squashed.felt252_dict_squash
libfunc to add a call toFinalizeDict
hint right after the squashing has taken place.This changes ensure that there are no differences in behaviour between the hint processors for cairo 1 in
cairo
andcairo-vm
crates, and fixes temporary segment relocation for dictionaries (that is currently bugged incairo-vm
).Note: The pythonic hints still use the old
DictManager
implementation (without temporary segments), so theFinalizeDict
is a NoOp in that context. I think the pythonic hints along with the pythonic DictManager for cairo 1 could also be updated in the future to match this new behaviour.This change is