Skip to content

[Relay] ReservationReqAccepted not always emitted #6141

@retrohacker

Description

@retrohacker

Summary

We've observed cases where the ReservationReqAccepted event is not always emitted on the relay. We have also observed latency in this event being emitted (10s of seconds passing before the event is emitted). The message also does not go across the relay protocol to the client, which results in the client's Transport not emitting NewListenAddr - so the client does not advertise the relay circuits in it's multiaddresses.

In the cases where ReservationReqAccepted was not emitted after establishing a connection to the relay, we were still able to use the relay to dial that peer - indicating the relay reservation was in place even though the event did not emit.

Expected behavior

ReservationReqAccepted should always be emitted when a relay is providing relaying services to a peer.

Actual behavior

ReservationReqAccepted is not always emitted.

Relevant log output

Possible Solution

No response

Version

commit: cd215dc

libp2p = { version = "0.56.0", path = "libp2p" }
libp2p-allow-block-list = { version = "0.5.0", path = "misc/allow-block-list" }
libp2p-autonat = { version = "0.14.1", path = "protocols/autonat" }
libp2p-connection-limits = { version = "0.5.1", path = "misc/connection-limits" }
libp2p-core = { version = "0.43.1", path = "core" }
libp2p-dcutr = { version = "0.13.0", path = "protocols/dcutr" }
libp2p-dns = { version = "0.44.0", path = "transports/dns" }
libp2p-floodsub = { version = "0.46.1", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.49.0", path = "protocols/gossipsub" }
libp2p-identify = { version = "0.47.0", path = "protocols/identify" }
libp2p-identity = { version = "0.2.11" }
libp2p-kad = { version = "0.47.1", path = "protocols/kad" }
libp2p-mdns = { version = "0.47.0", path = "protocols/mdns" }
libp2p-memory-connection-limits = { version = "0.4.0", path = "misc/memory-connection-limits" }
libp2p-metrics = { version = "0.17.0", path = "misc/metrics" }
libp2p-mplex = { version = "0.43.1", path = "muxers/mplex" }
libp2p-noise = { version = "0.46.1", path = "transports/noise" }
libp2p-peer-store = { version = "0.1.0", path = "misc/peer-store" }
libp2p-perf = { version = "0.4.0", path = "protocols/perf" }
libp2p-ping = { version = "0.46.0", path = "protocols/ping" }
libp2p-plaintext = { version = "0.43.0", path = "transports/plaintext" }
libp2p-pnet = { version = "0.26.0", path = "transports/pnet" }
libp2p-quic = { version = "0.12.1", path = "transports/quic" }
libp2p-relay = { version = "0.20.0", path = "protocols/relay" }
libp2p-rendezvous = { version = "0.16.1", path = "protocols/rendezvous" }
libp2p-request-response = { version = "0.28.1", path = "protocols/request-response" }
libp2p-server = { version = "0.12.7", path = "misc/server" }
libp2p-stream = { version = "0.3.0-alpha.1", path = "protocols/stream" }
libp2p-swarm = { version = "0.47.0", path = "swarm" }
libp2p-swarm-derive = { version = "=0.35.1", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required.
libp2p-swarm-test = { version = "0.6.0", path = "swarm-test" }
libp2p-tcp = { version = "0.43.0", path = "transports/tcp" }
libp2p-tls = { version = "0.6.2", path = "transports/tls" }
libp2p-uds = { version = "0.42.0", path = "transports/uds" }
libp2p-upnp = { version = "0.4.1", path = "protocols/upnp" }
libp2p-webrtc = { version = "0.9.0-alpha", path = "transports/webrtc" }
libp2p-webrtc-utils = { version = "0.4.0", path = "misc/webrtc-utils" }
libp2p-webrtc-websys = { version = "0.4.0", path = "transports/webrtc-websys" }
libp2p-websocket = { version = "0.45.1", path = "transports/websocket" }
libp2p-websocket-websys = { version = "0.5.0", path = "transports/websocket-websys" }
libp2p-webtransport-websys = { version = "0.5.1", path = "transports/webtransport-websys" }
libp2p-yamux = { version = "0.47.0", path = "muxers/yamux" }

Would you like to work on fixing this bug?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions