Commit Graph
37 Commits
Author SHA1 Message Date
Pierre Krieger abf64386bb Improvements to the Kademlia system (#688) 2018-09-07 18:56:38 +02:00
Pierre Krieger 28d3c2afe9 Use BufReader and BufWriter (#684)
* Use BufReader and BufWriter

* Add TODOs
2018-09-07 18:54:51 +02:00
Pierre Krieger af3ad2109f Update to latest libp2p (#673) 2018-09-06 14:56:41 +02:00
Pierre Krieger 0d422878a3 Upgrade to libp2p master (#660) 2018-09-05 09:05:28 +02:00
Pierre Krieger 26ebf3a0a0 Fix warnings in networking (#652) 2018-09-04 10:26:54 +02:00
Pierre Krieger 360ffa2dbb Add a reputation system (#645)
* Add a reputation system

* Fix tests

* Don't try to dial peers to which we are already connected

* Use the master branch of libp2p
2018-09-04 08:52:20 +02:00
Pierre Krieger eb10c392ce Allow specifying listening multiaddresses (#577) 2018-08-28 12:16:51 +01:00
Pierre Krieger 68c1fc0b66 Update libp2p (#559) 2018-08-14 13:14:04 +02:00
Pierre Krieger 3128f258ba Update libp2p and some log (#532)
* Update libp2p and some log and yamux

* Replace trace! with info!

* Only have one log message on disconnect
2018-08-10 13:00:16 +02:00
Pierre Krieger 6f4a401afa Some networking cleanups (#504)
* Some networking cleanups

* Fix tests

* Fix wrong port in new_local
2018-08-08 20:05:40 +02:00
Pierre Krieger 9b0c23ac86 Build with locked Cargo.lock on CI (#514) 2018-08-08 17:01:57 +02:00
Pierre Krieger 11b9496a6a NetworkService::new starts the network (#462) 2018-08-06 11:57:08 +02:00
Pierre Krieger 1725fcef18 Merge pull request #454 from yuelipeng/master
Update README.adoc
2018-07-31 11:50:29 +02:00
Pierre Krieger 9dd746e867 Make ping unidirectional (#458) 2018-07-31 10:19:38 +02:00
Pierre Krieger fb2a8ada37 Update libp2p again (#445) 2018-07-29 09:56:02 +02:00
Pierre Krieger 2cb4ed8dcc Fix the public key of bootnode 3 (#441) 2018-07-28 17:33:50 +02:00
Pierre Krieger 53a68d8b9f Update libp2p (#442) 2018-07-28 14:55:43 +01:00
Pierre Krieger b1a3552aa0 Switch to the master branch of libp2p (#427)
* Switch to the master branch of libp2p

* Fixed having to clear manually

* Fix TTL of bootstrap nodes

* Speed up compilation time

* Update libp2p

* Remove obsolete comment
2018-07-28 10:42:26 +01:00
Pierre Krieger 988440a368 Fix memory leaks in libp2p (#432)
* Fix memory leaks in libp2p

* Fix memory leaks in libp2p
2018-07-27 16:09:49 +02:00
Pierre Krieger 1b0e3e57dd Better logging for public key mismatch (#429) 2018-07-27 09:35:24 +02:00
Pierre Krieger e65672575f Add some logging if the timeouts stream ends (#414) 2018-07-24 15:54:19 +02:00
Pierre Krieger fcb30f4009 General multiplexing fixes (#408) 2018-07-23 15:58:48 +02:00
Pierre Krieger 625918394a Introduce support for yamux (#388) 2018-07-20 00:44:21 +02:00
Pierre Krieger 831810b155 Register protocols at the same time as we start (#385)
* Register protocols at the same time as we start

* Fix tests
2018-07-19 20:50:07 +02:00
Pierre Krieger 0fbf66b07e More networking fixes (#384)
* Don't connect to ourselves for Kademlia

* Improve log messages

* Manually drop connections

* Kademlia is now 32 seconds

* Fix potential panic

* Fix other potential panic

* No longer pass the endpoint everywhere
2018-07-19 17:56:39 +02:00
Pierre Krieger bcd2f274f9 Network improvements (#374)
* Ping active connections

* Bump rust-libp2p

* Deny connection attempts if we're already connected

* Properly check max_peers against custom connections

* Fix set_until not immediately called

* Clean up unusued connections and stop pinging them

* Disconnect Kad connections after 20 seconds of inactivity
2018-07-19 15:22:07 +02:00
Pierre Krieger 3dfd53cc86 Timeouts now repeat forever (#372) 2018-07-18 17:59:31 +02:00
Pierre Krieger 4dfa17ab37 Fix style in #364 (#365) 2018-07-18 14:34:05 +02:00
Pierre Krieger de168ca034 Fix the networking (#364)
* Serve only non-empty Kademlia nodes

* Use the number of custom protos to determine whether to open more

* Add timeout when connecting

* Connect to random peers from the peer store

* Various adjustements

* Typo

* Explicitely connect to bootnodes

* Fix potential overflow
2018-07-18 13:55:38 +02:00
Pierre Krieger 1809f0596b Fix install command in README (#354) 2018-07-17 20:31:34 +02:00
Pierre Krieger 428682d3b5 More robust connections (#343)
* Make Kademlia connection more robust

* Make custom connetions more robust

* Fix potential deadlock

* Style and minor changes

* Upgrade rust-libp2p
2018-07-17 17:14:06 +02:00
Pierre Krieger bb8987df28 Better reporting in libp2p (#337) 2018-07-16 19:11:19 +02:00
Pierre Krieger 801747cb76 Fix nodes not connecting to each other (#330)
* Fix nodes not connecting to each other

* Only report external addresses
2018-07-16 14:27:11 +02:00
Pierre Krieger b3916c2999 Remove dependency on parity/network (#323)
* Remove dependency on parity/network

* Remove dependency on RLP as well

* Fix tests

* Fix tests again
2018-07-15 19:25:29 +02:00
Pierre Krieger e32b77ffdc Disable peers only for 5 minutes (#320)
* Disable peers only for 5 minutes

* Fix formatting
2018-07-15 15:14:00 +02:00
Pierre Krieger 5924b361a3 Switch from devp2p to libp2p (#268)
* Switch from devp2p to libp2p

* Move the keys in the network state

* Properly load, store or generate private key

* Some robustness

* Update for latest libp2p

* Allow secio

* Don't open a new Kademlia connec all the time

* Handle Kademlia disconnection

* Set correct permissions on key file

* Improvements to secret key storage

* Flush the peer store at Kademlia requests

* Use RAII guards for disconnection

* Some misc work

* Set informations about peers

* Fix tests and external URL

* Fix some style

* Split obtain_private_key into multiple function

* More style fixes

* More style fixes

* Fix some concerns

* Turn // into ///

* More style fixes

* More style fixes

* Add annotations to unreachable!

* Fix style again

* Remove commented out code

* Fix test year

* More concerns
2018-07-15 11:45:37 +02:00
Pierre Krieger 094b2568b2 Amend #205 (#206) 2018-06-07 13:39:11 +02:00