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

Gossipsub Protocol #898

Merged
merged 113 commits into from Jan 24, 2020
Merged

Gossipsub Protocol #898

merged 113 commits into from Jan 24, 2020

Conversation

@AgeManning
Copy link
Contributor

@AgeManning AgeManning commented Jan 29, 2019

This is an implementation of the gossipsub protocol as in the libp2p-specs.

This is feature-complete, except for the control-message piggy-backing and peer-tagging, which still need to be implemented.

Currently this implementation is not backwards compatible with floodsub nodes (see #880).

Further testing and debugging will be done over the next few weeks.

protocols/gossipsub/examples/chat.rs Outdated Show resolved Hide resolved
protocols/gossipsub/regen_structs_proto.sh Outdated Show resolved Hide resolved
protocols/gossipsub/Cargo.toml Outdated Show resolved Hide resolved
protocols/gossipsub/Cargo.toml Outdated Show resolved Hide resolved
protocols/gossipsub/rpc.proto Outdated Show resolved Hide resolved
protocols/gossipsub/src/layer.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/layer.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/mcache.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/layer.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/layer.rs Outdated Show resolved Hide resolved
AgeManning added 26 commits Jan 15, 2019
- Adds the log crate and implements logging macros
- Specifies versions for external crates
- Adds basic documentation, overview and examples to the gossipsub
crate.
This commit also adds the inject_connected test.
- Modifies `handle_received_subscriptions` to take a reference of
subscriptions
- Adds `test_subscribe`
- Adds `test_handle_received_subscriptions`
- Adds tests for the filter in `get_random_peers`
@AgeManning
Copy link
Contributor Author

@AgeManning AgeManning commented Jan 15, 2020

I've got a tracking branch for gossipsub stable futures in the sigp repo. I can merge your commits in and complete the upgrade, in the new branch targeting latest master, if you don't want to (not got the time) to complete sigp#22 yourself.
Let me know. :)

@mxinden
Copy link
Member

@mxinden mxinden commented Jan 15, 2020

Just updated sigp#22, sorry for the delay.

@AgeManning
Copy link
Contributor Author

@AgeManning AgeManning commented Jan 23, 2020

Ok. Stable-futures and latest master have been merged in.

Copy link
Member

@tomaka tomaka left a comment

I only gave a brief looked, and I'm tempted to trust @mxinden's review when it comes to the logic.

protocols/gossipsub/regen_structs_proto.sh Outdated Show resolved Hide resolved
protocols/gossipsub/src/config.rs Outdated Show resolved Hide resolved
protocols/gossipsub/src/protocol.rs Show resolved Hide resolved
@AgeManning
Copy link
Contributor Author

@AgeManning AgeManning commented Jan 24, 2020

Applied @tomaka's suggestions and re-merged master.

@mxinden
Copy link
Member

@mxinden mxinden commented Jan 24, 2020

I have another pull request following up on the inbound substream error handling discussion: sigp#24. I think the discussion is worth having. I don't think it should block this pull request.

Copy link
Member

@mxinden mxinden left a comment

I only gave a brief looked, and I'm tempted to trust @mxinden's review when it comes to the logic.

I would interpret this as an approval @tomaka? Anyone else wanting to give this a review?

I have a couple of smaller comments left, but I think this is in a great merge-able state.

Thanks @AgeManning for all the hard work!

@tomaka
tomaka approved these changes Jan 24, 2020
Copy link
Member

@tomaka tomaka left a comment

+1 for merging! I haven't actually looked at the logic, but the general code organization and clean-ness looks code.

@tomaka
Copy link
Member

@tomaka tomaka commented Jan 24, 2020

@AgeManning Are we good for merging this?

@AgeManning
Copy link
Contributor Author

@AgeManning AgeManning commented Jan 24, 2020

Yep I think so. I've not updated the code base I'm using to stable futures yet, so haven't tested this version at any scale.
There may be a few more PRs to add things like message signing. But I think the current state is usable and fits better in the libp2p code base with proper versioning rather than the fork I'm maintaining.

If this sounds good to you guys, merge away :)

@tomaka tomaka merged commit 37c7d73 into libp2p:master Jan 24, 2020
3 checks passed
3 checks passed
ci/circleci: integration-test Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: test-wasm Your tests passed on CircleCI!
Details
@thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented May 11, 2020

There may be a few more PRs to add things like message signing.

Is there already an issue tracking this somewhere? I couldn't find anything but would be interested in following it's progress and to coordinate potential contributions :)

@AgeManning
Copy link
Contributor Author

@AgeManning AgeManning commented May 13, 2020

@thomaseizinger
I am planning on building gossipsub 1.1. Ideally starting in a week. I can put the PR up to track if you like.
I'll add the message signing in as I go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants