-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_api: calculate block commitments in parallel #10434
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
starknet_api: calculate block commitments in parallel #10434
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Artifacts upload workflows: |
yoavGrs
left a comment
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.
@yoavGrs reviewed 8 of 8 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)
dorimedini-starkware
left a comment
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.
@dorimedini-starkware reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware)
a discussion (no related file):
can you open a py-side pr to make sure there is no runtime issue with computing block hash?
crates/starknet_api/src/block_hash/block_hash_calculator.rs line 231 at r1 (raw file):
let (transaction_commitment, event_commitment, receipt_commitment, state_diff_commitment) = tokio::try_join!(transaction_task, event_task, receipt_task, state_diff_task) .expect("Failed to join block commitments tasks.");
why spawn_blocking and not spawn?
Code quote:
// Spawn tasks for parallel execution
let transaction_task = spawn_blocking(move || {
calculate_transaction_commitment::<Poseidon>(&transaction_leaf_elements)
});
let event_task =
spawn_blocking(move || calculate_event_commitment::<Poseidon>(&event_leaf_elements));
let receipt_task =
spawn_blocking(move || calculate_receipt_commitment::<Poseidon>(&receipt_elements));
let state_diff_task = spawn_blocking(move || calculate_state_diff_hash(&state_diff));
// Wait for all tasks to complete.
let (transaction_commitment, event_commitment, receipt_commitment, state_diff_commitment) =
tokio::try_join!(transaction_task, event_task, receipt_task, state_diff_task)
.expect("Failed to join block commitments tasks.");
nimrod-starkware
left a comment
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, 2 unresolved discussions (waiting on @dorimedini-starkware)
a discussion (no related file):
Previously, dorimedini-starkware wrote…
can you open a py-side pr to make sure there is no runtime issue with computing block hash?
https://github.com/starkware-industries/starkware/pull/39579
Passed without any op, can i close?
dorimedini-starkware
left a comment
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, 2 unresolved discussions (waiting on @nimrod-starkware)
a discussion (no related file):
Previously, nimrod-starkware wrote…
https://github.com/starkware-industries/starkware/pull/39579
Passed without any op, can i close?
yes
nimrod-starkware
left a comment
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 @dorimedini-starkware)
crates/starknet_api/src/block_hash/block_hash_calculator.rs line 231 at r1 (raw file):
Previously, dorimedini-starkware wrote…
why
spawn_blockingand notspawn?
Discussed offline
dorimedini-starkware
left a comment
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:
complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
b7d2e1d

No description provided.