-
Notifications
You must be signed in to change notification settings - Fork 25
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 library_call cairo native syscall #1547
Conversation
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
ceff54f
to
f9d4b21
Compare
2229bee
to
967f899
Compare
Artifacts upload triggered. View details here |
967f899
to
4c0a5bd
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion
a discussion (no related file):
test_nested_library_call
fails due to a difference in ExecutionResources
when comparing the CallInfo to the expected. The expected CallInfo is the same between the VM and Native. Eventually, these should be the same (right?), but for now it fails. How would you like me to address this? I could change the test to ignore ExecutionResources
in the comparison for now, or mark the test as #[ignored]
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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @PearsonWhite)
a discussion (no related file):
Previously, PearsonWhite wrote…
test_nested_library_call
fails due to a difference inExecutionResources
when comparing the CallInfo to the expected. The expected CallInfo is the same between the VM and Native. Eventually, these should be the same (right?), but for now it fails. How would you like me to address this? I could change the test to ignoreExecutionResources
in the comparison for now, or mark the test as#[ignored]
I think we can just ignore ExecutionResources check while running Native test
4c0a5bd
to
75943a1
Compare
Artifacts upload triggered. View details here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1547 +/- ##
===========================================
+ Coverage 40.10% 69.14% +29.03%
===========================================
Files 26 105 +79
Lines 1895 13709 +11814
Branches 1895 13709 +11814
===========================================
+ Hits 760 9479 +8719
- Misses 1100 3827 +2727
- Partials 35 403 +368 ☔ View full report in Codecov by Sentry. |
75943a1
to
c3d0253
Compare
Artifacts upload triggered. View details here |
c3d0253
to
e66e4aa
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @varex83)
a discussion (no related file):
Previously, varex83 (Bohdan Ohorodnii) wrote…
I think we can just ignore ExecutionResources check while running Native test
I changed this so our expected_call_info uses the execution resources that are currently being used. This will fail when the gas is changed as long as the gas change is done correctly. At that point, the logic for if_native can be removed and the execution resources can be made the same.
f9d4b21
to
9ab9eee
Compare
a00063b
to
8ad184c
Compare
e66e4aa
to
d3176d7
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
8ad184c
to
93ac2d0
Compare
443e6dd
to
0ec1f46
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 1 of 2 files at r9, 2 of 2 files at r10, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @noaov1 and @varex83)
e2bd543
to
fb9f1f7
Compare
Artifacts upload triggered. View details here |
fb9f1f7
to
0b7374c
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 1 of 2 files at r10, 1 of 1 files at r11, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @noaov1, @varex83, and @Yoni-Starkware)
0b7374c
to
a2afbd9
Compare
a2afbd9
to
7a90ae1
Compare
Artifacts upload triggered. View details here |
7a90ae1
to
ae74090
Compare
Artifacts upload triggered. View details here |
ae74090
to
5765ac8
Compare
Artifacts upload triggered. View details here |
5765ac8
to
2de1599
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 2 files at r13, all commit messages.
Reviewable status: all files reviewed, 4 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.
Dismissed @noaov1 from a discussion.
Reviewable status: all files reviewed, 4 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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noaov1 and @varex83)
crates/blockifier/src/execution/native/syscall_handler.rs
line 197 at r6 (raw file):
Previously, PearsonWhite wrote…
I think it's fine like this for now. I expect the error handling for StarknetSyscallHandler to change, and when that happens the return value for execute_inner_call will probably change as well.
.
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.
Dismissed @noaov1 from a discussion.
Reviewable status: all 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.
Dismissed @noaov1 from a discussion.
Reviewable status: all 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.
Reviewable status: all 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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @noaov1 and @varex83)
crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs
line 201 at r7 (raw file):
Previously, PearsonWhite wrote…
I forgot to
git add
this change on the previous update. It should be fixed now.
.
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: all files reviewed, 1 unresolved discussion (waiting on @noaov1 and @varex83)
crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs
line 188 at r7 (raw file):
Previously, PearsonWhite wrote…
It looks like we do account for VM resources in native execution. For example in
crates/blockifier/src/execution/entry_point_execution.rs
::finalize_execution
which get called during the tests.
.
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 @varex83)
Implements
library_call
in theNativeSyscallHandler
.