Skip to content
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

Add gossipsub as a Lighthouse behaviour #5066

Merged
merged 8 commits into from
Jan 31, 2024

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 ;)

Cargo.toml Outdated Show resolved Hide resolved
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

@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
29 checks passed
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