-
Notifications
You must be signed in to change notification settings - Fork 30
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
refactor: calculate class hash in devnet #269
Conversation
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.
All good 👍
@@ -24,11 +26,23 @@ pub enum InitiallyDeclaredClass { | |||
} | |||
|
|||
impl InitiallyDeclaredClass { |
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.
just out of curiosity, why aren’t the classes definition stored compressed directly?
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.
I didn't understand the question sorry, the compressed version is stored now right?
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.
it's just that we produce uncompressed class definitions with scarb
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.
Oh ok, I am not really sure but if Scarb has that option then this could be an optimisation, yes.
lgtm have you tested it with different scarb versions? |
Yes! |
In the current setup, the class hashes for devnet are hard coded. This isn't really a big issue but everytime we update the Cairo compiler we need to manually change these class hashes in the devnet. This PR calculates the class hash instead of taking the hardcoded values.