Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocols/mdns/: Generate peer expiry and fix IPv6 support #2359

Merged
merged 7 commits into from
Dec 6, 2021

Conversation

vnermolaev
Copy link
Contributor

Fix peer discovery testing to use IPv6 where appropriate.
Generate peer expiry event and test. Please see discussion here #2308

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for proposing the patch. A couple of comments below.

protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/mdns/Cargo.toml Outdated Show resolved Hide resolved
protocols/mdns/tests/smoke.rs Outdated Show resolved Hide resolved
@mxinden
Copy link
Member

mxinden commented Nov 30, 2021

@vnermolaev mind running Rust fmt on your changes? (See failing CI.)

@vnermolaev
Copy link
Contributor Author

@vnermolaev mind running Rust fmt on your changes? (See failing CI.)

My bad. Forgot to configure the IDE for this project.

@vnermolaev
Copy link
Contributor Author

@mxinden I believe it must be OK now. Please approve the workflow, with such a speed of incoming commits, I need to rebase every hour :)

@mxinden
Copy link
Member

mxinden commented Dec 1, 2021

Please approve the workflow, with such a speed of incoming commits, I need to rebase every hour :)

No need to constantly rebase. I will merge master right before merging your branch into master. Also, in general, please merge instead of rebase&force-push to maintain a proper history. Thank you 🙏

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

One comment :)

protocols/mdns/src/behaviour.rs Outdated Show resolved Hide resolved
@mxinden mxinden changed the title Bugfix/call expired protocols/mdns/: Generate peer expiry and fix IPv6 support Dec 2, 2021
@vnermolaev
Copy link
Contributor Author

vnermolaev commented Dec 2, 2021

Well, this isn't on me.
I am not sure what to do to fix this.
The branch branches off of master, so I would not expect such problems.
Any advice @mxinden ?

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failures are not related to this patch. Fixes through #2365 and #2368. Fixed here with latest master merge.

Thanks @vnermolaev for the help!

@mxinden mxinden merged commit 4401ffa into libp2p:master Dec 6, 2021
canewsin added a commit to decentnetwork/rust-libp2p that referenced this pull request Dec 7, 2021
* protocols/relay: Implement circuit relay v2 protocol

This commit adds an implementation for the circuit relay v2 protocol to
be used as a relay server, i.e. it supports incoming HOP requests and
outgoing STOP requests. Future commits will add support for clients,
i.e. outgoing HOP requests and incoming STOP requests.

The existing circuit relay v1 protocol implementation is moved to
protocols/relay/src/v1.

* misc/multistream-select: Ignore simultaneous open 'iamclient'

* protocols/relay: Ensure connections of HOP connect are kept alive

* protocols/relay: Improve documentation

* protocols/relay: Implement v2 client logic

* protocols/relay: Handle dial failure

* protocols/relay: Reuse connection

* protocols/relay: Rename Connection to RelayedConnection

* protocols/relay: Update transport doc examples

* protocols/relay: Pass relay addr to transport

* protocols/relay: Implement inbound stop denial

* protocols/relay: Renew reservations

* protocols/relay: Handle invalid expiration in the past

* protocols/relay: Handle in and outbound failure

* protocols/relay: Implement client handler keep alive

* protocols/relay: Handle handler listener closed channel

* protocols/relay: Handle handler to listener failure

* protocols/relay: Return all new listener addresses

* protocols/relay/v2: Update to latest protobuf definition

* Revert "misc/multistream-select: Ignore simultaneous open 'iamclient'"

This reverts commit 125e3c3.

* protocols/relay/v2: Report back to transport

* protocols/relay/v2: Disconnect when stop protocol not supported

* protocols/relay/v2: Document max_duration not exceed u32::MAX

* protocols/relay/v2: Don't append p2p-circuit as relay

* protocols/relay/v2: Implement rate limiter

* protocols/relay/v2: Document caveats on rate limiter with high volume

* protocols/relay: Prevent possible false positive in quickcheck

* protocols/relay: Reword Prost error message

* protocols/relay: Allow users to specify generic rate limiters

* protocols/relay: Move rate limiting logic into module

* protocols/relay: Prevent reservation and connection over relayed conn

* protocols/relay: Add circuit src rate limiting

* protocols/relay/v2: Simplify example

* protocols/relay: Add myself to authors

* protocols/relay: Use thiserror

* protocols/relay/v2: Set rate limits

* protocols/relay: Use wasm_timer::Instant

* protocols/relay/v2: Apply clippy suggestions

* protocols/relay: Fix intra doc link

* protocols/relay: Fix clippy warnings

* misc/metrics: Add basic instrumentation for libp2p-relay

* protocols/relay: Return NetworkBehaviourAction::NotifyHandler right away

* protocols/relay: Run rust fmt

* protocols/relay/src/v2/relay: Accept mutable config

* protocols/relay/examples: Structure command line args

- Allow deterministic peer identity.
- Choose between ipv6 and ipv4.

* .github/workflow: Use ubuntu-18.04 fixing missing protoc binary  (libp2p#2368)

`prost-build` is failing due to a missing `protoc` binary. Neither the OS
supplies one, nor can the bundled binaries be used. This commit downgrades the
OS used. The older OS is compatible with the bundled `protoc` binaries.

* *: Fix clippy errors from upgrade to Rust 1.57 (libp2p#2365)

* core: Mark "unused" field with "_"

We need to keep this marker type to ensure that the type continues
to be required to be pinned.

* tranports/noise: Derive `Default` for `Config`

`false` is the default for `bool`, we can derive this.

* protocols/request-response: Remove unused fields

These are already included the `RequestResponseMessage::Request`
variant.

* *: Allow clippy's large-enum-variant lint

Tackling these suggestions would require performance measurement
which we don't want to do at this stage.

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

* protocols/mdns/: Generate peer expiry and fix IPv6 support (libp2p#2359)

Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com>
Co-authored-by: Max Inden <mail@max-inden.de>

* protocols/floodsub: Propagate messages only to target peers (libp2p#2360)

Propagate messages only to the target peers and not all connected peers.

Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com>
Co-authored-by: Max Inden <mail@max-inden.de>

* examples/*: Migrate to async await (libp2p#2356)

* Adapt examples to async style loop
* Adapt async style loop for chat.rs
* Adapt async style loop for distributed-key-value-store.rs
* Adapt async style loop for gossibsub-chat.rs
* Adapt async style loop for ipfs-private.rs
* Adapt ping to use async
* Update tutorial crate to reflect new changes

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

* protocols/relay/src/v2/client: Return NetworkBehaviourAction on ListenReq

* Refactor suggestion

* protocols/relay/src/v2/client/handler: Check status of lend out substreams

* protocols/relay/src/v2/client: Use void::Void for drop_notifer

* protocols/relay/src/v2/client/handler: Log dropped oneshot Sender to transport

* protocols/relay/src/v2/client/handler: Await send call to transport listener

* protocols/relay/src/v2/client/handler: Remove unnecessary boxing

Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: ronzigelman <ronzigelman@gmail.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Victor Ermolaev <16148931+vnermolaev@users.noreply.github.com>
Co-authored-by: Victor Ermolaev <victorermolaev@gmail.com>
Co-authored-by: Gerardo Enrique Arriaga Rendon <53304516+JerryHue@users.noreply.github.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants