* Simplify trait bounds requirements
* More work
* Moar
* Finish
* Fix final tests
* More simplification
* Use separate traits for Inbound/Outbound
* Update gossipsub and remove warnings
* Add documentation to swarm
* Remove BoxSubstream
* Fix tests not compiling
* Fix stack overflow
* Address concerns
* For some reason my IDE ignored libp2p-kad
* Addressing #473 ... if I understood the ticket right, we want to pass through whatever the application provides as a topic identifier, leaving hashing (or not hashing) up to the application.
* Remove TopicDescriptor and use Topic newtype everywhere
* PR feedback
Use From<Topic> instead of Into<String>
Use impl Into<Topic> instead of Topic in public API
Co-authored-by: Peat Bakke <peat@peat.org>
* misc/mdns: Make MdnsService::new sync by using std::net::UdpSocket::bind
MdnsService uses an IP address to create a UDP socket. The address does
not need to be resolved. Therefore one can use std's UdpSocket::bind
instead of the async counterpart from async-std. As a result
MdnsService::new and MdnsService::silent don't need to be async.
* examples/mdns-passive-discovery: Don't await sync MdnsService::new
* misc/mdns/src/behaviour: Make Mdns::new sync
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* add docs about deriving NetworkBehaviour
* add commentary to the chat example
also minor stuff like reordering to match the struct elements, note why the listening address is
reported in poll.
* fix remove the warning on the example ignored field
* Apply suggestions from code review
Thanks for suggestions!
Co-Authored-By: Max Inden <mail@max-inden.de>
* chore cleanup added docs after suggestions
* fix print all listening addresses in examples/chat
not that there should be more than one but it makes sense to repeat the full example here.
* chore remove confusing writing on printing the listening addrs
* fix use intra-docs, spelling
Co-Authored-By: Roman S. Borschel <roman@parity.io>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
* Configurable multistream-select protocol. Add V1Lazy variant. (#1245)
Make the multistream-select protocol (version) configurable
on transport upgrades as well as for individual substreams.
Add a "lazy" variant of multistream-select 1.0 that delays
sending of negotiation protocol frames as much as possible
but is only safe to use under additional assumptions that
go beyond what is required by the multistream-select v1
specification.
* Improve the code readability of the chat example (#1253)
* Add bridged chats (#1252)
* Try fix CI (#1261)
* Print Rust version on CI
* Don't print where not appropriate
* Change caching strategy
* Remove win32 build
* Remove win32 from list
* Update libsecp256k1 dep to 0.3.0 (#1258)
* Update libsecp256k1 dep to 0.3.0
* Sign now cannot fail
* Upgrade url and percent-encoding deps to 2.1.0 (#1267)
* Upgrade percent-encoding dep to 2.1.0
* Upgrade url dep to 2.1.0
* Fix more conflicts
* Revert CIPHERS set to null (#1273)
* Consolidate keypairs in core.
Introduce the concept of a node's identity keypair in libp2p-core,
instead of only the public key:
* New module: libp2p_core::identity with submodules for the currently
supported key types. An identity::Keypair and identity::PublicKey
support the creation and verification of signatures. The public key
supports encoding/decoding according to the libp2p specs.
* The secio protocol is simplified as a result of moving code to libp2p-core.
* The noise protocol is slightly simplified by consolidating ed25519
keypairs in libp2p-core and using x25519-dalek for DH. Furthermore,
Ed25519 to X25519 keypair conversion is now complete and tested.
Generalise over the DH keys in the noise protocol.
Generalise over the DH keys and thus DH parameter in handshake patterns
of the Noise protocol, such that it is easy to support other DH schemes
in the future, e.g. X448.
* Address new review comments.
* Embed the topology in the NetworkBehaviour
* Put topologies inside of Floodsub and Kad
* Fix core tests
* Fix chat example
* More work
* Some cleanup
* Restore external addresses system
* Move the MdnsService to a service module
* Add a Mdns behaviour
* Add a Mdns network behaviour
* Add minor documentation
* Add minor todo
* Use nat_traversal on the observed address
* Don't add self to topology
* Automatically connect to nodes we discover
* Add Debug implementations
* Fix example
* Add a floodsub example with the new Swarm
* WIP fixes for Floodsub chat-example code
* cleanup
* Address grumbles
* Update docs
* Update to newest master