-
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
chore(blockifier): unify get entry point for V1 and Native #1243
chore(blockifier): unify get entry point for V1 and Native #1243
Conversation
4045d53
to
5b7d5e3
Compare
Benchmark movements: |
5b7d5e3
to
57baa8e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1243 +/- ##
==========================================
- Coverage 74.18% 70.89% -3.30%
==========================================
Files 359 207 -152
Lines 36240 25876 -10364
Branches 36240 25876 -10364
==========================================
- Hits 26886 18344 -8542
+ Misses 7220 5927 -1293
+ Partials 2134 1605 -529
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
57baa8e
to
fcfc201
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 12 files reviewed, 1 unresolved discussion (waiting on @noaov1)
crates/starknet_client/src/writer/objects/transaction.rs
line 27 at r1 (raw file):
ContractClassAbiEntry as DeprecatedContractClassAbiEntry, EntryPointType as DeprecatedEntryPointType, EntryPointV0 as DeprecatedEntryPoint,
I'm not sure if it needs to be part of this PR or if we should change the name. I can revert it if you'd like
Code quote:
EntryPointV0
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 12 of 12 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @meship-starkware)
crates/blockifier/src/execution/contract_class.rs
line 72 at r1 (raw file):
V1(EntryPointV1), Native(NativeEntryPoint), }
I would even consider renaming EntryPointV1 -> CasmEntryPoint
(separate PR)
Suggestion:
pub enum Cairo1EntryPoint {
Casm(EntryPointV1),
Native(NativeEntryPoint),
}
crates/blockifier/src/execution/entry_point_execution.rs
line 156 at r1 (raw file):
} pub fn get_entry_point(
Can you please move it to the contract_class.rs file?
Code quote:
pub fn get_entry_point(
crates/blockifier/src/execution/entry_point_execution.rs
line 163 at r1 (raw file):
let entry_points_of_same_type = &contract_class.entry_points_of_same_type(call.entry_point_type);
Is this working? If so, you can remove some of th *
in the following lines.
Suggestion:
let entry_points_of_same_type =
contract_class.entry_points_of_same_type(call.entry_point_type);
crates/starknet_client/src/reader/starknet_feeder_gateway_client_test.rs
line 26 at r1 (raw file):
ContractClassAbiEntry, EntryPointOffset, EntryPointType as DeprecatedEntryPointType,
Why is it deprecated?
Code quote:
EntryPointType as DeprecatedEntryPointType,
960d7fa
to
c198c6f
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: 10 of 12 files reviewed, 3 unresolved discussions (waiting on @noaov1)
crates/blockifier/src/execution/contract_class.rs
line 72 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
I would even consider renaming
EntryPointV1 -> CasmEntryPoint
(separate PR)
Done. Added a Monday task for the refactor.
crates/starknet_client/src/reader/starknet_feeder_gateway_client_test.rs
line 26 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Why is it deprecated?
Because the EntryPointType appears in the deprecated_contract_class. I guess the reason is that the deprecated_contract_class file is in starknet_api, and the EntryPointType also appears in the state in starknet_api. So as I see it, we can unify both entry point enum and change the name from deprecated in the imports. Anyway I don't think it should be part of this PR.
crates/blockifier/src/execution/entry_point_execution.rs
line 156 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Can you please move it to the contract_class.rs file?
Done.
c198c6f
to
a97fd07
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 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
a97fd07
to
18bab8d
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 11 of 11 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
This change is