1560 Commits

Author SHA1 Message Date
Rüdiger Klaehn
7c63bbf975
Update README.md (#1597)
Add rust-ipfs to the list of notable users

Not sure if it is notable enough, but it is open source and looking for contributors, so it would be cool to have it listed here.

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-06-05 10:56:26 +02:00
Pierre Krieger
a4eb67a40d
Fix some libp2p-kad types not being reexported (#1595)
* Fix QueryRef/QueryMut not being reexported

* More reexports
2020-06-02 10:33:32 +02:00
Qinxuan Chen
ce1b3aab04
Fix tcp-tokio feature (#1582)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-05-26 13:47:41 +02:00
Roman Borschel
fbccf4c72a
Readd lost noise upgrades. (#1580) 2020-05-25 18:39:56 +02:00
Pierre Krieger
baac0366f2
Also bump core-derive (#1593) 2020-05-25 16:17:37 +02:00
Pierre Krieger
a921b7cb73
Publish v0.19.1 (#1592) 2020-05-25 16:02:30 +02:00
Eduardo Leegwater Simões
93ff335c96
Fully qualified std::result::Result in macros (#1587)
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-05-25 15:27:49 +02:00
Roman Borschel
25dc7c08e3
Temporarily bound all async-std dependencies. (#1589)
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-05-25 14:49:16 +02:00
Pierre Krieger
e0cf026bbb
Try revert to nightly-2020-05-20 (#1590) 2020-05-25 13:28:21 +02:00
folex
0bd3d9b6b6
Use master branch on fluencelabs/fluence #16 2020-05-20 13:06:15 +03:00
folex
c6a6f0a6ad
Merge pull request #15 from fluencelabs/libp2p_0.19.0
Libp2p 0.19.0
2020-05-20 12:42:06 +03:00
folex
0fea4a1986 fix wasm build: imports 2020-05-19 23:17:33 +03:00
folex
b4681cca12 fix wasm build 2020-05-19 23:10:33 +03:00
folex
982e23ad39 fn main() {} 2020-05-19 21:49:51 +03:00
folex
f6a4f61fbb disable ipfs-kad & distributed-key-value-store examples 2020-05-19 21:48:26 +03:00
folex
d78805364d ssh => https 2020-05-19 21:45:41 +03:00
folex
27c30a9f2d arqada => fluence 2020-05-19 19:36:25 +03:00
folex
e6915be539 0.19 WIP 2020-05-19 19:23:44 +03:00
folex
8bc0c9db51 Merge branch 'rust_master' into fluence_master
# Conflicts:
#	examples/distributed-key-value-store.rs
#	examples/ipfs-kad.rs
#	protocols/kad/src/behaviour.rs
#	protocols/kad/src/behaviour/test.rs
#	protocols/kad/src/lib.rs
#	protocols/kad/src/query/peers/closest.rs
2020-05-19 19:11:50 +03:00
Pierre Krieger
34faf94538
Publish 0.19.0 (#1579) v0.19.0 2020-05-18 15:45:21 +02:00
Pierre Krieger
162a0be0c2
Display the identity hash of PeerIds when relevant (#1576)
* Display the identity hash of PeerIds when relevant

* Add CHANGELOG entry
2020-05-18 12:42:51 +02:00
Kevin Zhang
2fbd1a5503
Keep consistency with Upgrade Inbound by using PING_SIZE (#1578)
although 32 is prefect fine in our case, it would be consistent to use the const value PING_SIZE.

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-05-18 11:14:31 +02:00
Thomas Eizinger
bbc67351d3
Extend feature-flags to allow choosing runtime for libp2p-tcp (#1471)
* Extend feature-flags to allow choosing runtime for libp2p-tcp

* Added CHANGELOG entry

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-05-18 10:37:42 +02:00
Mikhail Zabaluev
82156deac5
Support /dns protocol in multiaddr (#1575)
* Add /dns protocol support to multiaddr

The /dns protocol has been added to the spec and has had a de-facto
meaning for years.
See https://github.com/multiformats/multiaddr/pull/100

This adds address parsing and encoding support for /dns to the multiaddr
format library.

* Cover Dns protocol in multiaddr property tests

* transports/dns: Support the /dns protocol

* Support /dns protocol in address translation

* Translate an FQDN URL into a /dns multiaddr

* transports/websocket: Support /dns multiaddr

* Use the /dns protocol in websocket redirects

The whole thing with back-translating from an redirect URL looks a bit
baroque, but at least now the transport does not completely ignore IPv6
addresses resolved from a hostname in a redirect URL.

* Add CHANGELOG entry

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-05-18 10:21:55 +02:00
Roman Borschel
3a96ebf57f
More insight into Kademlia queries. (#1567)
* [libp2p-kad] Provide more insight and control into Kademlia queries.

More insight: The API allows iterating over the active queries and
inspecting their state and execution statistics.

More control: The API allows aborting queries prematurely
at any time.

To that end, API operations that initiate new queries return the query ID
and multi-phase queries such as `put_record` retain the query ID across all
phases, each phase being executed by a new (internal) query.

* Cleanup

* Cleanup

* Update examples and re-exports.

* Incorporate review feedback.

* Update CHANGELOG

* Update CHANGELOG

Co-authored-by: Max Inden <mail@max-inden.de>
2020-05-16 10:43:09 +02:00
Pierre Krieger
c271f6f56b
Make the number of events buffered to/from tasks configurable (#1574)
* Make the number of events buffered to/from tasks configurable

* Assign a PR number

* Fix comment

* Apply suggestions from code review

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>

* Rename variables

* Apply suggestions from code review

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-05-15 14:40:10 +02:00
folex
a378a1daec
Make trust graph a public field (#14) before_0_19 2020-05-14 17:45:07 +03:00
folex
f737645609
Print latency logs after ClosestIter has finished (#13) 2020-05-14 17:44:07 +03:00
folex
2eb4622a74
Show PeerId as pubkey-inlining if possible, add .as_public_key() #11 2020-05-14 17:40:50 +03:00
David Craven
0443fea157
Update to latest multihash. (#1566)
* Update to latest multihash.

* Update changelog.

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-05-13 17:51:11 +02:00
Rüdiger Klaehn
a83654ca4c
Add a method to create a pre shared key when you already have the raw bytes (#1570) 2020-05-13 17:08:12 +02:00
Max Inden
06721128f1
protocols/kad: Remove unnecessary PeerId conversion for fixed iter (#1573)
`FixedPeersIter` requires the initial set of peers to be passed as
`PeerId`s and not as `Key<PeerId>`s. This commit removes the unnecessary
conversion.
2020-05-13 16:47:02 +02:00
Max Inden
70e797112f
protocols/kad/query/closest: Make quickcheck deterministic (#1571)
Instead of creating unconstrained random number generators in quickcheck
tests to generate test data, have quickcheck provide a `Seed` to seed
those random number generators and thus make the test execution
deterministic / reproducible.
2020-05-12 21:31:20 +02:00
Roman Borschel
5ba7c4831b
Permit concurrent dialing attempts per peer. (#1506)
* Permit concurrent dialing attempts per peer.

This is a follow-up to https://github.com/libp2p/rust-libp2p/pull/1440
and relates to https://github.com/libp2p/rust-libp2p/issues/925.
This change permits multiple dialing attempts per peer.
Note though that `libp2p-swarm` does not yet make use of this ability,
retaining the current behaviour. The essence of the changes are that the
`Peer` API now provides `Peer::dial()`, i.e. regardless of the state in
which the peer is. A dialing attempt is always made up of one or more
addresses tried sequentially, as before, but now there can be multiple
dialing attempts per peer. A configurable per-peer limit for outgoing
connections and thus concurrent dialing attempts is also included.

* Introduce `DialError` in `libp2p-swarm`.

For a cleaner API and to treat the case of no addresses
for a peer as an error, such that a `NetworkBehaviourAction::DialPeer`
request is always matched up with either `inject_connection_established`
or `inject_dial_error`.

* Fix rustdoc link.

* Add `DialPeerCondition::Always`.

* Adapt to master.

* Update changelog.
2020-05-12 13:10:18 +02:00
Max Inden
44c0c76981
protocols/kad/query/fixed: Decrease num_waiting on failure (#1572)
Make sure to decrease `num_waiting` when being notified of a peer
failure to allow an additional peer to be queried.

Given that `FixedPeersIter` is initialized with `replication_factor` by
`QueryPool` this bug will not surface today.
2020-05-12 12:23:40 +02:00
Roman Borschel
bd5e81fedb
Spec-compliant Noise Protocol (#1545)
* Add spec-compliant x25519 protocol.

* Cosmetic protobuf spec compliance.

* Keep support for IK/IX. Update changelog.

* Update docs.

* CI
2020-05-06 14:30:23 +02:00
Pierre Krieger
69fd8ac195
Update CI to clang-10 (#1565) 2020-05-06 13:50:18 +02:00
folex
5a8a294f84
#10 Serialize array of records via protobuf janus-v0.0.5 2020-04-30 12:17:04 +03:00
Max Inden
1be34fd7a3
protocols/gossipsub: Correct max transmit size error handling (#1558)
If a user sends a message that is over the maximum transmission size gossipsub
will disconnect from the peer being sent the message.

This PR updates the logic to simply emit an error, not send the over-sized
message but maintain the long-lived streams for future messages.

Co-authored-by: Age Manning <Age@AgeManning.com>
2020-04-28 16:18:35 +02:00
Arjan Topolovec
3d4ae5da4b
fix: NetworkBehaviour crash if ignoring a non-last struct field (#1554)
Macro was using field_n (field index including ignored fields) for calculations instad of
enum_n (field index excluding ignored fields). When calculating te nesting the calculation
was made between the number of non-ignored fields and a field_n that lead to and overflow.

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-04-28 11:38:25 +02:00
Toralf Wittner
bdbab32392
tcp: Set IPV6_V6ONLY for IPv6 listeners. (#1555)
* tcp: Set IPV6_V6ONLY for IPv6 listeners.

The current behaviour of listening on an IPv6 address varies depending
on the operating system's IP address stack implementation. Some support
IPv4-mapped IPv6 addresses (e.g. Linux and newer versions of Windows)
so a single IPv6 address would support IPv4-mapped addresses too.
Others do not (e.g. OpenBSD). If they do, then some support them by
default (e.g. Linux) and some do not (e.g. Windows).

This PR attempts to implement the same behaviour accross operating
systems. The strategy is as follows:

Disable IPv4-mapped IPv6 addresses, hence the socket option IPV6_V6ONLY
is always set to true.

This allows binding two sockets to the same port and also avoids the
problem of comparing mixed addresses which leads issues such as #1552.

* Update CHANGELOG and address review concerns.

* Update CHANGELOG.md

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

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-04-24 19:07:27 +02:00
folex
403315dab4 ProtoRecords 2020-04-21 21:45:29 +03:00
folex
122bb921d7 Merge branch 'fluence_master' into memory_store_set 2020-04-21 21:40:48 +03:00
folex
9a865e3735 pub use proto::Record 2020-04-21 21:38:08 +03:00
folex
eb837aad33 make record_{to,from}_proto public 2020-04-21 21:27:35 +03:00
folex
838edad224 impl Hash 2020-04-21 19:54:44 +03:00
folex
51bdf2757d Fix kad behaviour test.rs 2020-04-21 19:54:30 +03:00
folex
8bdd21759c
Merge pull request #9 from fluencelabs/merge_libp2p_0_18
Merge libp2p 0.18
2020-04-20 20:39:41 +03:00
folex
190992b780 https => ssh 2020-04-20 19:44:31 +03:00
folex
807217653a fluence janus branch 2020-04-20 19:36:17 +03:00