* Update if-watch requirement from 0.1.8 to 0.2.0
Updates the requirements on [if-watch](https://github.com/dvc94ch/if-watch) to permit the latest version.
- [Release notes](https://github.com/dvc94ch/if-watch/releases)
- [Commits](https://github.com/dvc94ch/if-watch/commits)
Signed-off-by: dependabot[bot] <support@github.com>
* Update libp2p-tcp.
* Update libp2p-tcp version and changelog.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Roman S. Borschel <roman@parity.io>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
* Remove substream-specific protocol negotiation version.
Remove the option for a substream-specific multistream select protocol override.
The override at this granularity is no longer deemed useful, in particular because
it can usually not be configured for existing protocols like `libp2p-kad` and others.
There is a `Swarm`-scoped configuration for this version available since
[1858](https://github.com/libp2p/rust-libp2p/pull/1858).
* Update protocol crate versions and changelogs.
* Clean up documentation.
* Make clippy "happy".
Address all clippy complaints that are not purely stylistic (or even
have corner cases with false positives). Ignore all "style" and "pedantic" lints.
* Fix tests.
* Undo unnecessary API change.
`NetworkBehaviour::inject_connected` is called for the first established
connection to a peer only. See `swarm/src/lib.rs`:
```rust
this.behaviour.inject_connection_established(&peer_id, &connection.id(), &endpoint);
if num_established.get() == 1 {
this.behaviour.inject_connected(&peer_id);
}
```
This commit adjusts the documentation accordingly.
* swarm/src/toggle: Ignore listen upgr errors when disabled
A disabled `ToggleProtoHandler` can receive listen upgrade errors in the
following two cases:
1. Protocol negotiation on an incoming stream failed with no protocol being
agreed on.
2. When combining `ProtocolsHandler` implementations a single `ProtocolsHandler`
might be notified of an inbound upgrade error unrelated to its own upgrade
logic. For example when nesting a `ToggleProtoHandler` in a
`ProtocolsHandlerSelect` the former might receive an inbound upgrade error
even when disabled.
`ToggleProtoHandler` should ignore the error in both of these cases.
* *: Prepare libp2p-swarm v0.27.2 release
Move transport upgrade protocols from `protocols/`
to `transports/`, such that only "application protocols"
that depend on `libp2p-swarm` remain in `protocols/`,
whereas there is no such dependency in `transports/`
outside of integration tests.
Tweak README and top-level CHANGELOG.
* Allow OneShotHandler's `max_dial_negotiate` limit to be configurable.
* Update version and CHANGELOG.,
Co-authored-by: Roman S. Borschel <roman@parity.io>
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
`is_pending_outbound` should return true if the connection
to the mentioned peer hasn't been established, yet.
Closes issue: #1885
Signed-off-by: Tejas Sanap <sanap.tejas@gmail.com>
Currently, Gossipsub messages may not be published on a topic if there are no
subscribed peers on that topic, however they are being added to a duplicate
cache. If the messages are content-addressed, this prevents the user from
attempting to republish the message in the future.
This commit modifies the logic such that messages are only added to the caches
(duplicate, memcache and published_messages) if the message could be published
to at least one peer.
Previously, a failed publish would be added the memcache. This meant that the
router would gossip about a failed publish, such that if a peer joined the topic
after the failed publish (but within the gossip history time window) the message
could still be propagated to the newly connected peers. With this PR, a failed
publish now definitively indicates the message will not be published on the
network and the user is required to re-submit at a later time, once sufficient
peers exist on the topic.