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

Circuit relay v2 should return limit to dialer #5466

Closed
MarcoPolo opened this issue Jun 11, 2024 · 1 comment · Fixed by #5493
Closed

Circuit relay v2 should return limit to dialer #5466

MarcoPolo opened this issue Jun 11, 2024 · 1 comment · Fixed by #5493

Comments

@MarcoPolo
Copy link
Contributor

Summary

When returning the "hop" message for circuit establishment, the rust-libp2p relay server does not fill in a value for the Limit field in the protobuf. Thus the dialer does not know if the connection is limited and can only assume it's unlimited (which is likely rarely true).

Issue here: https://github.com/libp2p/rust-libp2p/blob/master/protocols/relay/src/protocol/inbound_hop.rs#L130
go-libp2p sets it here: https://github.com/libp2p/go-libp2p/blob/master/p2p/protocol/circuitv2/relay/relay.go#L398

Expected behavior

rust-libp2p circuitv2 server should fill in the Limit field in returned hop message.

Actual behavior

It doesn't

Relevant log output

No response

Possible Solution

Should be an easy fix. CircuitReq needs to store the resource limits so it can set the field.

Version

all released

Would you like to work on fixing this bug ?

Maybe

@dariusc93
Copy link
Member

A simple fix. I may do it quickly if nobody else has already done it

@mergify mergify bot closed this as completed in #5493 Jul 19, 2024
mergify bot pushed a commit that referenced this issue Jul 19, 2024
Fixes #5466
Adds resource limits to `CircuitReq` to be set .

Pull-Request: #5493.
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this issue Sep 14, 2024
Fixes libp2p#5466
Adds resource limits to `CircuitReq` to be set .

Pull-Request: libp2p#5493.
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 a pull request may close this issue.

2 participants