-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[consensus] verify proposals in parallel, add counters #12209
Conversation
⏱️ 5h 24m total CI duration on this PR
🚨 1 job on the last run was significantly faster/slower than expected
|
proof_with_status | ||
.proofs | ||
.par_iter() | ||
.try_for_each(|proof| proof.verify(validator))?; |
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.
we may want to chunk them instead of every single one, spawn task is non trivial as well
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.
+1, rayon spawn is very expensive - especially done on small item. Use a min size with the parallel item.
@@ -85,17 +85,24 @@ impl UnverifiedEvent { | |||
max_num_batches: usize, | |||
max_batch_expiry_gap_usecs: u64, | |||
) -> Result<VerifiedEvent, VerifyError> { | |||
let start_time = Instant::now(); |
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.
we can use monitor! macro instead?
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.
Not sure we want to create a separate one for each event. Isn't it a bit cleaner to have a separate HistogramVec?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
For blocks with many batches, using par_iter significantly improves proposal processing time.
The counters were used to find this issue in prep for previewnet.
Test Plan
Observe counters changed in forge. Existing forge tests.