1345 Commits

Author SHA1 Message Date
Pierre Krieger
57c3103f78
Integrate the multiformats crates (#231)
* Remove the multihash patch

* Integrate the multiformats crates

* Fix not compiling on emscripten
2018-06-01 10:10:00 +02:00
Pierre Krieger
9e2dfd3fa5
Add SecioKeyPair::to_public_key and as_public_key_bytes (#232)
* Add SecioKeyPair::to_public_key and as_public_key_bytes

* Add to_peer_id instead
2018-05-31 18:35:18 +02:00
Pierre Krieger
4da47b4c72
Turn an info! into a debug! (#230) 2018-05-31 17:38:12 +02:00
Pierre Krieger
f193a2eb0c
Fix CommonTransport not accepting TCP/IP (#229) 2018-05-31 17:16:23 +02:00
Pierre Krieger
4c2cabca93
Add support for Ed25519 in secio (#226)
* Add support for Ed25519 in secio

* Add SecioPublicKey::to_peer_id()
2018-05-31 14:50:24 +02:00
Pierre Krieger
2a2ad77d28
Remove the ring override (#227) 2018-05-31 14:24:49 +02:00
Pierre Krieger
6b95414161
Update kademlia for the removing of From (#220)
* Update kademlia for the removing From

* Fix the kad example

* Some documentation
2018-05-29 17:32:40 +02:00
Pierre Krieger
7d6ad230ea
Update the PeerId import paths (#217) 2018-05-24 18:00:47 +02:00
Pierre Krieger
c1cd10c034
upgrade::or() requires same Output (#218) 2018-05-24 16:37:12 +02:00
Pierre Krieger
c7f654a815
Put secio behind a feature flag in the facade (#219)
* Put secio behind a feature flag in the facade

* Define the features required by examples

* Test both with and without Cargo features
2018-05-24 16:24:20 +02:00
Pierre Krieger
89087f021d
Move PeerId to libp2p-core (#214) 2018-05-24 00:54:08 +02:00
Pierre Krieger
b5db91a075
Restore ratelimit in libp2p facade (#213) 2018-05-23 17:03:42 +02:00
Toralf Wittner
445ae17904 Move SimpleProtocol from core to libp2p. (#212)
cf. issue #200
2018-05-23 16:27:55 +02:00
Pierre Krieger
56ca46eb7a
Rename integration_test to integration-test (#209) 2018-05-23 14:01:16 +02:00
Pierre Krieger
ea322f461d
Test libp2p-core for wasm on circle-ci (#208) 2018-05-23 13:45:32 +02:00
Toralf Wittner
740efd31ad Depend on tokio-io and tokio-executor. (#210)
Addresses issue #204.
2018-05-23 13:28:40 +02:00
Pierre Krieger
41753d8c8e
Build libp2p on emscripten on circle-ci (#207) 2018-05-23 13:10:54 +02:00
Pierre Krieger
a163e81e30
Rename EitherSocket to EitherOutput (#201) 2018-05-23 11:45:35 +02:00
Pierre Krieger
b7065de672
Make the libp2p facade compilable for emscripten (#205) 2018-05-23 11:22:49 +02:00
Pierre Krieger
e5f23c74c0
Remove dial_custom_handler (#203)
* Remove dial_custom_handler

* Rename dial_to_handler to dial
2018-05-22 18:58:27 +02:00
Pierre Krieger
6d41923ca5
Update num-bigint (#202) 2018-05-22 16:35:13 +02:00
Pierre Krieger
d51321f5dd
Move the examples to the facade crate (#197) 2018-05-21 18:49:02 +02:00
Toralf Wittner
5f6e215ec1
Update to protobuf >= 2 (#199) 2018-05-21 17:32:59 +02:00
Toralf Wittner
250af629ee
Use loop to poll FuturesUnordered after push. (#198)
Fixes #190.
2018-05-21 16:27:03 +02:00
Pierre Krieger
3dacc9009e
Add the two missing libraries from the facade (#196) 2018-05-20 10:11:42 +02:00
Pierre Krieger
a282434d5d
Add a libp2p facade crate (#191)
* Add a libp2p facade crate

* Remove secio for now

* Reexport peerstore and PeerId

* Also reexport swarm()
2018-05-18 14:56:11 +02:00
Toralf Wittner
d394ea0e19
Add /libp2p/circuit/relay/0.1.0 protocol support. (#175)
Add `/libp2p/circuit/relay/0.1.0` protocol support.
2018-05-18 13:13:05 +02:00
Toralf Wittner
15540a34c2
Add missing check for read of 0 bytes. (#194)
Forgot this one in PR #178.
2018-05-17 15:29:27 +02:00
Toralf Wittner
86a21fc43e
Remove all targets from log statements. (#195)
The default uses crate + module path anyway, so `target` has been
redundant, causes more work when renaming crates and makes log
lines longer.
2018-05-17 15:14:13 +02:00
Pierre Krieger
cb800624f5
Change Transport::Dial to be Future and not IntoFuture (#193) 2018-05-17 13:09:22 +02:00
Pierre Krieger
5c1890e66a
Rename libp2p_swarm to libp2p_core (#189) 2018-05-16 12:59:36 +02:00
Pierre Krieger
dc6d4df3f8
IdentifyTransport now outputs the observed addr (#188) 2018-05-15 11:30:57 +02:00
Pierre Krieger
f787f3d8b8
Swarm rework (#182)
* Rename Transport::RawConn to Output

* Remove AsyncRead + AsyncWrite bound on Transport::Output

* UpgradedNode now always implements Transport

* Add and tweak modifiers for Transport and ConnectionUpgrade

* Secio upgrade now returns the pubkey in its output

* Add upgrade::apply

* Add Transport::and_then

* Rework the swarm

* Rustfmt

* Fix concerns
2018-05-14 15:55:16 +02:00
Toralf Wittner
4382adcbde connection_reuse: drop dead connections. (#178)
Currently, connection substreams are added to
`connection_reuse::Shared::active_connections`, but never removed. This
is not least because the `StreamMuxer` trait defines its inbound and
outbound substream futures to always yield a substream and contains no
provision to signal that no more substreams can be created, which would
allow client code (e.g. `ConnectionReuse`) to detect this and purge its
caches.

This PR defines the `StreamMuxer` trait to optionally yield
inbound/outbound substreams and changes `libp2p-mplex` to handle
stream EOFs by marking the underlying resource as closed.
`ConnectionReuse` will remove stream muxers from its active connections
cache if a `None` substream is returned.
2018-05-14 14:49:29 +02:00
Pierre Krieger
11f655dd6a
Pin protobuf to 1.4 (#184) 2018-05-14 11:04:05 +02:00
Pierre Krieger
ff7a191892
Remove the style check on travis (#186) 2018-05-14 10:39:49 +02:00
Pierre Krieger
37881d511e
Pass the host name with websockets (#177) 2018-05-08 22:07:07 +02:00
Toralf Wittner
64278244de Add log statements to multistream-select. (#180)
Addresses issue #126.
2018-05-08 20:43:00 +02:00
Pierre Krieger
d9e1e437b8
Try fix circleci again (#181) 2018-05-08 20:09:41 +02:00
Toralf Wittner
773cf6c26d Add log statements to libp2p-mplex. (#179)
* Add log statements to libp2p-mplex.

Addresses issue #126.

* Run `cargo fmt`.

* Wording.

* Adjust log levels.
2018-05-08 19:20:57 +02:00
Pierre Krieger
fd0d75f61e
Remove rustc-serialize (#176) 2018-05-06 17:41:06 +02:00
Pierre Krieger
9a7c278e83
Rename multiplex to libp2p-mplex (#153)
* Rename multiplex to libp2p-multiplex

* Rename multiplex to mplex

* Fmt

* Fix compilation
2018-05-04 15:27:49 +02:00
Pierre Krieger
0fb92140e1
Fix circle-ci (#174) 2018-05-04 12:22:02 +02:00
Toralf Wittner
383e16abea Return Option<bool> in PeerId::is_public_key`. (#172) 2018-05-03 15:42:50 +02:00
Toralf Wittner
d346a6f495 Refactor transport into multiple modules. (#170)
Addresses #158.

Besides the refactoring, the type `EitherIncomingStream` has been
removed as it is not used.
2018-05-02 11:50:48 +02:00
Toralf Wittner
3f2b6a5238 Add libp2p-ratelimit. (#161)
* Add libp2p-ratelimit.

* Run `cargo fmt`.

* Trigger another CI run.

* Add `target` to log statements.
2018-04-18 14:11:48 +02:00
quake wang
590bc91d59 resolve PeerInfo deserialize error (#168) 2018-04-18 10:39:42 +02:00
quake wang
96747441fc replace Vec with FuturesUnordered (#163)
* replace Vec with FuturesUnordered

* add err log
2018-04-16 11:55:16 +02:00
Pierre Krieger
2445d9e9ee
Various fixes and improvements (#166) 2018-04-11 17:32:32 +02:00
Qifan Lu
342a9f69d3 Bump multiaddr to 0.3 and remove patch in Cargo.toml (#164) 2018-04-10 18:08:01 +02:00