-
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
refactor(state, blockifier, starknet_api): rename ContractClass to Co… #2296
Conversation
5a75240
to
b117387
Compare
lets be consistent with the naming - compiled class everywhere Suggestion: /// Initialize a compiled class for native.
/// |
Suggestion: // The location where the compiled class is loaded into memory will not |
WDYT? Suggestion: fn get_compiled_class( |
? Suggestion: /// Returns the compiled class of the given class hash.
fn get_compiled_class( |
Suggestion: pub class_hash_to_compiled_class: HashMap<ClassHash, RunnableCompiledClass>, |
b117387
to
73bbdd5
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 30 files reviewed, 2 unresolved discussions (waiting on @avi-starkware and @meship-starkware)
crates/blockifier/src/execution/native/contract_class.rs
line 26 at r1 (raw file):
Previously, avi-starkware wrote…
lets be consistent with the naming - compiled class everywhere
Done.
crates/blockifier/src/execution/native/contract_class.rs
line 59 at r1 (raw file):
} // The location where the compiled contract is loaded into memory will not
Done.
Suggestion: let casm_compiled_class = self |
Suggestion: let v0_compiled_class = self |
Suggestion: /// Returns a V1 contract if found, or a V0 contract if a V1 contract is not
/// found, or an `Error` otherwise.
fn get_compiled_class_inner( |
Suggestion: GetCompiledClassParams { class_hash, block_id: self.block_id }; |
Suggestion: // Test that an error is returned if we try to get a missing casm, and the field
// `missing_compiled_class` is set to the missing casm's hash. |
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 29 of 30 files at r1, 24 of 30 files at r3, all commit messages.
Reviewable status: 38 of 44 files reviewed, 5 unresolved discussions (waiting on @meship-starkware and @Yoni-Starkware)
Suggestion: // Test that an error is returned if we only got the class without the casm. |
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 6 of 30 files at r3.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @meship-starkware and @Yoni-Starkware)
73bbdd5
to
00bd007
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: 36 of 45 files reviewed, 2 unresolved discussions (waiting on @avi-starkware and @meship-starkware)
crates/starknet_gateway/src/rpc_state_reader.rs
line 147 at r1 (raw file):
) -> StateResult<RunnableCompiledClass> { let get_compiled_class_params = GetCompiledContractClassParams { class_hash, block_id: self.block_id };
Done.
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 14 of 30 files at r1, 22 of 30 files at r3, 9 of 9 files at r4, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @avi-starkware and @Yoni-Starkware)
crates/blockifier/src/execution/entry_point.rs
line 150 at r4 (raw file):
// Add class hash to the call, that will appear in the output (call info). self.class_hash = Some(class_hash); let contract_class = state.get_compiled_class(class_hash)?;
Suggestion:
let compiled_class = state.get_compiled_class(class_hash)?;
crates/blockifier/src/execution/entry_point.rs
line 409 at r4 (raw file):
) -> ConstructorEntryPointExecutionResult<CallInfo> { // Ensure the class is declared (by reading it). let contract_class = state.get_compiled_class(ctor_context.class_hash).map_err(|error| {
Suggestion:
let compiled_class = state.get_compiled_class(ctor_context.class_hash).map_err(|error| {
00bd007
to
9133792
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 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @avi-starkware and @Yoni-Starkware)
8454eb5
to
fa8f088
Compare
fa8f088
to
a956f69
Compare
a956f69
to
f361784
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 12 of 12 files at r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avi-starkware)
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 6 of 9 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)
…mpiledClass