diff --git a/LICENSE b/LICENSE index 2610033..55d4ece 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,8 @@ -The MIT License (MIT) +This project is transitioning from an MIT-only license to a dual MIT/Apache-2.0 license. +Unless otherwise noted, all code contributed prior to 2019-05-06 and not contributed by +a user listed in [this signoff issue](https://github.com/ipfs/go-ipfs/issues/6302) is +licensed under MIT-only. All new contributions (and past contributions since 2019-05-06) +are licensed under a dual MIT/Apache-2.0 license. -Copyright (c) 2016 Jeromy Johnson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 \ No newline at end of file diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..4c83a28 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,5 @@ +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..749aa1e --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 915efd4..e606886 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,20 @@ # go-libp2p-pubsub -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai) -[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://github.com/libp2p/libp2p) -[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) -[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io) +

+ + + + +

+ +

+ + + + + +
+

> A pubsub system with flooding and gossiping variants. @@ -15,15 +26,27 @@ We currently provide three implementations: See [spec](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) and [implementation](https://github.com/libp2p/go-libp2p-pubsub/blob/master/gossipsub.go) for more details. - randomsub, which is a simple probabilistic router that propagates to random subsets of peers. +## Repo Lead Maintainer + +[@vyzo](https://github.com/vyzo/) + +> This repo follows the [Repo Lead Maintainer Protocol](https://github.com/ipfs/team-mgmt/blob/master/LEAD_MAINTAINER_PROTOCOL.md) + ## Table of Contents + + + - [Install](#install) - [Usage](#usage) +- [Implementations](#implementations) - [Documentation](#documentation) - [Tracing](#tracing) - [Contribute](#contribute) - [License](#license) + + ## Install ``` @@ -34,23 +57,54 @@ go get github.com/libp2p/go-libp2p-pubsub To be used for messaging in p2p instrastructure (as part of libp2p) such as IPFS, Ethereum, other blockchains, etc. -## Implementations +### Examples -See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations). +`To be written` ## Documentation -See the [libp2p specs](https://github.com/libp2p/specs/tree/master/pubsub) for high level documentation -and [godoc](https://godoc.org/github.com/libp2p/go-libp2p-pubsub) for API documentation. +See the [libp2p specs](https://github.com/libp2p/specs/tree/master/pubsub) for high level documentation and [godoc](https://godoc.org/github.com/libp2p/go-libp2p-pubsub) for API documentation. +### In this repo, you will find -## Tracing +See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations). -The pubsub system supports _tracing_, which collects all events pertaining to the internals of the system. -This allows you to recreate the complete message flow and state of the system for analysis purposes. +``` +. +├── LICENSE +├── README.md +# Regular Golang repo set up +├── codecov.yml +├── pb +├── go.mod +├── go.sum +├── doc.go +# PubSub base +├── pubsub.go +├── blacklist.go +├── notify.go +├── comm.go +├── discovery.go +├── sign.go +├── subscription.go +├── topic.go +├── trace.go +├── tracer.go +├── validation.go +# Floodsub router +├── floodsub.go +# Randomsub router +├── randomsub.go +# Gossipsub router +├── gossipsub.go +└── mcache.go +``` -To enable tracing, instantiate the pubsub system using the `WithEventTracer` option; the option -accepts a tracer with three available implementations in-package (trace to json, pb, or a remote peer). +### Tracing + +The pubsub system supports _tracing_, which collects all events pertaining to the internals of the system. This allows you to recreate the complete message flow and state of the system for analysis purposes. + +To enable tracing, instantiate the pubsub system using the `WithEventTracer` option; the option accepts a tracer with three available implementations in-package (trace to json, pb, or a remote peer). If you want to trace using a remote peer, you can do so using the `traced` daemon from [go-libp2p-pubsub-tracer](https://github.com/libp2p/go-libp2p-pubsub-tracer). The package also includes a utility program, `tracestat`, for analyzing the traces collected by the daemon. For instance, to capture the trace as a json file, you can use the following option: @@ -89,8 +143,7 @@ Small note: If editing the README, please conform to the [standard-readme](https ## License -[MIT](LICENSE) © Jeromy Johnson +The go-libp2p-pubsub project is dual-licensed under Apache 2.0 and MIT terms: ---- - -The last gx published version of this module was: 0.11.16: QmfB4oDUTiaGEqT13P1JqCEhqW7cB1wpKtq3PP4BN8PhQd +- Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](./LICENSE-MIT) or http://opensource.org/licenses/MIT) diff --git a/maintainer.json b/maintainer.json new file mode 100644 index 0000000..779eae4 --- /dev/null +++ b/maintainer.json @@ -0,0 +1,11 @@ +{ + "repoLeadMaintainer": { + "name": "Dimitris Vyzovitis", + "email": "vyzo@protocol.ai", + "username": "@vyzo" + }, + "workingGroup": { + "name": "libp2p", + "entryPoint": "https://github.com/libp2p/libp2p" + } +} \ No newline at end of file