-
Notifications
You must be signed in to change notification settings - Fork 177
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
Recovery of cairo0 hash logic #1470
Conversation
df9f0ad
to
d84b5b5
Compare
To sanity check the changes here, can you enable Cairo0 class verification in syncing and start a fresh sync? You need to modify func VerifyClassHashes(classes map[felt.Felt]Class) error {
for hash, class := range classes {
cairo1Class, ok := class.(*Cairo1Class)
// cairo0 classes are deprecated and hard to verify their hash, just ignore them
if !ok {
return nil
}
cHash := cairo1Class.Hash()
if !cHash.Equal(&hash) {
return fmt.Errorf("cannot verify class hash: calculated hash %v, received hash %v", cHash.String(), hash.String())
}
}
return nil
} |
oh, that cairo1Class, ok := class.(*Cairo1Class)
// cairo0 classes are deprecated and hard to verify their hash, just ignore them
if !ok {
return nil
} |
17acf73
to
d129990
Compare
39e4349
to
57983fe
Compare
This reverts commit bdaa3a1.
fe71731
to
1c53cc1
Compare
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.
LGTM
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1470 +/- ##
==========================================
+ Coverage 72.38% 72.89% +0.51%
==========================================
Files 94 96 +2
Lines 9939 9943 +4
==========================================
+ Hits 7194 7248 +54
+ Misses 2208 2157 -51
- Partials 537 538 +1 ☔ View full report in Codecov by Sentry. |
No description provided.