Skip to content

Conversation

@jxs
Copy link
Member

@jxs jxs commented Sep 10, 2024

Description

superseeds #4914 with some changes and improvements, namely:

  • introduce a Delay for Forward and Publish messages, messages that take more than the configured delay to be sent are discarded
  • introduce scoring and penalize slow peers
  • remove control pool
  • report slow peers with the number of failed messages

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 6d406e1 to 5e349f5 Compare September 10, 2024 22:44
@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 5e349f5 to 00cde64 Compare September 10, 2024 22:52
Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

I’ve left a few small comments.

@guillaumemichel guillaumemichel self-requested a review September 24, 2024 14:49
Copy link
Contributor

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

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

It would be great to add new tests for the introduced backpressure

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 for the reviews Akihito and Gui!

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from 8564d5e to 887fe07 Compare October 31, 2024 10:27
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.

It would be great to add new tests for the introduced backpressure

yup for sure thanks for the suggestion Gui! Added some tests

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from ee51578 to ec0e0b4 Compare November 4, 2024 10:29
@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from ec0e0b4 to c9e6602 Compare November 4, 2024 12:07
Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

Thanks João, LGTM!

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.

Few comments and nit picks.

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2024

This pull request has merge conflicts. Could you please resolve them @jxs? 🙏

refactor(gossipsub): use `send_message` for all RpcOut
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.

Think I addressed everything, can you take another look Elena? Thanks!

@elenaf9
Copy link
Member

elenaf9 commented Nov 22, 2024

I think the new rpc module was accidentally not included in 602c46f? 😇
But everything else looks good to me! Just one remaining open comment about whether in the case that the channel is full and publishing failed, we should also update the metrics same as when a message is dropped?

@jxs
Copy link
Member Author

jxs commented Nov 23, 2024

I think the new rpc module was accidentally not included in 602c46f? 😇 But everything else looks good to me! Just one remaining open comment about whether in the case that the channel is full and publishing failed, we should also update the metrics same as when a message is dropped?

ah right! Added the rpc module. The unresolved conversations were from before your PR was merged, now metrics are being record on send_message and cover the cases you commented right?

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!

@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from b60cfd6 to e1c06db Compare November 25, 2024 11:51
@jxs jxs force-pushed the impl-gossipsub-backpressure-2 branch from f772792 to d8e3957 Compare November 25, 2024 12:30
@jxs jxs added the send-it label Nov 25, 2024
@mergify mergify bot merged commit 2371922 into libp2p:master Nov 25, 2024
70 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels