Skip to content

Conversation

@jxs
Copy link
Member

@jxs jxs commented May 12, 2025

Description

while refactoring scoring for libp2p/specs#664 I recalled #5711 and so this PR changed scope from a refactor to a feature.
Per commit review is suggested for an easier experience.
CC @drHuangMHT

@jxs jxs requested a review from elenaf9 May 12, 2025 14:44
@jxs jxs force-pushed the refactor-scoring branch 2 times, most recently from 44817d7 to ad513bc Compare May 12, 2025 14:49
@jxs jxs force-pushed the refactor-scoring branch from a81e06c to d1ca798 Compare May 13, 2025 13:32
jxs and others added 4 commits May 13, 2025 15:30
replace Option<PeerScore> with PeerScoreState to allow to ease that move
by returning the penalties in the score report insteadw
@jxs jxs force-pushed the refactor-scoring branch from d1ca798 to 4d9f3bc Compare May 13, 2025 14:31
@elenaf9 elenaf9 linked an issue May 15, 2025 that may be closed by this pull request
Copy link
Member

@elenaf9 elenaf9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the refactor, I think it improves readability.

I don't really have an opinion on whether we should/ need to feature-gate the metrics code, but this PR solves it quite nicely without impacting readability too much.

Copy link
Member Author

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Elena! Addressed your comments, if it's conforming feel free to approve and send-it

Copy link
Member

@elenaf9 elenaf9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mergify mergify bot merged commit 60e93e7 into libp2p:master May 15, 2025
71 checks passed
@jxs jxs deleted the refactor-scoring branch May 16, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

protocols/gossipsub: Consider feature-gating the metrics support

3 participants