-
Notifications
You must be signed in to change notification settings - Fork 31
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
test(sequencing): serialize compiled_contract_class to the central object #3115
Conversation
Artifacts upload workflows: |
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 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dafnamatsry and @Yael-Starkware)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 295 at r1 (raw file):
// Converts the CasmContractClass into a format that serializes into the python object. // TODO remove allow dead code once used
Add an explicit name to make sure it is not forgotten
Code quote:
// TODO remove allow dead code once used
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 298 at r1 (raw file):
#[allow(dead_code)] pub fn casm_contract_class_central_format( compiled_class_hash: CasmContractClass,
Does this code mean that in the Rust version, the fields bytecode_segment_lengths
and pythonic_hints
can be None
, but in the Python version, they must be some value? If so, please write this explicitly.
c446ab0
to
5734542
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: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @dafnamatsry and @DvirYo-starkware)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 295 at r1 (raw file):
Previously, DvirYo-starkware wrote…
Add an explicit name to make sure it is not forgotten
done.
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 298 at r1 (raw file):
Previously, DvirYo-starkware wrote…
Does this code mean that in the Rust version, the fields
bytecode_segment_lengths
andpythonic_hints
can beNone
, but in the Python version, they must be some value? If so, please write this explicitly.
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 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry)
440ed29
to
008e093
Compare
5734542
to
996f2b9
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 4 files at r3, all commit messages.
Reviewable status: 4 of 6 files reviewed, 2 unresolved discussions (waiting on @DvirYo-starkware and @Yael-Starkware)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects_test.rs
line 65 at r3 (raw file):
pub const CENTRAL_SIERRA_CONTRACT_CLASS_JSON_PATH: &str = "central_sierra_contract_class.json"; pub const CENTRAL_CASM_CONTRACT_CLASS_JSON_PATH: &str = "central_contract_class.casm.json"; pub const CENTRAL_CASM_CONTRACT_CLASS_NO_OPTIONAL_JSON_PATH: &str =
What is the difference in the content of these files?
Code quote:
pub const CENTRAL_CASM_CONTRACT_CLASS_JSON_PATH: &str = "central_contract_class.casm.json";
pub const CENTRAL_CASM_CONTRACT_CLASS_NO_OPTIONAL_JSON_PATH: &str =
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 359 at r3 (raw file):
CasmContractClass { // The rust object allows these fields to be none, while in python they are mandatory. bytecode_segment_lengths: Some(
What happens if we deserialize a JSON without those fields in Python?
would it fail? would it put default values?
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: 4 of 6 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @DvirYo-starkware)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs
line 359 at r3 (raw file):
Previously, dafnamatsry wrote…
What happens if we deserialize a JSON without those fields in Python?
would it fail? would it put default values?
fail.
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects_test.rs
line 65 at r3 (raw file):
Previously, dafnamatsry wrote…
What is the difference in the content of these files?
the second json has an empty vector for pythonic_hints and bytecode_segment_lengths
996f2b9
to
b92423b
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 r1, 2 of 4 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Yael-Starkware)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects_test.rs
line 65 at r3 (raw file):
Previously, Yael-Starkware (YaelD) wrote…
the second json has an empty vector for pythonic_hints and bytecode_segment_lengths
The name of the constant is misleading I think.
Maybe rename it to CENTRAL_CASM_CONTRACT_CLASS_DEFAULT_OPTIONALS_JSON_PATH
008e093
to
f5dee18
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: all files reviewed, 1 unresolved discussion (waiting on @dafnamatsry)
crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects_test.rs
line 65 at r3 (raw file):
Previously, dafnamatsry wrote…
The name of the constant is misleading I think.
Maybe rename it toCENTRAL_CASM_CONTRACT_CLASS_DEFAULT_OPTIONALS_JSON_PATH
Done.
b92423b
to
2c20298
Compare
16a663a
to
830923a
Compare
2c20298
to
cafbd64
Compare
cafbd64
to
00a4cd9
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 6 of 6 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)
00a4cd9
to
c4d7077
Compare
Benchmark movements: full_committer_flow performance regressed! |
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: 4 of 6 files reviewed, all discussions resolved (waiting on @dafnamatsry)
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 6 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)
No description provided.