libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.58k stars 275 forks source link

What is E_DIAL_REFUSED for in autonat? #427

Closed achingbrain closed 2 years ago

achingbrain commented 2 years ago

The autonat protocol contains a E_DIAL_REFUSED status but it's not mentioned anywhere in the spec body.

When would you send it or expect to receive it?

MarcoPolo commented 2 years ago

I believe it is for when the other end refused to dial the given address (didn’t make an attempt) vs it dialed and errored. There are a couple reasons why it would refuse, I think the spec mentions a couple but it’s probably not exhaustive.

I think it makes sense to add this to the spec.

A related issue here: https://github.com/libp2p/specs/issues/411

achingbrain commented 2 years ago

Ok, great - I was looking for the case where you tell me to dial an address on a transport that I don't support, I shouldn't tell you it errored, I should tell you I can't help out and you should ask someone else. Sounds like this is it.

I'll PR the spec to add this.

achingbrain commented 2 years ago

PR is here: https://github.com/libp2p/specs/pull/430