-
Notifications
You must be signed in to change notification settings - Fork 26
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
chore(cairo_native): add native to stack trace test #2633
base: main
Are you sure you want to change the base?
Conversation
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 @noaov1)
crates/blockifier/src/test_utils/contracts.rs
line 404 at r1 (raw file):
panic!("Not implemented for cairo native contracts") } }
This is waiting for LC to add the entry_point_by_type to the AotContractExacutor.
Code quote:
RunnableCompiledClass::V1Native(_) => {
#[cfg(test)]
{
EntryPointOffset(10000)
}
#[cfg(not(test))]
{
panic!("Not implemented for cairo native contracts")
}
}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2633 +/- ##
===========================================
+ Coverage 40.10% 71.54% +31.44%
===========================================
Files 26 98 +72
Lines 1895 13634 +11739
Branches 1895 13634 +11739
===========================================
+ Hits 760 9755 +8995
- Misses 1100 3450 +2350
- Partials 35 429 +394 ☔ 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.
Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @meship-starkware)
crates/blockifier/src/test_utils/contracts.rs
line 404 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
This is waiting for LC to add the entry_point_by_type to the AotContractExacutor.
Consider using the casm field
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 @noaov1)
crates/blockifier/src/test_utils/contracts.rs
line 404 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Consider using the casm field
Do we still need the entry_point_by_type for the V1Native class, or can we assume that the casm would be enough?
44179be
to
b703dee
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.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @noaov1)
crates/blockifier/src/execution/native/syscall_handler.rs
line 344 at r2 (raw file):
.map_err(|error| self.handle_error(remaining_gas, error.into()))?; let class_hash = self.base.get_class_hash_at(contract_address).unwrap_or_default();
This shouldn't be unwrap_or_default. Should this be expect if we can't get the class_hash error?
At the VM, we return the error in the function. I can add handle error flow here.
Code quote:
let class_hash = self.base.get_class_hash_at(contract_address).unwrap_or_default();
b703dee
to
f6869ad
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.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @noaov1)
crates/blockifier/src/execution/native/syscall_handler.rs
line 348 at r3 (raw file):
.base .get_class_hash_at(contract_address) .map_err(|e| self.handle_error(remaining_gas, e))?;
It's the same as the VM, but I am not entirely sure why it should be like this.
Code quote:
let class_hash = self
.base
.get_class_hash_at(contract_address)
.map_err(|e| self.handle_error(remaining_gas, e))?;
No description provided.