23 Commits

Author SHA1 Message Date
Pierre Krieger
b4345ee8ba
Bump to 0.7.0 (#1081)
* Bump to 0.7.0

* Update CHANGELOG.md

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

* Update for #1078

* New version of multihash and multiaddr as well
2019-04-23 13:03:29 +02:00
Toralf Wittner
ca58f8029c
Remove Transport::nat_traversal and refactor multiaddr. (#1052)
The functionality is available through `Multiaddr::replace`.
What we currently call "nat_traversal" is merley a replacement of an IP
address prefix in a `Multiaddr`, hence it can be done directly on
`Multiaddr` values instead of having to go through a `Transport`.

In addition this PR consolidates changes made to `Multiaddr` in
previous commits which resulted in lots of deprecations. It adds some
more (see below for the complete list of API changes) and removes all
deprecated functionality, requiring a minor version bump.

Here are the changes to `multiaddr` compared to the currently published
version:

1.  Removed `into_bytes` (use `to_vec` instead).
2.  Renamed `to_bytes` to `to_vec`.
3.  Removed `from_bytes` (use the `TryFrom` impl instead).
4.  Added `with_capacity`.
5.  Added `len`.
6.  Removed `as_slice` (use `AsRef` impl instead).
7.  Removed `encapsulate` (use `push` or `with` instead).
8.  Removed `decapsulate` (use `pop` instead).
9.  Renamed `append` to `push`.
10. Added `with`.
11. Added `replace`.
12. Removed `ToMultiaddr` trait (use `TryFrom` instead).
2019-04-17 20:12:31 +02:00
Pierre Krieger
235ad98863
Publish v0.6.0 (#1031) 2019-03-29 11:41:42 -03:00
Pierre Krieger
1820bcb5ef
Version 0.5.0 (#999) 2019-03-13 10:14:55 +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
Pierre Krieger
040d8c8c9a
Bump to v0.4 (#964) 2019-02-20 16:39:30 +01:00
Roman Borschel
eeed66707b Address edition-2018 idioms. (#929) 2019-02-11 14:58:15 +01:00
Pierre Krieger
fcb2ac36e6
Bump to v0.3.0 (#905) 2019-01-30 16:50:47 +01:00
Toralf Wittner
e23b2733e2
Fix some rustc/clippy warnings. (#895) 2019-01-30 15:41:54 +01:00
Pierre Krieger
a77da73010
Add inject_dial_failure and make addresses_of_peer mut (#901)
* Add inject_dial_failure and make addresses_of_peer mut

* Fix tests
2019-01-30 14:55:39 +01:00
Pierre Krieger
df923526ca
Embed the topology in the NetworkBehaviour (#889)
* 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
2019-01-26 23:57:53 +01:00
Pierre Krieger
e39d6d8bd2
Version 0.2 (#841) 2019-01-10 13:27:45 +01:00
Pierre Krieger
f903e2b744
Add version numbers of multi* deps (#810) 2019-01-02 13:45:23 +01:00
Pierre Krieger
02e704195b
Also add the node's reported address in mDNS (#804)
* Also add the node's reported address in mDNS

* Update misc/mdns/src/behaviour.rs
2019-01-02 13:23:58 +01:00
James Ray
f541df391a Chore/semi colons (#799)
* Add helpers for easier Transports creation (#777)

* Add helpers for easier Transports creation

* Fix doctests

* Fix ' ;' occurrences
2018-12-19 23:22:39 +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
2dce4294a0
Add version numbers in the deps in Cargo.toml (#768) 2018-12-11 14:54:44 +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
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
2ef4d779ca
Add metadata to all the Cargo.toml (#743) 2018-12-06 19:22:06 +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
Pierre Krieger
95ebee5841
Update some dependencies (#686)
* Update many dependencies

* Upgrade some secio deps
2018-11-27 10:35:47 +01:00
Pierre Krieger
1b05132d6a
Add libp2p-mdns (#590)
* Add libp2p-mdns

* Fix win32

* Make compatible with Rust 1.29

* Remove mDNS on esmcripten

* Fix concerns

* More concern

* Use append_u16

* Make decode_character_string return a Cow

* Add TODO

* Don't send queries from 5353

* Fix flags

* More flags fix

* More concerns

* Fix flags

* Fix removed env_logger
2018-11-24 13:55:18 +01:00