9 Commits

Author SHA1 Message Date
Volker Mische
3f38c1c8bb
feat: upgrade multihash (#1792)
* feat: upgrade to multihash 0.13

`multihash` changes a lot internally, it is using stack allocation instead
of heap allocation. This leads to a few limitations in regards on how
`Multihash` can be used.

Therefore `PeerId` is now using a `Bytes` internally so that only minimal
changes are needed.

* Update versions and changelogs.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
Co-authored-by: Roman S. Borschel <roman@parity.io>
2020-11-17 11:15:20 +01:00
dependabot[bot]
c812b8d56c
Update tokio requirement from 0.2 to 0.3 (#1796)
* Update tokio requirement from 0.2 to 0.3

Updates the requirements on [tokio](https://github.com/tokio-rs/tokio) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.2.0...tokio-0.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

* protocols/mdns: Ensure to set non_blocking on tokio udp socket

* transports/tcp: Ensure to set non_blocking on tokio tcp socket

See https://github.com/tokio-rs/tokio/pull/3016 for details.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-11-03 14:09:10 +01:00
Qinxuan Chen
b74285a8fb
protocols/tcp: Replace get_if_addrs with if-addrs (#1788)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-10-09 14:18:39 +02:00
Robert Klotzner
fe30849eec
Fix #1778: Double mdns recv_buffer to 4096 bytes (#1779)
Also add warn if parsing of a packet fails, so problems with for example packet
sizes can more easily be detected.

Reasoning:

The previous 2048 bytes is already larger than the recommend size by
[rfc6762](https://tools.ietf.org/html/rfc6762#page-46), which recommends
a packet size that fits within the interface MTU.

Nevertheless the rfc also states, that if more data needs to be
transmitted one should rely on IP fragments, which would only pose
problems when interfacing with devices not understanding IP fragments.
The standard also imposes a strict upper limit of 9000 bytes.

Therefore raising `recv_buffer` to 4096 seems sensible, given that we
already exceed the recommend size and given that we are not restricting
the size when sending in any way. Meaning the implementation already
sends packets larger than recommended, just can't handle them on
reception.
2020-10-05 10:03:21 +02:00
Max Inden
cbdbf656c0
protocols/mdns: Make libp2p-mdns socket agnostic (#1699)
Allow libp2p-mdns to use either async-std or tokio to drive required UDP
socket.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-08-18 14:51:03 +02:00
Demi Obenour
9178459cc8
Automatic fixes by cargo-fix (#1662) 2020-07-27 22:27:33 +02:00
Robert Klotzner
5a6111070e
Fix typo in doc (#1503) 2020-03-23 12:51:20 +01:00
Pierre Krieger
10089c5f46
Use upstream version of multihash instead of a fork (#1472)
The changes from the libp2p fork have been backported to upstream, hence
upstream can now be used instead.
2020-03-05 16:49:36 +01:00
vms
688aa5bc79
Move mdns (#1458)
* move mdns

* alphabetic ordering in Cargo.toml

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-02-24 19:36:55 +01:00