37 Commits

Author SHA1 Message Date
Pierre Krieger
68299c40a5
Implement Kademlia peer discovery (#120)
* Impl Clone for SwarmController and remove 'static

* Implement Kademlia

* Implement ConnectionReuse correctly

* Implement ConnectionReuse correctly

* Add some tests and fixes

* Remove useless boolean in active_connections

* Correctly run tests

* Optimize the processing

* Rustfmt on libp2p-kad

* Improve Kademlia example

* Next incoming is now in two steps

* Some work

* Remove log

* Fix dialing a node even if we already have a connection

* Add a proper PeerId to Peerstore

* Turn identify into a transport layer

* Expose the dialed multiaddress

* Add identified nodes to the peerstore

* Allow configuring the TTL of the addresses

* Split identify in two modules

* Some comments and tweaks

* Run rustfmt

* More work

* Add test and bugfix

* Fix everything

* Start transition to new identify system

* More work

* Minor style

* Start implementation of Kademlia server upgrade

* Continue implementing the Kademlia server

* Start reimplementing high-level kademlia code

* Continue reimplementing high-level code

* More work

* More work

* More work

* Fix wrong address reported when dialing

* Make it work

* Remove cluster_level field everywhere

* Fix bug in varint-rs when encoding

* More work

* More work

* More work

* More work

* More work

* Bugfix

* More work

* Implement ping

* Style in kademlia_handler

* More work

* Better error handling in query.rs

* More work

* More work

* More work

* Debug impls

* Some cleanup in swarm

* More work

* Clean up changes in swarm

* Unpublish the kbucket module

* Fix examples and some warnings

* Fix websocket browser code

* Rustfmt on libp2p-kad

* Kad initialization process

* Add logging to the example

* Fix concerns

* Fix style
2018-03-15 15:18:21 +01:00
Pierre Krieger
89f95f7136 Implement first draft of floodsub (#144)
* Implement ConnectionReuse correctly

* Add some tests and fixes

* Remove useless boolean in active_connections

* Correctly run tests

* Optimize the processing

* Next incoming is now in two steps

* Remove log

* Fix dialing a node even if we already have a connection

* Add a proper PeerId to Peerstore

* Turn identify into a transport layer

* Expose the dialed multiaddress

* Add identified nodes to the peerstore

* Allow configuring the TTL of the addresses

* Split identify in two modules

* Some comments and tweaks

* Run rustfmt

* Add test and bugfix

* Fix wrong address reported when dialing

* Switch to futures-mutex of paritytech (#113)

* Remove public key system from peerstore (#118)

* Remove public key system from peerstore

* Add comment about PartialOrd on PeerInfo

* Add a nat_traversal() method to Transport (#110)

* Add a nat_traversal() method to Transport

* Fix compilation

* Implement floodsub

* Work on a floodsub example

* Finish example

* More work

* More work

* More work

* More work

* More work

* Rustfmt

* Some style improvements

* Store the whole Topic instead of just the hash

* Add a bunch of TODOs

* Fix introduced warning

* Fix style

* Fix concerns

* Only store the hash of the values in the received messages

* Fix style

* Improve comments
2018-03-15 11:58:11 +01:00
Jef
5217e29fab
Add rustfmt to travis (#137)
* RFC styling-based `rustfmt.toml`

* Add rustfmt to travis

* Remove rustfmt.toml and actually fix too-long lines instead of ignoring them
2018-03-07 16:20:55 +01:00
Pierre Krieger
39dde305b4
Rework libp2p-identify (#116)
* Add a proper PeerId to Peerstore

* Turn identify into a transport layer

* Expose the dialed multiaddress

* Add identified nodes to the peerstore

* Allow configuring the TTL of the addresses

* Split identify in two modules

* Some comments and tweaks

* Run rustfmt

* Add test and bugfix

* Fix wrong address reported when dialing

* Fix websocket browser code

* Support the p2p protocol in libp2p-identify

* Fix concerns

* Fix libp2p-dns

* More concerns
2018-03-07 10:49:11 +01:00
Pierre Krieger
641f09d9ae
Try run the echo-dialer on circle-ci (#112)
* Try run the echo-dialer on circle-ci

* Fix attempt

* Fix attempt

* Fix attempt

* Fix attempt

* Fix attempt

* Fix attempt

* Fix attempt

* Fix echo dialer example to actually finish

* Fix the echo examples

* Use a proper image for the echo server

* Fix tag of js-echo-server
2018-01-29 14:59:41 +01:00
Pierre Krieger
bd17f2ea96
Setup CircleCI build (#107)
* Add circleci config file

* Try enable IPv6

* Make sure `test` uses machine executor

* Add an integration_test step in parallel

* Explicit docker runs for machine tests

* Try make the integration test work

* Hide Dockerfile in a subfolder

* Fix the ping example hanging

* Explicitely pass the port to the ping client
2018-01-23 19:21:41 +01:00
Pierre Krieger
1413bb8935
Add an example that pings an IPFS node (#89) 2018-01-23 18:17:23 +01:00
Pierre Krieger
c60fb982d2
Merge remote-tracking branch 'upstream/master' into websockets 2018-01-10 18:10:57 +01:00
Pierre Krieger
acbe1d0386
No longer use deprecated function Multiaddr::new 2018-01-09 19:16:45 +01:00
Pierre Krieger
6b7fc9508e
Update the echo dialer example 2018-01-04 17:18:49 +01:00
Pierre Krieger
13ba95e282
Separate between listener, dial_to_handler and dial_custom_handler 2018-01-03 15:50:55 +01:00
Pierre Krieger
641f8a09d7
Implement swarm 2018-01-03 15:06:24 +01:00
Pierre Krieger
c211d6b96e
Add a websocket transport 2018-01-03 10:30:50 +01:00
Pierre Krieger
47a3a24fcd
Change the MuxedTransport trait 2018-01-03 10:30:39 +01:00
Pierre Krieger
3438640907
Change API to allow multiple simultaneous clients 2018-01-03 10:30:26 +01:00
Pierre Krieger
ae0f787e03 Fix concerns 2017-12-18 15:57:51 +01:00
Pierre Krieger
c9f55ceb97 Allow customizing the address in the examples, plus minor improvements 2017-12-18 15:57:51 +01:00
Pierre Krieger
e0aca7e3e3 Remove or_upgrade and let users build OrUpgrade manually 2017-12-18 15:27:06 +01:00
Pierre Krieger
952e3926c8 Fix concerns 2017-12-18 12:40:16 +01:00
Pierre Krieger
1da2c5015c Properly handle protocol negotiation errors 2017-12-18 12:10:37 +01:00
Vurich
19f0c8f3ef Fix multiplex waking and make it so that inbound streams can be handled concurrently with negotiating the outbound stream 2017-12-14 17:37:32 +01:00
Pierre Krieger
5ddda08170 [WIP] Integrate multiplex in the examples 2017-12-12 12:51:49 +01:00
Pierre Krieger
fda4b37931 Add comments in the examples 2017-12-07 18:06:38 +01:00
Pierre Krieger
4f981e922d Fix concerns 2017-12-07 15:36:03 +01:00
Pierre Krieger
4881c4a6a1 Add a with_simple_protocol_upgrade alternative to with_upgrade 2017-12-07 12:45:02 +01:00
tomaka
16937910c2
Merge pull request #56 from tomaka/secio-api-improvement
Improve the API of the secio crate
2017-12-07 12:16:14 +01:00
Robert Habermeier
81cfc3273b
Merge pull request #59 from tomaka/plain-text-rename
Rename PlainText to PlainTextConfig
2017-12-06 12:15:23 +01:00
Pierre Krieger
39352b9d10 Rename PlainText to PlainTextConfig 2017-12-04 16:36:58 +01:00
Pierre Krieger
04858839f1 Add a README and documentation for libp2p-tcp-transport 2017-12-04 16:05:37 +01:00
Pierre Krieger
067c0683b5 Rename SecioConnUpgrade to SecioConfig 2017-12-04 15:50:14 +01:00
Pierre Krieger
33025ba22e Improve the API of the secio crate 2017-12-04 15:41:35 +01:00
Pierre Krieger
91d86eb470 Merge remote-tracking branch 'upstream/master' into muxer-trait 2017-12-04 11:38:38 +01:00
Robert Habermeier
b1f4d263e1
Merge pull request #47 from tomaka/transport-returns-multiaddr
Transport::listen_on now returns a new Multiaddr on success
2017-12-04 11:31:59 +01:00
Pierre Krieger
681de9511b Add a README to the example directory 2017-12-01 14:52:21 +01:00
Pierre Krieger
b311d66b58 Add muxing trait and architecture 2017-11-30 16:00:49 +01:00
Pierre Krieger
fd7b86ddcb listen_on now returns a new Multiaddr on success 2017-11-24 16:10:34 +01:00
tomaka
100f368c9d Implement swarm 2017-11-20 17:03:50 +01:00