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

refactor: calculate class hash in devnet #269

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

apoorvsadana
Copy link
Contributor

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.

Copy link
Collaborator

@Trantorian1 Trantorian1 left a 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 {
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor Author

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.

@antiyro antiyro added bug Something isn't working enhancement New feature or request labels Sep 18, 2024
@antiyro
Copy link
Member

antiyro commented Sep 18, 2024

lgtm have you tested it with different scarb versions?

@apoorvsadana
Copy link
Contributor Author

lgtm have you tested it with different scarb versions?

Yes!

@Trantorian1 Trantorian1 merged commit c232ebe into main Sep 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants