-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[On ice] Gossipsub: an extensible baseline pubsub protocol, based on randomized topic meshes and gossip #767
Conversation
….rs, add constants.rs, doc comments.
If gossipsub needs to be compatible with floodsub on the protocol layer, I don't think you need to duplicate everything. You should be able to add a dependency on |
Thanks for the suggestion, yeah I was thinking about this more. |
I started duplicating
|
Feel free to ping me when you want a review. :) |
Sure, will do. I think I only need to duplicate |
Ah I think I'll use |
…with an `Either*` type.
…th a ProtocolsHandlerSelect
Theoretically I think that you only need to implement a |
…lease clean your repository working tree before checkout
…lus mesh, mcache and fanout fields, alter signatures for methods for control messages using impl Trait; adds helper types for Gossip/Prune and a type alias Mesh; and removes topic.rs
Hi, I am ready to do some works on this, what's your problem now when implementing? @jamesray1 |
@daogangtang, I've been preparing/working on gossipsub since June, but lately have been getting into development again. TBH it's probably simpler for me to just work on this solo. There are plenty of TODOs and issues in this repo, why not have a look at some of those and see if any of those wet your whistle? |
Accidentally closed. |
local peer's mesh.
* Start writing check in leave
* Fix compiler errors
been grafted. * Rename methods for clarity * Remove some cloning * Other minor adjustments / helper methods
I think I'm going to stop working on this as it seems that it will not get funded due to #898 (@AgeManning working on the same project, while he has apparently made more progress, he is in the testing/debugging stage) while efforts on that are funded. I think it's best if I just get a job, I can't keep working on projects and not getting funded. I have been working with Ethereum since June 2017 without any funding from the industry, apart from the donation of 30 ETH listed above. Note that this almost completely implements the spec, with some variations around error handling and using message hashes and topic hashes, and with the exception of the heartbeat procedure and only graft actually notifies the grafted peer, with a node_inject_event. I suggest that it is reviewed in addition to #898. |
I can't afford to keep self-funding development. |
This partially implements the spec, with some variations around error handling and using message hashes and topic hashes. Control-message piggy-backing is not implemented, however you can
graft_peers_to_topics()
,graft_peer_to_topics()
,graft_peers_to_topic()
,graft_peer_to_topic()
, and the same for prune.i_have()
,i_want()
, andheartbeat()
are not implemented, as well asGossipSubConfig
, floodsub compatibility, testing and examples. I suggest that it is reviewed in addition to #898, and could possibly be merged wtih that.Gossipsub is a scalable, efficient, extensible baseline pubsub (publish-subscribe, messaging) protocol for p2p networks and decentralized applications on top of them.
See the spec here.
Unlike floodsub, which broadcasts or publishes a message of a topic to all peers that are subscribed to a topic in the network, gossipsub publishes to a subset of peers, known as the target mesh degree, which is chosen as 6 here and in go-gossipsub. Peers request messages of a topic with an
IWant
message and state what they have recently seen in their cache of messages with anIHave
message. This gossipsub implementation in Rust, once complete, will be scalable for decentralized, p2p networks, unlike floodsub, and is thus suited for networks that aim to be mainstream, such as Ethereum 2.0 (as developed in Rust with paritytech/shasper and sigp/lighthouse), parity-ethereum, Polkadot, as well as any other p2p network that uses Rust.Closes #521. Updated for the latest API with handlers like
ProtocolsHandler
andNodeHandler
,NetworkBehaviour
,Topology
, etc.Because gossipsub extends on floodsub and needs to be backwards compatible with it, gossipsub reimplements and adapts much of floodsub. Therefore, please let me know if any changes are made to floodsub, and avoid making changes if feasible.
Donations
Donations to jamesray.eth are appreciated via https://gitcoin.co/grants/42/gossipsub. Thanks to Philippe Castonguay, Peter Kieltyka and Ric Burton from 0xHorizon Games for a 30 ETH one-off donation. Donations also help for previous contributions towards Eth 2 development; Eth docs such as the wiki, Yellow Paper; reviewing research on https://ethresear.ch and papers such as Casper FFG and CBC; plus potential future contributions towards Ethereum development e.g. with paritytech/shasper, which unlike sigp/lighthouse uses substrate, providing various benefits e.g. modularity, flexibility, integration of Wasm, libp2p, GRANDPA consensus, blockchain interoperability, automatic upgradability and governance.
See these timesheets for details of previous contributions from June 2017 until now: https://tinyurl.com/DoDspsht and https://tinyurl.com/Ethtimesht. I think it seems reasonable to work on this full-time after I get ~$36000 USD or DAI / $50000 AUD per year, or $3000 DAI per month. That's not much, and is probably undervalued, particularly given ~1.25 years FTE has been mostly unfunded, but it's enough to work on gossipsub and Eth 2, which will of course be very useful. I will work on this in proportion to how much funding I have. >3000 DAI/m, FT. 1500 DAI/m, at least 18 hours per week, etc. By linear interpolation and dimensional analysis, H/w = X DAI/m / 3000 DAI/m * 35 h/w = X * 0.016667 hr/wk, if total funding per average month is less than 3000 DAI, otherwise at least 35 hours per week.
Grant applications
See also https://twitter.com/JamesCRay01/status/1082138888037003264.