1345 Commits

Author SHA1 Message Date
James Ray
60dca37bb7 it -> this (#784) 2018-12-17 10:41:56 +01:00
Pierre Krieger
123cfcda02
Add helpers for easier Transports creation (#777)
* Add helpers for easier Transports creation

* Fix doctests
2018-12-14 10:41:54 +01:00
Pierre Krieger
40a503fd63
Store information about the local node in the topology (#772)
* Store information about the local node in the topology

* Fix build

* Store the external addresses in the topology
2018-12-13 19:06:13 +01:00
Pierre Krieger
e2ff74994c
Upgrade secio to the 2018 edition (#774)
* Upgrade secio to the 2018 edition

* Fix build with features on

* Fix emscripten build
2018-12-13 18:54:28 +01:00
Pierre Krieger
7b8e3dd613
Switch ping to edition 2018 (#780) 2018-12-13 15:34:35 +01:00
Pierre Krieger
0803e36d5a
Remove PeriodicIdentifyListen and IdentifyListen (#769)
* Remove PeriodicIdentifyListen and IdentifyListen

* Fix tests

* Fix core-derive
2018-12-13 13:53:19 +01:00
Pierre Krieger
7da651bf32
Add an IdentifyTopology (#770) 2018-12-11 17:00:29 +01:00
Pierre Krieger
69684a97b2
More precise errors in the nodes module (#765)
* More precise errors in the nodes module

* Typo

* Prove the panics
2018-12-11 15:36:41 +01:00
Toralf Wittner
a152e18821
Simplify handling of upgrade information. (#761) 2018-12-11 15:13:10 +01:00
Pierre Krieger
2dce4294a0
Add version numbers in the deps in Cargo.toml (#768) 2018-12-11 14:54:44 +01:00
Pierre Krieger
581778ba92
Move the transport timeout to libp2p_core (#764) 2018-12-11 10:56:24 +01:00
Toralf Wittner
2253c82b86
multistream-select: Update to 2018 edition. (#766) 2018-12-11 10:45:28 +01:00
Pierre Krieger
d06eb67353
Add a mDNS network behaviour (#736)
* 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
2018-12-10 16:00:16 +01:00
Pierre Krieger
460f083a0d
Remove weird line from readme (#763) 2018-12-10 14:41:31 +01:00
Pierre Krieger
a8a6438fbc
Rename libp2p-tcp-transport to libp2p-tcp (#762) 2018-12-10 13:39:11 +01:00
Pierre Krieger
05e4a84da3
Rename PeriodicIdentification to PeriodicIdHandler (#757)
* Rename PeriodicIdentification to PeriodicIdentificationHandler

* Concern
2018-12-07 19:21:02 +01:00
Pierre Krieger
d94a768bd9
Rename multiaddr and mulithash to parity-* (#737)
* Rename multiaddr and mulithash to parity-*

* Fix doctests
2018-12-07 15:40:02 +01:00
Pierre Krieger
8d8fc75a4e
Add a dial priority system (#753) 2018-12-07 14:43:51 +01:00
Toralf Wittner
dd5fb17a2b
Rename OrUpgrade to SelectUpgrade. (#751)
Also remove `InboundUpgrade.or_inbound` and `OutboundUpgrade.or_outbound`.
2018-12-07 11:39:18 +01:00
James Ray
299758c853 Add a crate doc comment with link to Yamux spec. (#747) 2018-12-07 11:18:25 +01:00
James Ray
2fc2a8c918 Add a crate doc comment for floodsub (#748) 2018-12-07 10:39:21 +01:00
Pierre Krieger
6b93f02f6d
Add an Identify behaviour (#741)
* Add an Identify behaviour

* Report observed address in PeriodicIdentify

* Reexport IdentifyEvent

* Concerns

* Concerns
2018-12-07 10:23:38 +01:00
Pierre Krieger
2ef4d779ca
Add metadata to all the Cargo.toml (#743) 2018-12-06 19:22:06 +01:00
Daogang Tang
371905c876 rename PeriodicIdentifyBehaviour to PeriodicIdentify. (#738)
* rename PeriodicIdentifyBehaviour to PeriodicIdentify.

Signed-off-by: Daogang Tang <daogangtang@gmail.com>

* fix renaming PeriodicIdentifyBehaviour to PeriodicIdentify in misc/core-derive/tests/test.rs.

Signed-off-by: Daogang Tang <daogangtang@gmail.com>
2018-12-06 13:30:55 +01:00
Pierre Krieger
9102266d70
Rename all the network behaviours to more basic names (#726)
* Rename FloodsubBehaviour to Floodsub

* Rename Ping behaviours

* Rename identify
2018-12-05 17:04:25 +01:00
Toralf Wittner
4140047f34 Avoid some warnings. (#733)
- mdns: unused `Result` which must be used
- kad: unused import
- mplex: use of deprecated item
2018-12-05 15:01:17 +01:00
James Ray
b2367e59ce Add error messages for interrupt (#704)
* Add error messages for interrupt

* Change to use enum InterruptErr

* Add a clarification for Connected variant.

* Grammar fix

* CollectionStream.interrupt() -> interrupt()

* Implement suggestions

* Fix: Error and Display as traits

* Update used variants

* Update core/src/nodes/collection.rs

Co-Authored-By: jamesray1 <16969914+jamesray1@users.noreply.github.com>

* Add Display and Error impls

* Adjust interrupting_an_established_connection_is_err test

* Update interrupting_a_connection_attempt_twice_is_err

* Remove a blank line

* use assert_matches!

* Remove PartialEq

* Remove source from impl:Error
2018-12-05 14:47:06 +01:00
Pierre Krieger
9e0f110e47
Remove relay, peerstore and datastore (#723) 2018-12-04 14:52:14 +01:00
Pierre Krieger
57ebe697b5
Don't add an address to the topology if it is already in (#724)
* Don't add an address to the topology if it is already in

* Update core/src/topology/mod.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2018-12-04 14:05:05 +01:00
Pierre Krieger
10d76d64d0
Add a few more methods to Swarm and PollParameters (#721) 2018-12-04 13:54:04 +01:00
Pierre Krieger
b727cad62a
Some changes to the main libp2p doc (#710)
* Some changes to the main libp2p doc

* Update src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2018-12-04 13:33:07 +01:00
David
b5d12e0afc
Don't wrap yamux::Connection in a mutex (#719)
Get rid of double mutex

* Use inherent `poll()` that takes an immutable ref

* Remove parking_lot dependency from yamux

* Update muxers/yamux/Cargo.toml

Co-Authored-By: dvdplm <dvdplm@gmail.com>
2018-12-04 12:08:00 +01:00
Toralf Wittner
730558985f
relay: Use SliceRandom::shuffle. (#722)
Fixes deprecation warning related to `Rng::shuffle` which recommends
`SliceRandom::shuffle` instead.
2018-12-04 11:54:47 +01:00
Toralf Wittner
acfa1c9c79
Remove some boxed futures. (#718) 2018-12-04 11:24:59 +01:00
Toralf Wittner
a5766fdfac
Fix several errors reported by clippy. (#715) 2018-12-04 11:12:49 +01:00
James Ray
1c247a5914 substream -> substreams (#720) 2018-12-04 10:32:51 +01:00
Pierre Krieger
c5d08ab48c
Enhance the swarm a bit (#711)
* Replace the &mut TTopology with a &mut PollParameters

* Add supported_protocols

* Add external_addresses

* Report out addresses in Kademlia

* Fix the custom derive

* Some comments

* Fix compilation on stable
2018-12-01 13:34:57 +01:00
Toralf Wittner
69eafd9869 multiaddr: change UDP constant from 17 to 273. (#714)
Fixes #692
2018-11-30 21:10:49 +01:00
James Ray
3c614c23ac Add &message.source in println! as per … (#705)
* Add &message.source in println! as per https://github.com/libp2p/rust-libp2p/issues/702#issuecomment-442726078.

Co-authored-by: David <dvdplm@gmail.com>

* Update examples/chat.rs

Co-Authored-By: jamesray1 <16969914+jamesray1@users.noreply.github.com>
2018-11-30 09:55:59 +01:00
David
b269d6184e Use UpgradeError::into_io_error (#709)
* Use UpgradeError::into_io_error

* Update core/src/transport/upgrade.rs

Co-Authored-By: dvdplm <dvdplm@gmail.com>

* Update core/src/transport/upgrade.rs

Co-Authored-By: dvdplm <dvdplm@gmail.com>
2018-11-30 08:34:04 +01:00
Pierre Krieger
090ecb88e4
Revamp the documentation of the root of core (#684)
* Revamp the documentation of the root of core

* Update core/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Update core/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Update core/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Update core/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Update core/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Fix more concerns

* Merge into one
2018-11-29 21:22:24 +01:00
Pierre Krieger
179e65ff5c
Fix core-derive (#707) 2018-11-29 18:01:16 +01:00
James Ray
fceaf2293b Chore/grammar (#701)
* Add a space.

* qed -> QED and ' ; qed' -> '; QED'

* ' ; QED' -> '; QED'
2018-11-29 16:38:52 +01:00
Pierre Krieger
3aa1fcbdc6
Add a KademliaHandler (#580)
* Rework Kademlia for the new design

* Minor work on protocol.rs

* More work

* Remove QueryTarget::FindValue

* Finish work on query

* Query timeout test

* Work on topology

* More work

* Update protocols/kad/src/topology.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Fix trailing whitespaces

* Use if let
2018-11-29 12:11:35 +01:00
James Ray
ab192cdca7 Add 'of' (#700) 2018-11-29 10:57:06 +01:00
Pierre Krieger
6e1e256fe1
Add a warning about being conformant (#693) 2018-11-28 19:10:04 +01:00
James Ray
3556ffde5d Fix a typo and grammar and add a clarification. (#688)
* Fix a typo and grammar and add a clarification.

* Update core/src/nodes/handled_node_tasks.rs

Co-Authored-By: jamesray1 <16969914+jamesray1@users.noreply.github.com>
2018-11-28 11:13:00 +01:00
Pierre Krieger
6cde480c29
Fix Transport::and_then (#690) 2018-11-27 19:13:34 +01:00
Pierre Krieger
e12795d1e6
Fix the custom derive (#689)
* Fix the custom derive

* Concern
2018-11-27 16:10:34 +01:00
Pierre Krieger
45114aef46
Move the Swarm in its own module (#681) 2018-11-27 11:22:55 +01:00