-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
68 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
# Libp2p error codes | ||
|
||
## TODO! | ||
make this a CSV | ||
|
||
## Connection Error Codes | ||
|
||
| Name | Code | Description | | ||
| --- | --- | --- | | ||
| NO_ERROR | 0 | No reason provided for disconnection. This is equivalent to closing a connection or resetting a stream without any error code. | | ||
| Reserved For Transport | 0x1 - 0x1000 | Reserved for transport level error codes. | | ||
| GATED | 0x1001 | The connection was gated. Most likely the IP / node is blacklisted. | | ||
| RESOURCE_LIMIT_EXCEEDED | 0x1002 | Rejected because we ran into a resource limit. Implementations MAY retry with a backoff | | ||
| RATE_LIMITED | 0x1003 | Rejected because the connection was rate limited. Implementations MAY retry with a backoff | | ||
| PROTOCOL_VIOLATION | 0x1004 | Peer violated the protocol | | ||
| SUPPLANTED | 0x1005 | Connection closed because a connection over a better tranpsort was available | | ||
| GARBAGE_COLLECTED | 0x1006 | Connection was garbage collected | | ||
| SHUTDOWN | 0x1007 | The node is going down | | ||
| PROTOCOL_NEGOTIATION_FAILED | 0x1008 | Rejected because we couldn't negotiate a protocol | | ||
| Reserved For Transport | 1 - 100 | Reserved for transport level error codes. | | ||
| PROTOCOL_NEGOTIATION_FAILED | 101 | Rejected because we couldn't negotiate a protocol. Used by multistream select for security negotiation | | ||
| RESOURCE_LIMIT_EXCEEDED | 102 | Rejected because we ran into a resource limit. Implementations MAY retry with a backoff | | ||
| RATE_LIMITED | 103 | Rejected because the connection was rate limited. Implementations MAY retry with a backoff | | ||
| PROTOCOL_VIOLATION | 104 | Peer violated the protocol | | ||
| SUPPLANTED | 105 | Connection closed because a connection over a better tranpsort was available | | ||
| GARBAGE_COLLECTED | 106 | Connection was garbage collected | | ||
| SHUTDOWN | 107 | The node is shutting down | | ||
| GATED | 108 | The connection was gated. Most likely the IP / node is blacklisted. | | ||
|
||
|
||
## Stream Error Codes | ||
|
||
| Name | Code | Description | | ||
| --- | --- | --- | | ||
| NO_ERROR | 0 | No reason provided for disconnection. This is equivalent to resetting a stream without any error code. | | ||
| Reserved For Transport | 0x1 - 0x1000 | Reserved for transport level error codes. | | ||
| PROTOCOL_NEGOTIATION_FAILED | 0x1001 | Rejected because we couldn't negotiate a protocol | | ||
| RESOURCE_LIMIT_EXCEEDED | 0x1002 | Connection rejected because we ran into a resource limit. Implementations MAY retry with a backoff | | ||
| RATE_LIMITED | 0x1003 | Rejected because the connection was rate limited. Implementations MAY retry with a backoff | | ||
| BAD_REQUEST | 0x1004 | Rejected because the request was invalid | | ||
| PROTOCOL_VIOLATION | 0x1005 | Rejected because the stream protocol was violated. MAY be used interchangably with `BAD_REQUEST` | | ||
| Reserved For Transport | 1 - 100 | Reserved for transport level error codes. | | ||
| PROTOCOL_NEGOTIATION_FAILED | 101 | Rejected because we couldn't negotiate a protocol. Used by multistream select| | ||
| RESOURCE_LIMIT_EXCEEDED | 102 | Connection rejected because we ran into a resource limit. Implementations MAY retry with a backoff | | ||
| RATE_LIMITED | 103 | Rejected because the connection was rate limited. Implementations MAY retry with a backoff | | ||
| PROTOCOL_VIOLATION | 104 | Rejected because the stream protocol was violated. MAY be used interchangably with `BAD_REQUEST` | | ||
| SUPPLANTED | 105 | Resetted because a better transport is available for the stream | | ||
| GARBAGE_COLLECTED | 106 | Connection was garbage collected | | ||
| SHUTDOWN | 107 | The node is shutting down | | ||
| GATED | 108 | The stream was gated. Most likely the IP / node is blacklisted. | |