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
- 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`
@mxinden
Copy link
Member

mxinden commented Jan 15, 2020

Just updated sigp#22, sorry for the delay.

@AgeManning
Copy link
Contributor Author

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

Copy link
Member

@tomaka tomaka left a comment

Choose a reason for hiding this comment

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

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

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

@mxinden
Copy link
Member

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

Choose a reason for hiding this comment

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

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!

Copy link
Member

@tomaka tomaka left a comment

Choose a reason for hiding this comment

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

+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 commented Jan 24, 2020

@AgeManning Are we good for merging this?

@AgeManning
Copy link
Contributor Author

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

@thomaseizinger
Copy link
Contributor

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

@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants