Skip to content

Gossipsub Protocol#898

Merged
tomaka merged 113 commits into
libp2p:masterfrom
sigp:gossipsub
Jan 24, 2020
Merged

Gossipsub Protocol#898
tomaka merged 113 commits into
libp2p:masterfrom
sigp:gossipsub

Conversation

@AgeManning

@AgeManning AgeManning commented Jan 29, 2019

Copy link
Copy Markdown
Contributor

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.

Comment thread protocols/gossipsub/src/protocol.rs Outdated
Comment thread protocols/gossipsub/examples/chat.rs Outdated
Comment thread protocols/gossipsub/regen_structs_proto.sh Outdated
Comment thread protocols/gossipsub/Cargo.toml Outdated
Comment thread protocols/gossipsub/Cargo.toml Outdated
Comment thread protocols/gossipsub/rpc.proto Outdated
Comment thread protocols/gossipsub/src/layer.rs Outdated
Comment thread protocols/gossipsub/src/layer.rs Outdated
Comment thread protocols/gossipsub/src/mcache.rs Outdated
Comment thread protocols/gossipsub/src/layer.rs Outdated
Comment thread protocols/gossipsub/src/layer.rs Outdated
- 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

mxinden commented Jan 15, 2020

Copy link
Copy Markdown
Member

Just updated sigp#22, sorry for the delay.

@AgeManning

Copy link
Copy Markdown
Contributor Author

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

@tomaka tomaka left a comment

Copy link
Copy Markdown
Member

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.

Comment thread protocols/gossipsub/regen_structs_proto.sh Outdated
Comment thread protocols/gossipsub/src/config.rs Outdated
Comment thread protocols/gossipsub/src/protocol.rs
@AgeManning

Copy link
Copy Markdown
Contributor Author

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

@mxinden

mxinden commented Jan 24, 2020

Copy link
Copy Markdown
Member

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.

@mxinden mxinden left a comment

Copy link
Copy Markdown
Member

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!

@tomaka tomaka left a comment

Copy link
Copy Markdown
Member

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

tomaka commented Jan 24, 2020

Copy link
Copy Markdown
Member

@AgeManning Are we good for merging this?

@AgeManning

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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