-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat(blockifier): add replace_class cairo native syscall #1551
base: rdr/add-syscall-counting
Are you sure you want to change the base?
Conversation
Artifacts upload triggered. View details here |
b55f2d1
to
d16b6c7
Compare
Artifacts upload triggered. View details here |
d16b6c7
to
74a67fe
Compare
Artifacts upload triggered. View details here |
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.
Please, rebase / change target branch to #1305
Reviewable status: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @PearsonWhite)
crates/blockifier/src/execution/native/syscall_handler.rs
line 180 at r3 (raw file):
.state .get_compiled_contract_class(class_hash) .expect("Failed to get ContractClass from class hash: {class_hash}.");
Please, be consistent with VM implementation, return the runtime error here, not panic
crates/blockifier/src/execution/native/syscall_handler.rs
line 186 at r3 (raw file):
let err = &SyscallExecutionError::ForbiddenClassReplacement { class_hash }.to_string(); panic!("{err:?}");
Don't use panic here
crates/blockifier/src/execution/native/syscall_handler.rs
line 191 at r3 (raw file):
self.state .set_class_hash_at(self.contract_address, class_hash) .expect("Failed to set class hash for class hash: {class_hash}.");
And here
a00994e
to
e2c9fe8
Compare
12eb020
to
4a2d661
Compare
Artifacts upload triggered. View details here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rdr/add-syscall-counting #1551 +/- ##
============================================================
+ Coverage 68.48% 68.55% +0.06%
============================================================
Files 102 103 +1
Lines 13662 13687 +25
Branches 13662 13687 +25
============================================================
+ Hits 9357 9383 +26
+ Misses 3904 3903 -1
Partials 401 401 ☔ View full report in Codecov by Sentry. |
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 rebased it onto rdr/add-syscall-counting
because it doesn't depend on rdr/native-storage-read
.
Reviewable status: 0 of 5 files reviewed, 3 unresolved discussions (waiting on @varex83)
crates/blockifier/src/execution/native/syscall_handler.rs
line 180 at r3 (raw file):
Previously, varex83 (Bohdan Ohorodnii) wrote…
Please, be consistent with VM implementation, return the runtime error here, not panic
Done.
crates/blockifier/src/execution/native/syscall_handler.rs
line 186 at r3 (raw file):
Previously, varex83 (Bohdan Ohorodnii) wrote…
Don't use panic here
Done.
crates/blockifier/src/execution/native/syscall_handler.rs
line 191 at r3 (raw file):
Previously, varex83 (Bohdan Ohorodnii) wrote…
And here
Done.
147c1d3
to
ded98cf
Compare
4a2d661
to
1fc159e
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
8bc0df3
to
6108edb
Compare
Artifacts upload triggered. View details here |
ded98cf
to
6427073
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.
Reviewed 1 of 5 files at r4, 5 of 6 files at r5, all commit messages.
Reviewable status: 6 of 7 files reviewed, 3 unresolved discussions (waiting on @noaov1 and @varex83)
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.
Reviewed 1 of 6 files at r5.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noaov1 and @varex83)
6e88aa9
to
55834b2
Compare
6108edb
to
4edc093
Compare
Artifacts upload triggered. View details here |
55834b2
to
60e2392
Compare
4edc093
to
8f6ee20
Compare
Artifacts upload triggered. View details here |
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.
Reviewed 2 of 3 files at r6, all commit messages.
Reviewable status: 6 of 7 files reviewed, 3 unresolved discussions (waiting on @noaov1 and @varex83)
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.
Reviewed 1 of 3 files at r6.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
60e2392
to
538df34
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.
Reviewed 2 of 6 files at r5, 2 of 3 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
538df34
to
861b3c2
Compare
8f6ee20
to
e337479
Compare
Artifacts upload triggered. View details here |
Implements the
replace_class
syscall for native cairo syscall handler.