Skip to content
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

Fix: find_element(): No value found for key #378

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

ftheirs
Copy link
Collaborator

@ftheirs ftheirs commented Sep 18, 2024

Problem: Some blocks contain a Declare and in the same block a Deploy transaction. This condition triggers an error in find_element hint from cairo-vm

Solution:
The solution consists in setting two hash maps that are used by snos with the correct information.
For declare transactions:
class_hash_to_compiled_class_hash: HashMap<ClassHash, CompiledClassHash> needs to be initialized with Zero for all new classes

For deploy transactions:
compiled_classes: HashMap<CompiledClassHash, GenericCasmContractClass> needs to be set with the compiled_class_hash from declared class and the corresponding binary.

Issue Number: #376
Closes #376

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

@ftheirs ftheirs marked this pull request as ready for review September 18, 2024 19:30
Copy link
Collaborator

@HermanObst HermanObst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

@HermanObst HermanObst merged commit 1b2a82a into main Sep 19, 2024
6 checks passed
@HermanObst HermanObst deleted the ft/fix_block_164333 branch September 19, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: find_element(): No value found for key
2 participants