733 Commits

Author SHA1 Message Date
Pierre Krieger
03ce6a6ed5
Add method to query external addresses (#1022) 2019-03-28 15:58:02 -03:00
Pierre Krieger
ebbe197d9c
Remove remnants of shutdown process (#1020) 2019-03-28 15:36:26 -03:00
Age Manning
d618b7b045 Add lighthouse to list of projects (#1026) 2019-03-28 17:40:29 +01:00
elferdo
603c7be7c2
[Kademlia] Rehash PeerId before inserting in a KBucketsTable (#1025)
Add KadHash as the type to be used as key within KBuckets and replace PeerId.
2019-03-26 16:17:34 +01:00
Pierre Krieger
538c3dffdf
Improve Debug and Display for PeerId (#1019)
* Improve Debug and Display for PeerId

* Update core/src/peer_id.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2019-03-23 10:08:07 +01:00
Pierre Krieger
34db72a080
Split address reach error and node reach error (#1013)
* Split address reach error and node reach error

* Small comments about order of operatoins

* Minor doc change
2019-03-20 20:28:55 +01:00
Artyom Pavlov
3f05de6d7c Replace sha1 and tiny-keccak with RustCrypto crates (#1014)
* replace sha1 and tiny-keccak with RustCrypto crates

* Update misc/multihash/src/lib.rs

Co-Authored-By: newpavlov <newpavlov@gmail.com>
2019-03-20 19:19:50 +01:00
Pierre Krieger
761c46ef19
Revert accidental change in Kademlia (#1018) 2019-03-20 18:55:09 +01:00
Pierre Krieger
1e8a976af6
Add kbuckets_entries (#1016) 2019-03-20 18:36:01 +01:00
Pierre Krieger
8de3cddfe8
Bugfix in Kademlia disconnected (#1017) 2019-03-20 17:52:35 +01:00
Pierre Krieger
7b2980133d
Simplify the Addresses (#1012)
* Simplify the Addresses

* Remove println
2019-03-20 17:30:00 +01:00
Pierre Krieger
7be97b4f93
Rewrite the Kademlia k-buckets to be more explicit (#996)
* Some k-buckets improvements

* Apply suggestions from code review

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

* Use NonZeroUsize for the distance

* Update TODO comment
2019-03-20 17:09:48 +01:00
Pierre Krieger
96e559b503
Wrap multistream-select streams under a Negotiated (#1001) 2019-03-19 17:27:30 +01:00
Fedor Sakharov
63e9e39538 swarm: return references from external_addresses (#1008) 2019-03-19 15:23:58 +01:00
Roman Borschel
9575fa6c08
Documentation updates (#1005)
* Documentation updates:

  * libp2p: Update the top-level module documentation, already including
    intra-rustdoc links, removing outdated documentation, updating examples and
    polishing the text.

  * libp2p-core: Update the transport documentation to clarify that a `Transport`
    is really an abstraction only for connection-oriented transports.

* More links

* Fix typo.

* Address review comments.

* More doc tweaks.

  * Mention the necessity of creating an identity keypair.
  * Remove another mention of the removed Topology trait.
2019-03-19 12:45:57 +01:00
Fedor Sakharov
463e1a5837 examples: fix deprecated add_address (#1009) 2019-03-19 10:14:18 +01:00
Pierre Krieger
fc535f532b
Some Kademlia improvements (#994)
* Move QueryTarget to the behaviour

* Rework query system

* Add a few tests

* Add some Kademlia tests

* More tests

* Don't return self entry

* Fix tests
2019-03-18 18:20:57 +01:00
Roman Borschel
f4e7fed742
Remove unused test keys. (#1006) 2019-03-18 15:47:50 +01:00
Pierre Krieger
bbe0bd3377
Fix warning in mplex (#1000) 2019-03-16 12:18:12 +01:00
Pierre Krieger
1820bcb5ef
Version 0.5.0 (#999) v0.5.0 2019-03-13 10:14:55 +01:00
Pierre Krieger
1eb7dd8582
Add half-closed mplex substream support (#984) 2019-03-12 15:59:37 +01:00
Pierre Krieger
8059a693a3
Cleaner shutdown process (#992)
* Cleaner shutdown process

* Finish

* Fix Yamux panic

* Remove irrelevant tests

* Update core/src/nodes/handled_node_tasks.rs

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

* Fix yamux error handling

* Update yamux
2019-03-11 17:19:50 +01:00
Pierre Krieger
cb93c822f1
Turn yamux's error! into debug! (#995) 2019-03-11 14:44:40 +01:00
Roman Borschel
2c66f82b11
Consolidate keypairs in core. (#972)
* 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.
2019-03-11 13:42:53 +01:00
Toralf Wittner
26df15641c Call Connection::close in StreamMuxer::shutdown. (#988) 2019-03-01 12:22:23 +01:00
Pierre Krieger
f6cbafecbd
Fix error being ignored in RwSinkStream (#989)
* Fix error being ignored in RwSinkStream

* Add test for partial reading

* Update misc/rw-stream-sink/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2019-03-01 12:08:49 +01:00
Pierre Krieger
a64b18d5ab
Don't call the handler after it has shut down (#985) 2019-03-01 11:45:33 +01:00
Pierre Krieger
b1d55cc7cd
Fall back if no tokio executor available (#975) 2019-02-28 12:48:27 +01:00
Pierre Krieger
245f6fd3b6
Bump to v0.4.2 (#981) v0.4.2 2019-02-27 18:31:41 +01:00
Pierre Krieger
2e57282efd
Ping wasn't working anymore (#979)
* Fix ping

* Update protocols/ping/src/handler.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2019-02-27 18:12:51 +01:00
Pierre Krieger
c3670c4bf3
Disconnect only after the identify answer (#977) 2019-02-27 11:15:07 +01:00
Pierre Krieger
56a027cd32
Switch the WASM image to something else (#969) 2019-02-25 11:07:56 +01:00
Pierre Krieger
6143a33f18
Fix version of noise (#966) 2019-02-20 17:56:38 +01:00
Pierre Krieger
c192ba9f77
Forgot line in changelog (#965)
* Forgot line in changelog

* More lines
2019-02-20 17:36:34 +01:00
Pierre Krieger
040d8c8c9a
Bump to v0.4 (#964) v0.4.0 2019-02-20 16:39:30 +01:00
Pierre Krieger
747478a55d
Fix simultaneous dialing test (#957) 2019-02-20 16:25:34 +01:00
Pierre Krieger
a380889e90
Add many tests for the raw swarm (#962) 2019-02-20 16:03:05 +01:00
Pierre Krieger
e1ad88f757
Fix an infinite loop in ProtocolsHandlerSelect (#961) 2019-02-20 15:06:49 +01:00
Pierre Krieger
e92c6a219b
Make TcpConfig::nat_traversal work with IPv6 (#956) 2019-02-19 16:44:07 +01:00
Pierre Krieger
4fa00725e4
Use different ports in the memory transport tests (#954) 2019-02-19 10:57:40 +01:00
Pierre Krieger
e2f99efb30
Fix the identify test multiplexer (#952) 2019-02-18 17:22:09 +01:00
Pierre Krieger
43e4d1f589
Rewrite the MemoryTransport to be similar to the TcpConfig (#951)
* Rewrite the MemoryTransport to be similar to the TcpConfig

* Add small test

* Test and bug fixes
2019-02-18 17:05:50 +01:00
Pierre Krieger
ca9534a38e
Add a user data to CollectionStream (#947)
* Add a user data to CollectionStream

* Make NodeEvent return a PeerMut

* Add PeerMut::user_data_mut()

* Return the previous user data in accept()
2019-02-18 16:10:00 +01:00
Pierre Krieger
6cb2c71ca3
Revert erroneous change in identification delay, and add test for it (#949)
* Revert erroneous id change, and add test

* Improve test
2019-02-18 13:59:12 +01:00
Pierre Krieger
293a986ae4
Fix the multiaddr reexport (#948)
* Fix the multiaddr reexport

* Minor fixes
2019-02-18 13:35:51 +01:00
Pierre Krieger
31dfbf39b9
Decode multiaddresses from visit_seq (#944)
* Decode multiaddresses from visit_seq

* Serialize as slices
2019-02-18 11:39:49 +01:00
Pierre Krieger
2d31c2f733
Minor opti poll Fuse (#946) 2019-02-18 11:24:01 +01:00
Pierre Krieger
965c154093
Accept empty substreams in read_one (#943) 2019-02-18 10:58:12 +01:00
Pierre Krieger
e6c5240567
Add a BandwidthLogging transport wrapper (#911)
* Add a BandwidthLogging transport wrapper

* Update src/bandwidth.rs

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

* Limit by bytes.len

* Write test for bandwidth report

* Use the vector length instead of rolling_seconds
2019-02-14 16:39:18 +01:00
Pierre Krieger
1100325e63
Improve nodes state (#917)
* Improve the state consistency in src/nodes

* Add a user data parameter to tasks

* Remove the tasks HashMap in CollectionStream

* Add TODO
2019-02-14 13:46:52 +01:00