Skip to content

Commit 9145531

Browse files
author
Lee Miller
committed
More about message types from Protocol_specification_v3
1 parent 4fef7cd commit 9145531

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

docs/protocol.rst

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ Allows a node to advertise its knowledge of one or more objects. Payload
517517
| 32x? | inventory | inv_vect[] | Inventory vectors |
518518
+------------+-------------+------------+-----------------------------+
519519

520-
521520
getdata
522521
^^^^^^^
523522

@@ -534,6 +533,50 @@ Payload (maximum payload length: 50000 entries):
534533
| 32x? | inventory | inv_vect[] | Inventory vectors |
535534
+------------+-------------+------------+-----------------------------+
536535

536+
error
537+
^^^^^
538+
.. note:: New in version 3
539+
540+
This message may be silently ignored (and therefor handled like any other
541+
"unknown" message).
542+
543+
The message is intended to inform the other node about protocol errors and
544+
can be used for debugging and improving code.
545+
546+
.. list-table::
547+
:header-rows: 1
548+
:widths: auto
549+
550+
* - Field Size
551+
- Description
552+
- Data type
553+
- Comments
554+
* - 1+
555+
- fatal
556+
- |var_int|
557+
- This qualifies the error. If set to 0, than its just a "warning".
558+
You can expect, everything still worked fine. If set to 1, than
559+
it's an error, so you may expect, something was going wrong
560+
(e.g. an object got lost). If set to 2, it's a fatal error. The node
561+
will drop the line for that error and maybe ban you for some time.
562+
* - 1+
563+
- ban time
564+
- var_int
565+
- If the error is fatal, you can specify the ban time in seconds, here.
566+
You inform the other node, that you will not accept further connections
567+
for this number of seconds. For non fatal errors this field has
568+
no meaning and should be zero.
569+
* - 1+
570+
- inventory vector
571+
- var_str
572+
- If the error is related to an object, this Variable length string
573+
contains the inventory vector of that object. If the error is not
574+
related to an object, this string is empty.
575+
* - 1+
576+
- error text
577+
- var_str
578+
- A human readable string in English, which describes the error.
579+
537580

538581
object
539582
^^^^^^
@@ -588,6 +631,19 @@ type, like 'msg', or 'broadcast'. To be a valid object, the
588631
- This field varies depending on the object type; see below.
589632

590633

634+
Unsupported messages
635+
^^^^^^^^^^^^^^^^^^^^
636+
637+
If a node receives an unknown message it **must** silently ignore it. This is
638+
for further extensions of the protocol with other messages. Nodes that don't
639+
understand such a new message type shall be able to work correct with the
640+
message types they understand.
641+
642+
Maybe some version 2 nodes did already implement it that way, but in version 3
643+
it is **part of the protocol specification**, that a node **must**
644+
silently ignore unsupported messages.
645+
646+
591647
Object types
592648
------------
593649

0 commit comments

Comments
 (0)