-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(papyrus_network): add broadcast and sqmr metrics structs #4046
Conversation
AlonLStarkWare
commented
Feb 9, 2025
- refactor(papyrus_network): require network mamanger metrics when constructing nm
- refactor(papyrus_network): clean up metrics tracking
- feat(papyrus_network): add broadcast and sqmr metrics structs
Artifacts upload workflows: |
9daba93
to
b187b68
Compare
Benchmark movements: |
d04b599
to
7f33203
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 5 files at r3, 3 of 3 files at r4, all commit messages.
Reviewable status: 7 of 17 files reviewed, 6 unresolved discussions (waiting on @eitanm-starkware and @noamsp-starkware)
crates/starknet_consensus_manager/src/consensus_manager.rs
line 64 at r4 (raw file):
} // TODO(alonl): consider splitting the metrics by topic
Move this TODO to papyrus_network on top of the BroadcastNetworkMetrics struct definition
crates/papyrus_network/src/network_manager/network_manager_metrics.rs
line 15 at r4 (raw file):
} pub struct SqmrNetworkMetrics {}
As discussed be-al pe, move num_active_*_sessions to here.
This means you can remove those metrics from mempool p2p and consensus
crates/papyrus_network/src/network_manager/mod.rs
line 526 at r4 (raw file):
event: gossipsub_impl::ExternalEvent, ) -> Result<(), NetworkError> { if let Some(metrics) = self.metrics.as_ref() {
use and_then to squash these two if-let into one if-let
crates/papyrus_network/src/network_manager/mod.rs
line 526 at r4 (raw file):
event: gossipsub_impl::ExternalEvent, ) -> Result<(), NetworkError> { if let Some(metrics) = self.metrics.as_ref() {
Unrelated to the PR, could you add a trace level log that we received a broadcast message and display the topic?
crates/papyrus_network/src/network_manager/mod.rs
line 604 at r4 (raw file):
fn broadcast_message(&mut self, message: Bytes, topic_hash: TopicHash) { if let Some(metrics) = self.metrics.as_ref() {
Same here
crates/papyrus_network/src/network_manager/mod.rs
line 604 at r4 (raw file):
fn broadcast_message(&mut self, message: Bytes, topic_hash: TopicHash) { if let Some(metrics) = self.metrics.as_ref() {
Unrelated to the PR, could you add a trace level log that we're sending a broadcast message and display the topic?
7f33203
to
e75d412
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 18 files reviewed, 4 unresolved discussions (waiting on @eitanm-starkware, @noamsp-starkware, and @ShahakShama)
crates/papyrus_network/src/network_manager/mod.rs
line 526 at r4 (raw file):
Previously, ShahakShama wrote…
Unrelated to the PR, could you add a trace level log that we received a broadcast message and display the topic?
Done
crates/papyrus_network/src/network_manager/mod.rs
line 526 at r4 (raw file):
Previously, ShahakShama wrote…
use and_then to squash these two if-let into one if-let
Done.
crates/papyrus_network/src/network_manager/mod.rs
line 604 at r4 (raw file):
Previously, ShahakShama wrote…
Same here
Done.
crates/papyrus_network/src/network_manager/mod.rs
line 604 at r4 (raw file):
Previously, ShahakShama wrote…
Unrelated to the PR, could you add a trace level log that we're sending a broadcast message and display the topic?
Done
crates/starknet_consensus_manager/src/consensus_manager.rs
line 64 at r4 (raw file):
Previously, ShahakShama wrote…
Move this TODO to papyrus_network on top of the BroadcastNetworkMetrics struct definition
Done.
crates/papyrus_network/src/network_manager/network_manager_metrics.rs
line 15 at r4 (raw file):
Previously, ShahakShama wrote…
As discussed be-al pe, move num_active_*_sessions to here.
This means you can remove those metrics from mempool p2p and consensus
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 11 of 13 files at r6, 7 of 7 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware and @noamsp-starkware)
2a766c7
to
fa7ec6d
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 11 of 11 files at r8, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware and @noamsp-starkware)