Comments (6)
I agree. We wouldn't even need a CAN_HOP in this case.
Thoughts @vyzo?
from specs.
I think this was discussed during the spec development and rejected as an idea?
It's nice to be able to see if the relay hops without CAN_HOP
but other than that it doesn't add much.
Also, it will be a bear to deploy as it would break existing nodes badly.
from specs.
Well, we can always support both so we don't need to break anything. However, as you said, this may be a pain to implement/deploy.
Really, my motivation is that this would allow us to split the implementation into a separate transport and relay.
from specs.
Based on discussions in libp2p/go-libp2p-circuit#67, I think the core problem is that the relay protocol doesn't model allocations.
So when a client connects to a relay, the relay has no idea if this is a NAT'ted client wishing to allocate a slot in the relay, or if it's a node wanting to connect to establish a channel to a relayed peer.
We can draw inspiration from the TURN spec (RFC5766), which models "allocations" explicitly. I think the hop/stop separation doesn't get to the root of the issue.
IMO a more correct design would be:
- A
/libp2p/relay/allocate
protocol that NAT'ted peers use to acquire and renew a slot in a relay, enabling them to announce a relayed address for themselves.
A/libp2p/relay/channel
protocol, that clients use to open streams against NAT'ted peers, and that the relay uses to relay that stream over to the allocated peer.
See libp2p/go-libp2p-circuit#67 (review) for related discussion.
from specs.
Has any thought been given to how a relay should respond if it doesn't want to relay data to the requested peer? (For example, no allocation has been (or will be) made to the requested peer, due to whatever policies the relay uses.)
HOP_BACKOFF
is described as a temporary backoff, rather than a refusal to relay to that peer. HOP_NO_CONN_TO_DST
comes close, but I can imagine situations where the relay does have a connection to the destination, but wants to reserve its scarce bandwidth or data cap for relaying only to its closest friends.
from specs.
Instead of negotiating /libp2p/relay/circuit/0.1.0 then requesting a mode, it could be a good idea to have two different protocols instead. For example /libp2p/relay/circuit/0.1.0/hop and /libp2p/relay/circuit/0.1.0/stop.
This has been incorporated in the circuit relay v2 protocol (#325), thus I am closing here. Thanks for raising it @tomaka. In my eyes this is a great improvement to the v1 specification.
So when a client connects to a relay, the relay has no idea if this is a NAT'ted client wishing to allocate a slot in the relay, or if it's a node wanting to connect to establish a channel to a relayed peer.
This is handled in the circuit relay v2 protocol via Reservations.
HOP_BACKOFF is described as a temporary backoff, rather than a refusal to relay to that peer. HOP_NO_CONN_TO_DST comes close, but I can imagine situations where the relay does have a connection to the destination, but wants to reserve its scarce bandwidth or data cap for relaying only to its closest friends.
For now this is modeled via the PERMISSION_DENIED
status in the circuit relay v2 specification. Error messages can be extended by more specific entities in the future.
from specs.
Related Issues (20)
- webrtc: RTCDataChannel `negotiation` conflict HOT 3
- Create spec legend and terminology guideline HOT 1
- Proposal: Introduce spec numbers HOT 1
- Proposal: Remove Peer Exchange in GossipSub Prune Message HOT 13
- Feature Request: mdns in libp2p HOT 6
- multistream: deprecate the simopen extension HOT 9
- webrtc: figure out how to properly close datachannels HOT 7
- webrtc: specify multiaddresses on a browser-to-browser webrtc connection HOT 5
- webrtc(private-to-private): clarify interaction with DCUtR HOT 7
- webrtc: exchanging ICE candidates HOT 4
- webrtc: race condition during connection negotiation HOT 5
- New IPNS key types HOT 1
- Ed25519 signature usage prone to inconsistent peer views between LibP2p implementations HOT 11
- Missing WebSockets (/ws, /wss) Transport Specification HOT 2
- Libp2p Threat model and mitigations HOT 1
- Ok
- TLS spec doesn't mention `ALPN` `libp2p` used by implementations HOT 1
- Magiselect - Wire Transparent security ยซ handshake ยป HOT 2
- AutoNAT: Network ReachabilityPublic distinguishes between IPv6 and IPv4 HOT 2
- mDNS: the spec to explicitly allow for configurability of the service name HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specs.