585 Commits

Author SHA1 Message Date
Pierre Krieger
3ae02a56a5
Bump to 0.17.0 (#1537) 2020-04-01 19:53:34 +02:00
folex
ec0b5dc364
Log bucket table (#5) 2020-04-01 12:52:37 +03:00
Roman Borschel
be970466b3
Full support for multiple connections per peer in libp2p-swarm. (#1519)
* [libp2p-swarm] Make the multiple connections per peer first-class.

This commit makes the notion of multiple connections per peer
first-class in the API of libp2p-swarm, introducing the new
callbacks `inject_connection_established` and
`inject_connection_closed`. The `endpoint` parameter from
`inject_connected` and `inject_disconnected` is removed,
since the first connection to open may not be the last
connection to close, i.e. it cannot be guaranteed,
as was previously the case, that the endpoints passed
to these callbacks match up.

* Have identify track all addresses.

So that identify requests can be answered with the correct
observed address of the connection on which the request
arrives.

* Cleanup

* Cleanup

* Improve the `Peer` state API.

* Remove connection ID from `SwarmEvent::Dialing`.

* Mark `DialPeerCondition` non-exhaustive.

* Re-encapsulate `NetworkConfig`.

To retain the possibility of not re-exposing all
network configuration choices, thereby providing
a more convenient API on the \`SwarmBuilder\`.

* Rework Swarm::dial API.

* Update CHANGELOG.

* Doc formatting tweaks.
2020-03-31 15:41:13 +02:00
Max Inden
2296a87b73
protocols/kad/behaviour: Use HashSet to deduplicate GetProviders (#1528)
Given that the order of `PeerId`s within the `GetProvidersOk.providers`
set is irrelevant but duplication is at best confusing this commit makes
use of a `HashSet` instead of a `Vec` to return unique `PeerId`s only.
2020-03-31 12:00:17 +02:00
folex
034c3e41fe Fix typo in test 2020-03-30 15:04:12 +03:00
folex
b067a022f0 set trust graph branch to master 2020-03-30 12:45:06 +03:00
folex
49a51609dd println => log 2020-03-30 11:59:17 +03:00
folex
4f3d6bc587 Tests in weighted 2020-03-29 17:19:34 +03:00
folex
7bc74a0e51 Merge branch 'weighted_tests' into weighted_bucket 2020-03-29 14:13:51 +03:00
folex
c65a93b00e log public key in weight calculation 2020-03-29 00:35:32 +03:00
folex
a644735e6e start_providing log 2020-03-28 20:47:51 +03:00
folex
b22934be64 hide public key from Debug 2020-03-28 20:24:55 +03:00
folex
d8451e549c log providers 2020-03-28 20:00:50 +03:00
folex
bd888cefd9 log get_providers 2020-03-28 17:14:45 +03:00
folex
8e2cd08956 better logs 2020-03-28 16:57:19 +03:00
folex
5d20ec9ece fix tests in kbucket.rs 2020-03-28 15:57:17 +03:00
folex
ce86462a05 fix closest lgos 2020-03-27 20:18:42 +03:00
folex
816ccac1ff weighted: logs 2020-03-27 19:57:05 +03:00
folex
0a4cd14efa Closest iterators: lots of logs 2020-03-27 19:48:12 +03:00
folex
6ef8f2c299 print calculated weight 2020-03-27 18:39:25 +03:00
folex
d6d11c4748 libp2p core 0.16.0 2020-03-27 14:00:20 +03:00
folex
9db560ede6 libp2p-core 0.16.8 2020-03-27 12:46:10 +03:00
folex
204d574add depend on trust graph via git 2020-03-27 12:30:22 +03:00
folex
3d52a6b021 Sort weighted bucket iter() by weight 2020-03-26 19:06:44 +03:00
folex
3c03467a52 Merge branch 'weighted_bucket' into weighted_tests
# Conflicts:
#	protocols/kad/src/kbucket/weighted.rs
2020-03-26 12:26:18 +03:00
folex
f60d004675 Use Vec instead of ArrayVec 2020-03-26 12:24:03 +03:00
folex
135a181ec3 arbitrary weights 2020-03-26 11:45:42 +03:00
folex
dca9099507 First test for weighted bucket 2020-03-25 20:26:50 +03:00
folex
442847eb64 merge & fix kad/behaviour tests 2020-03-25 18:11:21 +03:00
folex
53b3c34de5 Merge branch 'master' into weighted_bucket
# Conflicts:
#	protocols/kad/src/behaviour.rs
#	protocols/kad/src/behaviour/test.rs
2020-03-25 17:52:38 +03:00
folex
5ff311d38d remove commented line 2020-03-25 17:46:48 +03:00
folex
c895ec386a extend full_bucket_discard_pending test 2020-03-25 17:33:20 +03:00
folex
e53e4b9059 fix bucket_update test 2020-03-25 17:28:59 +03:00
folex
cdcbbf7e89 Integrate TrustGraph into kademlia 2020-03-24 21:20:06 +03:00
folex
091e45374f weighted bucket: enable bucket_update 2020-03-24 21:00:54 +03:00
folex
5b901ab090 weighted bucket: fix full_bucket test 2020-03-24 20:26:33 +03:00
folex
1e9e42065a weighted bucket: implement update_pending 2020-03-24 19:27:06 +03:00
folex
0c724c815f weighted bucket: set weight to 0 in tests 2020-03-24 17:29:53 +03:00
folex
8f5cc730b1 weighted bucket: it compiles! 2020-03-24 17:24:22 +03:00
folex
7eb6d425a4 weighted bucket: cleanup WIP 2020-03-24 14:22:41 +03:00
folex
5b098a6e72 weighted bucket: implement update 2020-03-24 13:38:44 +03:00
folex
826fb99483 weighted bucket: implement apply_pending 2020-03-24 12:56:27 +03:00
folex
d5c0112fbb weighted bucket: implement insert() 2020-03-24 12:08:39 +03:00
Robert Klotzner
5a6111070e
Fix typo in doc (#1503) 2020-03-23 12:51:20 +01:00
folex
760e6baac3 bucket: cleanup 2020-03-20 20:11:17 +03:00
folex
6ba164e6d9 bucket: revert pattern matching 2020-03-20 20:00:05 +03:00
folex
fe0a141e0e bucket: cleanup 2020-03-20 19:45:04 +03:00
folex
d8b42a5cb1 bucket: apply_pending works 2020-03-20 19:36:33 +03:00
folex
c096db5e59 bucket: apply_pending WIP 2020-03-20 18:46:47 +03:00
folex
0d66695d3b update works 2020-03-20 18:35:57 +03:00