-
Notifications
You must be signed in to change notification settings - Fork 268
fix!(rpc): disallow non-prefixed hex strings in RPC input #3328
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -878,13 +878,18 @@ pub mod json { | |
| fn cairo_0_8() { | ||
| // Cairo 0.8 update broke our class hash calculation by adding new attribute | ||
| // fields (which we now need to ignore if empty). | ||
| assert_eq!( | ||
| // Known contract which triggered a hash mismatch failure. | ||
| hash(CAIRO_0_8_NEW_ATTRIBUTES), | ||
| ComputedClassHash::Cairo(class_hash!( | ||
| "056b96c1d1bbfa01af44b465763d1b71150fa00c6c9d54c3947f57e979ff68c3" | ||
| )) | ||
| ); | ||
| let expected = ComputedClassHash::Cairo(class_hash!( | ||
| "056b96c1d1bbfa01af44b465763d1b71150fa00c6c9d54c3947f57e979ff68c3" | ||
| )); | ||
|
|
||
| // Known contract which triggered a hash mismatch failure. | ||
| let extract = tokio::task::spawn_blocking(move || -> anyhow::Result<_> { | ||
| let hash = compute_class_hash(CAIRO_0_8_NEW_ATTRIBUTES)?; | ||
| Ok(hash) | ||
| }); | ||
| let calculated_hash = extract.await.unwrap().unwrap(); | ||
|
|
||
| assert_eq!(calculated_hash, expected); | ||
|
Comment on lines
+881
to
+892
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this at all related to this PR? 👀
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a rebase related hiccup (I refactored this test to use the |
||
| } | ||
|
|
||
| #[test] | ||
|
|
||
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.
We've never used
BREAKINGin the CHANGELOG.I'd suggest we remove it. We'll highlight it in the release notes (+ major version change).