Skip to content

Conversation

AgeManning
Copy link
Member

@AgeManning AgeManning commented Jan 15, 2024

This PR moves gossipsub into the lighthouse_network repository.

This allows us to move a little bit quicker and add lighthouse-specific changes to our gossipsub behaviour without worrying about upstream users who may depend on the code.

This currently introduced tracing as a logging dependency. We might want to consider shifting to slog, but still filtering the logs into a separate file.

I've left this as tracing log for the time being.

This PR also introduce the following changes to the gossipsub protocol:

  • Apply back pressure by setting a limit in the ConnectionHandler message queue. The default is 5000 messages, but users can change that value via Config::connection_handler_queue_len()

Copy link
Member

@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.

LGTM Age, only one remark ;)

libp2p-mplex = { git = "https://github.com/sigp/rust-libp2p/", rev = "b96b90894faab0a1eed78e1c82c6452138a3538a" }

[dependencies.libp2p]
git = "https://github.com/sigp/rust-libp2p/"
Copy link
Member

Choose a reason for hiding this comment

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

we can depend on sigp/rust-libp2p master after sigp/rust-libp2p#566 gets merged

@AgeManning AgeManning force-pushed the lighthouse-behaviour branch from 324f873 to 39fbd19 Compare January 16, 2024 01:14
@AgeManning AgeManning force-pushed the lighthouse-behaviour branch from 39fbd19 to f83f9b3 Compare January 16, 2024 01:16
@dapplion dapplion added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label Jan 29, 2024
@AgeManning
Copy link
Member Author

@Mergifyio queue

Copy link

mergify bot commented Jan 31, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 4273004

mergify bot added a commit that referenced this pull request Jan 31, 2024
@AgeManning AgeManning added ready-for-merge This PR is ready to merge. and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jan 31, 2024
@mergify mergify bot merged commit 4273004 into sigp:unstable Jan 31, 2024
danielrachi1 pushed a commit to danielrachi1/lighthouse that referenced this pull request Feb 14, 2024
* Move gossipsub as a lighthouse behaviour

* Update dependencies, pin to corrected libp2p version

* Merge latest unstable

* Fix test

* Remove unused dep

* Fix cargo.lock

* Re-order behaviour, pin upstream libp2p

* Pin discv5 to latest version
@pawanjay176 pawanjay176 mentioned this pull request Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants