1560 Commits

Author SHA1 Message Date
Roman Borschel
6ed92ab4be
[swarm] MultiHandler: Respect inbound timeouts and upgrade versions. (#1786)
* Respect inbound timeouts and upgrade versions.

* Update CHANGELOG
2020-10-12 11:39:50 +02:00
Max Inden
6528114fe8
Cargo.toml: Bump libp2p-tcp patch version (#1790) 2020-10-11 22:56:46 +02:00
Max Inden
0c02a8ace7
swarm/src/protocols_handler: Use FuturesUnordered in NodeHandlerWrapper (#1775)
> Futures managed by FuturesUnordered will only be polled when they
generate wake-up notifications. This reduces the required amount of work
needed to poll large numbers of futures.

https://docs.rs/futures/0.3.5/futures/stream/struct.FuturesUnordered.html

Instead of iterating each inbound and outbound upgrade looking for one
to make progress, use a `FuturesUnordered` for both pending inbound and
pending outbound upgrades. As a result only those upgrades are polled
that are ready to progress.
2020-10-09 19:37:17 +02: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
Zyansheep
6b3500b931
Add another chat example (but it uses tokio instead of async_std) (#1780)
* add tokio floodsub chat example

* use swarmbuilder to specify tokio executor

* fix comments

* Tweak tokio chat example.

Co-authored-by: Roman S. Borschel <roman@parity.io>
2020-10-08 12:37:16 +02:00
Roman Borschel
3e31ea9337
[multistream-select] Fix panic with V1Lazy (regression) and more convenient transport boxing. (#1783)
* [multistream-select] Fix panic with V1Lazy and add integration tests.

Fixes a panic when using the `V1Lazy` negotiation protocol,
a regression introduced in https://github.com/libp2p/rust-libp2p/pull/1484.

Thereby adds integration tests for a transport upgrade with both
`V1` and `V1Lazy` to the `multistream-select` crate to prevent
future regressions.

* Cleanup.

* Update changelog.
2020-10-07 11:10:54 +02:00
dependabot[bot]
2a5c1832a1
Update base64 requirement from 0.12.3 to 0.13.0 (#1782)
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.12.3...v0.13.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-05 10:12:40 +02:00
Roman S. Borschel
049d808566 Update mdns version and changelog. 2020-10-05 10:11:50 +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
Roman Borschel
8cec457b5e
[multistream-select] Require remaining negotiation data to be flushed. (#1781)
* Require remaining negotiation data to be flushed.

There appears to still be an edge-case whereby the
`remaining` data to send w.r.t. protocol negotiation to send
is successfully written before a `poll_read` on a `Negotiated` stream,
but where the subsequent `poll_flush()` is pending.
Now `remaining` is empty and the next `poll_read()`
will go straight to reading from the underlying
I/O stream, despite the flush not having happened
yet, which can lead to a form of deadlock during
protocol negotiation.

Rather than complicating the existing code further in
order to accommodate for this case, it seems preferable
to simplify the code by giving up on this optimisation
that only affects the last negotiation protocol message
sent by the "listener". So we give up on the ability
to combine data sent by the "listener" immediately
after protocol negotiation together with the final
negotiation frame in the same transport-level frame/packet.

* Update changelog.

* Add missing comma.
2020-10-01 12:29:51 +02:00
Qinxuan Chen
c19344dee7
Update dependencies not detected by dependabot (#1776)
- parking_lot to 0.11.0
- salsa20 to 0.6.0
- sha3  to 0.9

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-09-30 18:26:35 +02:00
dependabot[bot]
aaa6e4add3
Update cuckoofilter requirement from 0.3.2 to 0.5.0 (#1763)
* Update cuckoofilter requirement from 0.3.2 to 0.5.0

Updates the requirements on [cuckoofilter](https://github.com/axiomhq/rust-cuckoofilter) to permit the latest version.
- [Release notes](https://github.com/axiomhq/rust-cuckoofilter/releases)
- [Changelog](https://github.com/axiomhq/rust-cuckoofilter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axiomhq/rust-cuckoofilter/commits)

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

* protocols/floodsub: Warn when Cuckoofilter has to evict item

With Cuckoofilter `v0.4.0` `add` and `test_and_add` return an error when
an old element has to be evicted in favor of a new one to take its
place. The previous behavior was panicing.

With this commit the error is logged on `warn` level.

* *: Update changelogs and cargo tomls

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-29 11:46:57 +02:00
Roman Borschel
f66f40bcd7
[ping] Add missing flush after write. (#1770)
After sending the ping and before awaiting the pong,
the stream must be flushed to guarantee the data is
sent before awaiting the reply.
2020-09-28 10:57:02 +02:00
Roman Borschel
0b18b864f2
[mplex] Refactoring with Patches (#1769)
* Refactor Mplex.

Thereby addressing the following issues:

  * Send a `Reset` frame when open substreams get dropped (313).
  * Avoid stalls caused by a read operation on one substream
    reading (and buffering) frames for another substream without
    notifying the corresponding task. I.e. the tracked read-interest
    must be scoped to a substream.
  * Remove dropped substreams from the tracked set of open
    substreams, to avoid artificially running into substream
    limits.

* Update CHANGELOG.

* Refine behaviour of dropping substreams.

By taking the substream state into account. The refined
behaviour is modeled after the behaviour of Yamux.

* Tweak docs and recv buffer retention.

* Further small tweaks.

 * Make the pending frames a FIFO queue.
 * Take more care to avoid keeping read-wakers around
   and to notify them when streams close.

* Prefer wake over unregister.

It is probably safer to always wake pending wakers.

* Update muxers/mplex/src/codec.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* Update muxers/mplex/src/io.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* Some review feedback and cosmetics.

* Update muxers/mplex/src/io.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* Revise read control flow for clarity.

While seemingly duplicating some control flow between
`poll_next_strean` and `poll_read_stream`, the individual
control flow of each read operation is easier to follow.

* CI

* Rename Status::Ok to Status::Open.

* Rename pending_flush to pending_flush_open.

* Finishing touches.

* Tweak changelog.

Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-28 10:30:49 +02:00
Max Inden
9365be711f
swarm/src/protocols_handler.rs: Remove redundant trait bound (#1773)
`Send` and `'static` are already implied by `InboundUpgradeSend`.
2020-09-25 13:12:15 +02:00
dependabot[bot]
c14f0c5b18
Update minicbor requirement from 0.5 to 0.6 (#1772)
* Update minicbor requirement from 0.5 to 0.6

Updates the requirements on [minicbor](https://gitlab.com/twittner/minicbor) to permit the latest version.
- [Release notes](https://gitlab.com/twittner/minicbor/tags)
- [Commits](https://gitlab.com/twittner/minicbor/compare/minicbor-v0.5.0...minicbor-v0.6.0)

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

* *: Update changelogs and cargo tomls

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-23 21:28:15 +02:00
Max Inden
ecdce0fed7
core/src/identity: Fix typo (#1768) 2020-09-17 20:50:58 +02:00
Max Inden
87f3cb8024
protocols/plaintext: Do not UVI encode goodput (#1765)
* protocols/plaintext: Do not UVI encode goodput

Only prefix handshake messages with the message length in bytes as an
unsigned varint. Return a plain socket once handshaking succeeded.

* *: Bump minor version in changelogs and cargo tomls
2020-09-17 15:29:47 +02:00
dependabot[bot]
3c72b07e55
Update atomic requirement from 0.4.6 to 0.5.0 (#1766)
* Update atomic requirement from 0.4.6 to 0.5.0

Updates the requirements on [atomic](https://github.com/Amanieu/atomic-rs) to permit the latest version.
- [Release notes](https://github.com/Amanieu/atomic-rs/releases)
- [Commits](https://github.com/Amanieu/atomic-rs/compare/v0.4.6...v0.5.0)

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

* .github/workflows: Update Rust nightly

* misc/multistream-select: Don't mention private item in public doc

* .github/workflows: Update renamed doc flag

* core/src/connection/pool: Don't mention private item in public doc

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-17 10:41:23 +02:00
dependabot[bot]
5099ab592f
Update unsigned-varint requirement from 0.4 to 0.5 (#1761)
* Update unsigned-varint requirement from 0.4 to 0.5

Updates the requirements on [unsigned-varint](https://github.com/paritytech/unsigned-varint) to permit the latest version.
- [Release notes](https://github.com/paritytech/unsigned-varint/releases)
- [Changelog](https://github.com/paritytech/unsigned-varint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/paritytech/unsigned-varint/commits/v0.5.1)

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

* *: Update changelogs and Cargo tomls

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-16 10:27:33 +02:00
dependabot[bot]
df93116d19
Update async-tls requirement from 0.8.0 to 0.10.0 (#1762)
Updates the requirements on [async-tls](https://github.com/async-std/async-tls) to permit the latest version.
- [Release notes](https://github.com/async-std/async-tls/releases)
- [Commits](https://github.com/async-std/async-tls/commits/v0.10.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-16 09:57:06 +02:00
Max Inden
e300ba323a
protocols/plaintext: Remove wrong debug log (#1759)
Don't log errors happening after plaintext handshake as errors happening
during plaintext handshake.
2020-09-16 09:08:45 +02:00
dependabot[bot]
dbf5a8521f
Update webpki-roots requirement from 0.18 to 0.20 (#1757)
* Update webpki-roots requirement from 0.18 to 0.20

Updates the requirements on [webpki-roots](https://github.com/ctz/webpki-roots) to permit the latest version.
- [Release notes](https://github.com/ctz/webpki-roots/releases)
- [Commits](https://github.com/ctz/webpki-roots/compare/v/0.18.0...v/0.20.0)

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

* *: Update patch version in CHANGELOG and Cargo.toml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-15 15:44:36 +02:00
dependabot[bot]
7aac4e971c
Update x25519-dalek requirement from 0.6.0 to 1.1.0 (#1745)
* Update x25519-dalek requirement from 0.6.0 to 1.1.0

Updates the requirements on [x25519-dalek](https://github.com/dalek-cryptography/x25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/x25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/x25519-dalek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/x25519-dalek/compare/0.6.0...1.1.0)

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

* *: Add CHANGELOG and Cargo.toml entries

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-15 11:17:58 +02:00
dependabot[bot]
84f9b70763
Update curve25519-dalek requirement from 2.0.0 to 3.0.0 (#1753)
* Update curve25519-dalek requirement from 2.0.0 to 3.0.0

Updates the requirements on [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/2.0.0...3.0.0)

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

* *: Add CHANGELOG and Cargo.toml entries

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-15 10:53:14 +02:00
dependabot[bot]
36d33f1eaa
Update sha2 requirement from 0.8.0 to 0.9.1 (#1747)
* Update sha2 requirement from 0.8.0 to 0.9.1

Updates the requirements on [sha2](https://github.com/RustCrypto/hashes) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/whirlpool-v0.8.1...sha2-v0.9.1)

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

* Fix update errors.

* Update CHANGELOGs and versions.

* Update Cargo.toml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toralf Wittner <tw@dtex.org>
2020-09-14 13:31:20 +02:00
dependabot[bot]
9647557f0d
Update base64 requirement from 0.11.0 to 0.12.3 (#1749)
* Update base64 requirement from 0.11.0 to 0.12.3

Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.11.0...v0.12.3)

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

* protocols/gossipsub/CHANGELOG: Make dependency entry generic

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-11 15:19:05 +02:00
dependabot[bot]
51dc834b23
Update lru_time_cache requirement from 0.10.0 to 0.11.0 (#1746)
* Update lru_time_cache requirement from 0.10.0 to 0.11.0

Updates the requirements on [lru_time_cache](https://github.com/maidsafe/lru_time_cache) to permit the latest version.
- [Release notes](https://github.com/maidsafe/lru_time_cache/releases)
- [Changelog](https://github.com/maidsafe/lru_time_cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/maidsafe/lru_time_cache/commits)

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

* *: Update changelogs and cargo manifests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-11 12:16:36 +02:00
Max Inden
554e3b071a
.github: Add dependabot.yml (#1744) 2020-09-11 10:07:06 +02:00
Max Inden
6be6c09c19
core/Cargo.toml: Require parity-multiaddr 0.9.2 for Ord bound (#1742)
With b601ed4 libp2p-core requires the `Ord` bound on `Multiaddr`. This
bound is only implemented with parity-multiaddr `0.9.2`. Make sure
libp2p-core requires at least parity-multiaddr `0.9.2`.

* *: Prepare libp2p 0.28.1 release
2020-09-10 11:03:14 +02:00
Roman Borschel
7597485739
Prepare v0.28.0 (#1741) 2020-09-09 15:46:40 +02:00
Toralf Wittner
1e09a1c89b
yamux 0.8.0 upgrade (#1736)
* yamux-0.5.0 upgrade

* yamux-0.6.0 upgrade.

* yamux-0.7.0 upgrade.

* Yamux-0.8.0 upgrade.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-09 15:28:57 +02:00
Roman Borschel
2618899b85
Prepare v0.27.0 (#1740) 2020-09-09 15:00:08 +02:00
Toralf Wittner
f351470998
yamux 0.7.0 upgrade (#1735)
* yamux-0.5.0 upgrade

* yamux-0.6.0 upgrade.

* yamux-0.7.0 upgrade.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-09 14:41:14 +02:00
Roman Borschel
a8d491bf7b
Prepare v0.26 (#1739) 2020-09-09 14:14:04 +02:00
Toralf Wittner
7438b8a693
yamux-0.6.0 upgrade (#1734)
* yamux-0.5.0 upgrade

* yamux-0.6.0 upgrade.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-09 13:07:03 +02:00
Roman S. Borschel
7c3b8a9c86 Update root changelog for SECIO deprecation. 2020-09-09 12:43:41 +02:00
Roman Borschel
a262609db4
Prepare release(s). (#1738) 2020-09-09 12:20:25 +02:00
Toralf Wittner
0621124a87
yamux-0.5.0 upgrade (#1733)
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-09 11:38:05 +02:00
Roman Borschel
f0133a0213
[core] Simplify accepting incoming connections. (#1732)
* Simplify incoming connection handling.

Instead of handing out a mutable borrow to the connection
pool in the `IncomingConnectionEvent`, so one can call
`IncomingConnectionEvent::accept()`, just provide
`Network::accept()`.

* Update docs.

* Update CHANGELOG.
2020-09-09 11:21:37 +02:00
Toralf Wittner
f86bc01e20
Add back the LRU cache to Throttled. (#1731)
* Restore `RequestResponse::throttled`.

In contrast to the existing "throttled" approach this PR adds back-
pressure to the protocol without requiring pre-existing knowledge
of all nodes about their limits. It adds small, CBOR-encoded headers
to the actual payload data. Extra credit messages communicate back
to the sender how many more requests it is allowed to send.

* Remove some noise.

* Resend credit grant after connection closed.

Should an error in some lower layer cause a connection to be closed,
our previously sent credit grant may not have reached the remote peer.
Therefore, pessimistically, a credit grant is resent whenever a
connection is closed. The remote ignores duplicate grants.

* Remove inbound/outbound tracking per peer.

* Send ACK as response to duplicate credit grants.

* Simplify.

* Fix grammar.

* Incorporate review feedback.

- Remove `ResponseSent` which was a leftover from previous attemps
  and issue a credit grant immediately in `send_response`.
- Only resend credit grants after a connection is closed if we are
  still connected to this peer.

* Move codec/header.rs to throttled/codec.rs.

* More review suggestions.

* Generalise `ProtocolWrapper` and use shorter prefix.

* Update protocols/request-response/src/lib.rs

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

* Update protocols/request-response/src/throttled.rs

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

* Update protocols/request-response/src/throttled.rs

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

* Minor comment changes.

* Limit max. header size to 8KiB

* Always construct initial limit with 1.

Since honest senders always assume a send budget of 1 and wait for
credit afterwards, setting the default limit to a higher value
can only become effective after informing the peer about it which
means leaving `max_recv` at 1 and setting `next_max` to the desired
value.

* Use LRU cache to keep previous peer infos.

Peers may send all their requests, reconnect and send again all their
requests, starting from a fresh budget. The LRU cache keeps the peer
information around and reuses it when the peer reconnects, continuing
with the previous remaining limit.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-09 11:04:20 +02:00
Max Inden
5a3e7f7e6e
protocols/gossipsub/tests/smoke: Improve wait_for reporting (#1737) 2020-09-09 09:54:02 +02:00
Max Inden
244c5aa87a
core/transport/memory: Return dialer address in Upgrade event (#1724)
Previously a `Listener` would return its own address as the
`remote_addr` in the `ListenerEvent::Upgrade` event.

With this commit a `Listener` returns the dialer address as the
`remote_addr` in the `ListenerEvent::Upgrade` event. To do so a
`DialFuture` registers a port with the global `HUB` at construction
which is later on unregistered in the `Drop` implementation of the
dialer's `Chan`. The sending side of the `mpsc::channel` registered in
the `HUB` is dropped at `DialFuture` construction, thus one can not dial
the dialer port. This mimics the TCP transport behaviour preventing both
dialing and listening on the same TCP port.
2020-09-08 12:07:15 +02:00
Roman Borschel
6599ff13e1
[kad] Increase default payload limits. (#1730)
* libp2p-kad: Increase default max packet size.

For better interoperability by default, picking up the
suggestion in https://github.com/libp2p/rust-libp2p/issues/1622.

* Update changelog.
2020-09-08 11:21:01 +02:00
Roman S. Borschel
08a7b1dcd2 Update request-response changelog. 2020-09-07 17:25:15 +02:00
Toralf Wittner
d988b05f85
Restore RequestResponse::throttled. (#1726)
* Restore `RequestResponse::throttled`.

In contrast to the existing "throttled" approach this PR adds back-
pressure to the protocol without requiring pre-existing knowledge
of all nodes about their limits. It adds small, CBOR-encoded headers
to the actual payload data. Extra credit messages communicate back
to the sender how many more requests it is allowed to send.

* Remove some noise.

* Resend credit grant after connection closed.

Should an error in some lower layer cause a connection to be closed,
our previously sent credit grant may not have reached the remote peer.
Therefore, pessimistically, a credit grant is resent whenever a
connection is closed. The remote ignores duplicate grants.

* Remove inbound/outbound tracking per peer.

* Send ACK as response to duplicate credit grants.

* Simplify.

* Fix grammar.

* Incorporate review feedback.

- Remove `ResponseSent` which was a leftover from previous attemps
  and issue a credit grant immediately in `send_response`.
- Only resend credit grants after a connection is closed if we are
  still connected to this peer.

* Move codec/header.rs to throttled/codec.rs.

* More review suggestions.

* Generalise `ProtocolWrapper` and use shorter prefix.

* Update protocols/request-response/src/lib.rs

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

* Update protocols/request-response/src/throttled.rs

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

* Update protocols/request-response/src/throttled.rs

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

* Minor comment changes.

* Limit max. header size to 8KiB

* Always construct initial limit with 1.

Since honest senders always assume a send budget of 1 and wait for
credit afterwards, setting the default limit to a higher value
can only become effective after informing the peer about it which
means leaving `max_recv` at 1 and setting `next_max` to the desired
value.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-07 17:22:40 +02:00
Roman Borschel
ed5aec14f3
Deprecate secio. (#1729)
SECIO is removed from all libp2p implementations.
See https://blog.ipfs.io/2020-08-07-deprecating-secio/.
2020-09-07 12:13:10 +02:00
Roman S. Borschel
c94262d03a Set development versions appropriately and update changelogs. 2020-09-03 12:31:45 +02:00
Roman S. Borschel
e62cd44a99 Update core changelog. 2020-09-03 11:29:52 +02:00
Thomas Eizinger
3100444085
Allow any closure to be passed as an executor (#1686)
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-09-03 11:28:15 +02:00