feat(starknet_committer_and_os_cli): add command to dump the OS compiled program to file#5876
Conversation
47f7df8 to
b2bea45
Compare
83d6363 to
1dbb071
Compare
b2bea45 to
1c55dd5
Compare
1dbb071 to
d9d9e5f
Compare
1c55dd5 to
c438e17
Compare
d9d9e5f to
8688f92
Compare
c438e17 to
c57c217
Compare
8688f92 to
4061106
Compare
c57c217 to
a939bdc
Compare
4061106 to
97825d7
Compare
a939bdc to
4ed33f4
Compare
97825d7 to
2e6df53
Compare
4ed33f4 to
68b8a50
Compare
d1268a9 to
831f539
Compare
bd3f4a9 to
1e184ad
Compare
831f539 to
cc133cb
Compare
3b066c9 to
8f7eba9
Compare
cc133cb to
43ee0d5
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @nimrod-starkware and @TzahiTaub)
.github/workflows/committer_ci.yml line 0 at r3 (raw file):
the CLI (used by the committer CI) now depends on the program crate, which requires a python venv to build; hence these changes, copied from other workflows.
|
Benchmark movements: tree_computation_flow performance improved 😺 tree_computation_flow time: [34.606 ms 34.734 ms 34.906 ms] change: [-4.2981% -2.7216% -1.2970%] (p = 0.00 < 0.05) Performance has improved. Found 9 outliers among 100 measurements (9.00%) 1 (1.00%) high mild 8 (8.00%) high severe |
TzahiTaub
left a comment
There was a problem hiding this comment.
Reviewed 1 of 7 files at r4, 2 of 6 files at r5, 4 of 4 files at r7, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @amosStarkware and @nimrod-starkware)
.github/workflows/committer_and_os_cli_push.yml line 82 at r7 (raw file):
- name: Build CLI binary run: ./build_native_in_docker.sh rustup toolchain install && cargo build -p starknet_committer_and_os_cli -r --bin starknet_committer_and_os_cli --target-dir CLI_TARGET
Is this included in the install_builld_tools script?
Code quote:
rustup toolchain installcrates/starknet_committer_and_os_cli/src/os_cli/run_os_cli.rs line 48 at r7 (raw file):
#[clap(long, short = 'o', default_value = "stdout")] output_path: String, },
Looks like it needs to follow the same structure as the above (if this is changed in a future PR it's OK).
Code quote:
DumpProgramHash {
/// File path to output.
#[clap(long, short = 'o', default_value = "stdout")]
output_path: String,
},crates/starknet_committer_and_os_cli/src/os_cli/commands.rs line 115 at r7 (raw file):
}; // Dumping the `Program` struct won't work - it is not deserializable via cairo-lang's Program // class. JSONify the raw bytes instead.
The first Program is the starknet_api struct (for Cairo 0)? Isn't this struct and the Python class compatible?
Code quote:
// Dumping the `Program` struct won't work - it is not deserializable via cairo-lang's Program
// class. JSONify the raw bytes instead.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @amosStarkware, @nimrod-starkware, and @TzahiTaub)
.github/workflows/committer_and_os_cli_push.yml line 82 at r7 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Is this included in the
install_builld_toolsscript?
in the bootstrap script
crates/starknet_committer_and_os_cli/src/os_cli/commands.rs line 115 at r7 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
The first
Programis the starknet_api struct (for Cairo 0)? Isn't this struct and the Python class compatible?
it's the VM struct, and no, it is not.
python->VM works, not the other way around
crates/starknet_committer_and_os_cli/src/os_cli/run_os_cli.rs line 48 at r7 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Looks like it needs to follow the same structure as the above (if this is changed in a future PR it's OK).
WDYM? what is missing?
we don't need a program param when dumping the program hash; we get the entire dict (OS + aggregator)
TzahiTaub
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @amosStarkware, @dorimedini-starkware, and @nimrod-starkware)
crates/starknet_committer_and_os_cli/src/os_cli/run_os_cli.rs line 48 at r7 (raw file):
Previously, dorimedini-starkware wrote…
WDYM? what is missing?
we don't need aprogramparam when dumping the program hash; we get the entire dict (OS + aggregator)
OK, switch to DumpProgramHashes instead. The two commands look equivalent, but the hashes are actually all programs' hashes in one file, and the "program" is for a specific program.
crates/starknet_committer_and_os_cli/src/os_cli/commands.rs line 116 at r7 (raw file):
// Dumping the `Program` struct won't work - it is not deserializable via cairo-lang's Program // class. JSONify the raw bytes instead. let os_program_json = serde_json::from_slice::<serde_json::Value>(bytes)
As this can be "any" program
Suggestion:
program_jsonSigned-off-by: Dori Medini <dori@starkware.co>
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware, @nimrod-starkware, and @TzahiTaub)
crates/starknet_committer_and_os_cli/src/os_cli/commands.rs line 116 at r7 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
As this can be "any" program
Done.
TzahiTaub
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r8, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @amosStarkware and @nimrod-starkware)
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r8, 3 of 3 files at r9, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @amosStarkware and @nimrod-starkware)

No description provided.